Any installation or upgrade to CloudBees CI on traditional platforms 2.289.2.2
through .rpm fails in case the configuration file typically under /etc/sysconfig/cloudbees-core-oc
or /etc/sysconfig/cloudbees-core-cm
is customizing the JENKINS_USER
.
Typically, a stacktrace like the one below is shown in the systemctl
logs.
Jul 06 12:01:02 machine cloudbees-core-oc[120276]: Shutting down CloudBees Core traditional - Operations Center [ OK ] Jul 06 12:01:02 machine systemd[1]: Stopped LSB: CloudBees Core traditional - Operations Center. Jul 06 12:03:17 machine systemd[1]: Started cloudbees-core-oc. Jul 06 12:03:17 machine systemd[1]: cloudbees-core-oc.service: main process exited, code=exited, status=6/NOTCONFIGURED Jul 06 12:03:17 machine systemd[1]: Unit cloudbees-core-oc.service entered failed state. Jul 06 12:03:17 machine systemd[1]: cloudbees-core-oc.service failed. Jul 06 12:04:52 machine systemd[1]: Started cloudbees-core-oc. Jul 06 12:04:52 machine systemd[1]: cloudbees-core-oc.service: main process exited, code=exited, status=6/NOTCONFIGURED Jul 06 12:04:52 machine systemd[1]: Unit cloudbees-core-oc.service entered failed state. Jul 06 12:04:52 machine systemd[1]: cloudbees-core-oc.service failed.
Resolution
In case the Jenkins configuration file has changed the default $JENKINS_USER
(usually under /etc/sysconfig/cloudbees-core-oc
or /etc/sysconfig/cloudbees-core-cm
), when the rpm scripts run the variables are captured and the new file is written with the previous changes. However when writing this file is sets the file to rw to owner only (600
)
This should be applied to fix the situation.
-
NOTE: From here, we are considering that the issue is happening with the Operations Center, but the same applies to Client controllers - just change
cloudbees-core-oc
percloudbees-core-cm