I ran the ./agent.sh install on a CentOS 6 and CentOS 7 servers but the agent does not start on reboot on the CentOS 7 server. I know that CentOS 7 uses "systemctl" instead of "service" to control service so it may be related to this change.
Just set up a brand new minimum CentOS7, and agent auto-start works. Please make sure to edit agent.sh to uncomment RUN_AS_USER and set the value as the user running QB agent process. The user should be owner of agent's installation directory, and it has all privileges over all files inside it. If it does not work, please check "logs/console.log" to see if there are any error messages there.
I have done all that but it doesn't some up at boot time. I have verified it is installed and is listed by chkconfig --list. I am able to start it with "services quickbuild start"
There are no messages at all in the console log. It is as though there is no attempt to start it.
Does /etc/init.d contain a file "quickbuild" which is a symbol link to "/path/to/qb_dir/bin/agent.sh"?
Yes, and as I indicated, using the service command properly controls the service (i.e. service quickbuild start).
I think the problem is that CentOS 7 uses systemd instead of the old sysv init.d. What this means is that some of the mounts are happening after systemd tries to initiate the sysv init.d scripts. Since our QuickBuild install is located on a directory other than the root partition it isn't available when systemd tries to start the service and so it disables the QuickBuild service. Here's how to reproduce:
- Add a new disk to your CentOS installation (i.e. /home2)
- Create the quickbuild user on this drive (adduser -d /home2/quickbuild quickbuild)
- Put the agent under this user space (in /home2/quickbuild/buildagent)
- Run the install script (cd /home2/quickbuild/buildagent/bin; ./agent.sh install)
- Reboot
Note that the service is not started and systemd doesn't know about it anymore:
systemctl status quickbuild yields: "Unit quickbuild.service could not be found."
Thanks for the info. Please check "bin/agent.sh" to see if it has "USE_SYSTEMD=" flag, if yes, specify the value as 1 and then re-install the service. If it does not have that flag, please upgrade to QB server 7.0.23, and then re-install QB agent by downloading the agent package from updated QB server. Latest version of agent package will auto-detect availability of systemd and use it if available.