I'm working on a RHEL7 docker container with cobbler in it. I have setup cobbler in this container to manage dhcpd. One hurdle with this setup is that a cobbler sync needs to restart dhcpd, but a docker container has no systemd. So what I've done to work around this is to edit /usr/lib/python2.7/site-packages/cobbler/modules/sync_post_restart_services .py and change the dhcp_restart_command to call a simple shell script:
-- #!/bin/sh #dhcpd writes its pid to /var/run/dhcpd.pid #kill the PID in the file, if the file exists if [ -f "/var/run/dhcpd.pid" ] then kill `cat /var/run/dhcpd.pid` fi #Start again using command line from /usr/lib/systemd/system/dhcpd.service /usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd -- I do realize I'm not really supposed to have more than one process in a container. But if I put dhcpd in its own container, the problem would just be even harder b/c now cobbler in its container needs to restart another container. So I took the easier route and put them in the same container. So in this implementation, it would be useful if I could specify a custom dhcp_restart_command in /etc/cobbler/settings. Would that be a change the community would be interested in accepting? Thx, britt _______________________________________________ cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/cobbler-devel