-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change remote debug tomcat configuration #1276
Conversation
dcd0785
to
3d0d620
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idempotency issue
salt/server/tomcat.sls
Outdated
- name: /etc/sysconfig/tomcat | ||
- pattern: 'JAVA_OPTS="(?!-Xdebug)(.*)"' | ||
/etc/tomcat/conf.d/remote_debug.conf: | ||
file.append: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works for the first run. You should use a file.replace
with append_if_not_found: True
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be better now
3d0d620
to
9653014
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using file.touch
would be more elegant than managing an empty file... and it avoids resetting the file content if no change is required.
Hi there, just for your information, this PR broke one month ago the pipeline that runs the test suite with a JaCoCo agent in place, to collect test coverage. We were injecting the config to add the Java Agent from here, but we were overriding all the values in sysconfig/tomcat file: I'm gonna fix it now by adding a new file /etc/tomcat/conf.d/jacoco_agent.conf at our terraform file level, as I need results asap. We might want to consider moving JaCoCo enablement for the same place at sumaform level, to avoid the unalignment. |
Thanks Oscar, I wasn't aware of that.
+1 |
What does this PR change?
I'm trying to clean up all the tomcat custom configuration in uyuni and sumaform. Currently we have configuration in:
/etc/sysconfig/tomcat
/etc/tomcat.conf
and apply them requires parsing the content with some regex.
This change is aligned with the ones that I'm having for
uyuni
, where each different configuration is in a different file in/etc/tomcat/conf.d/*conf
Fixes https://github.com/SUSE/spacewalk/issues/19824