How do I restart the pe-${cluster} using systemctl?

asked 2016-01-22 14:41:12 -0600

hesco gravatar image

updated 2016-01-22 15:26:39 -0600

I am using pe-3.8 and wonder how best I can restart the entire puppet enterprise cluster on a SLES12 box, which is using systemctl to manage services.

I had hoped that pe-puppetserver.service would manage this process for me, but apparently that is not happening.

I am looking for a means to reliably and elegantly orchestrate the restart of every service so that they fire up in an appropriate order and I am left with a working installation.

At the moment I am trying to bounce the service after creating new environments. I used: systemctl restart pe-puppetserver.service, and it failed. systemctl status shows me:

pe-puppetserver.service - pe-puppetserver Service
   Loaded: loaded (/usr/lib/systemd/system/pe-puppetserver.service; enabled)
   Active: failed (Result: exit-code) since Fri 2016-01-22 15:04:50 EST; 8min ago
  Process: 11396 ExecStartPost=/bin/bash -c test -x /opt/puppet/bin/puppet-enterprise-version-check && /opt/puppet/bin/puppet-enterprise-version-check (code=exited, status=0/SUCCESS)
  Process: 15771 ExecStartPost=/bin/bash ${INSTALL_DIR}/ezbake-functions.sh wait_for_app (code=exited, status=1/FAILURE)
  Process: 15770 ExecStart=/opt/puppet/bin/java $JAVA_ARGS -XX:OnOutOfMemoryError=kill -9 %%p -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/pe-puppetserver -Djava.security.egd=/dev/urandom -cp ${INSTALL_DIR}/puppet-server-release.jar clojure.main -m puppetlabs.trapperkeeper.main --config ${CONFIG} -b ${BOOTSTRAP_CONFIG} $@ (code=exited, status=1/FAILURE)
  Process: 15768 ExecStartPre=/usr/bin/install --group=pe-puppet --owner=pe-puppet -d /var/run/pe-puppet (code=exited, status=0/SUCCESS)
 Main PID: 15770 (code=exited, status=1/FAILURE)

etc. 

free showed a low ram condition on a 4gb VM. So I next ran: systemctl -l | grep ^pe- | awk '{ print $1 }' | xargs systemctl stop, which freed up RAM, but now: systemctl status pe-puppetserver.service is still failing and I seem to only be touching three of the ten services I had previously seen with systemctl status | grep ^pe-: pe-puppetserver.service, pe-puppetdb.service, pe-puppet-dashboard-workers.service.

Any guidance on a solution short of bouncing the entire server would be appreciated. I'd also appreciate knowing how little of the cluster I need to restart to recognize a new environment.

Thanks, -- Hugh

edit retag flag offensive close merge delete