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
allow for the disabling of memory intensive admin monitors via env va… #551
allow for the disabling of memory intensive admin monitors via env va… #551
Conversation
2/contrib/s2i/run
Outdated
DOLLAR='$' | ||
if [[ "${DISABLE_ADMINISTRATIVE_MONITORS}" == "true" ]]; then | ||
echo " | ||
<string>hudson.model.UpdateCenter${DOLLAR}CoreUpdateMonitor</string> |
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.
is this ${DOLLAR} right? this value represents something that's being substituted into the config.xml. I wouldn't expect it to need to be escaped.
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.
or rather, you can use echo with single quotes to avoid variable resolution here.
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.
Yes this works.
And so does hudson.model.UpdateCenter\$CoreUpdateMonitor
, without setting of DOLLAR='$'
on the same line as the envsubst
call
I employed the current approach based on the discussion that occurred in the original PR, but am perfectly find just switching to hudson.model.UpdateCenter\$CoreUpdateMonitor
What does not work: A string of hudson.model.UpdateCenter$CoreUpdateMonitor
Followed later on by DOLLAR='$' envsubst....
... the $
is lost on the above echo even and then there is nothing for DOLLAR='$' envsubst ...
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.
the $ is lost on the above echo
single quotes would solve that.
#!/bin/sh
function foo() {
echo 'a$b'
}
export bar=$(foo)
envsubst < file.json
$ cat file.json
a
$bar
foo
$ ./t.sh
a
a$b
foo
2/contrib/s2i/run
Outdated
echo "Disabling administrative monitors that contact the update center" | ||
if [ -e "${JENKINS_HOME}/init.groovy.d/update-center-init.groovy" ]; then | ||
echo "Turning off startup groovy init update center administrative monitor initialization" | ||
mv "${JENKINS_HOME}/init.groovy.d/update-center-init.groovy" "${JENKINS_HOME}/init.groovy.d/update-center-init.save" |
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.
s/save/disabled/
2/contrib/s2i/run
Outdated
echo "Administrative monitors that contact the update center will remain active" | ||
if [ -e "${JENKINS_HOME}/init.groovy.d/update-center-init.save" ]; then | ||
echo "Turning on startup groovy init update center administrative monitor initialization" | ||
mv "${JENKINS_HOME}/init.groovy.d/update-center-init.save" "${JENKINS_HOME}/init.groovy.d/update-center-init.groovy" |
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.
s/save/disabled/
2/contrib/s2i/run
Outdated
fi | ||
else | ||
echo "Administrative monitors that contact the update center will remain active" | ||
if [ -e "${JENKINS_HOME}/init.groovy.d/update-center-init.save" ]; then |
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.
s/save/disabled/
updates pushed @bparees i'll squash if you are good |
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.
typos and then lgtm
{ | ||
"name": "DISABLE_ADMINISTRATIVE_MONITORS", | ||
"displayName": "Disable memory intensive administrative monitors", | ||
"description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on starte. If true, the Jenkins core update monitor and site warnings monitor are disabled.", |
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.
s/starte/start/
{ | ||
"name": "DISABLE_ADMINISTRATIVE_MONITORS", | ||
"displayName": "Disable memory intensive administrative monitors", | ||
"description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on starte. If true, the Jenkins core update monitor and site warnings monitor are disabled.", |
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.
starte typo
…r and template param
cool thanks ... fixed typos and squashed |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, gabemontero The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…r and template param
@openshift/sig-developer-experience ptal
while these update center admin monitors are on by default, these changes will allow us to explicitly turn them off minimally in our extended tests, and possibly in online starter if we chose to do so
Details in openshift/origin#19008