'cobbler sync' fails when run in a bash script after 'service cobbler restart'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cobbler (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
1. Ubuntu
$ lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10
2. Cobbler
$ apt-cache policy cobbler
cobbler:
Installed: 2.1.0+git201106
Candidate: 2.1.0+git201106
Version table:
*** 2.1.0+git201106
500 http://
100 /var/lib/
3. and 4. Description
After making changes to cobbler configuration, my simple bash script fails restarting the cobbler service and syncing the configuration, i.e. having the two commands in the script running one after another like this:
sudo service cobbler restart
sudo cobbler sync
produces following output: "cobblerd does not appear to be running/
The workaround that I found is to insert a short timeout [even one second is enough] in between the two commands:
sudo service cobbler restart
sleep 1
sudo cobbler sync
which produces the same output as when restarting and syncing the configuration manually.
My hypothesis is that in the moment when 'sudo cobbler sync' is run the cobbler service has not yet been completely restarted and, hence, the service is not [yet] running/accessible.
I have tested it on several 32-bit Ubuntu Natty/Oneric machines, and all tests have produced the same result. The most atomic test I came up with is to run a script with only the two above mentioned commands which should fail:
sudo service cobbler restart
sudo cobbler sync
And same script with a timeout in between, which should succeed:
sudo service cobbler restart
sleep 1
sudo cobbler sync
I dont know whether this bug is in cobbler or in the way ubuntu performs restart of cobbler service.
A short description of the circumstances I found this bug and a link to the actual bash script, if needed, can be found on my group's project blog post http://
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cobbler 2.1.0+git201106
ProcVersionSign
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Wed Nov 9 21:25:29 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
PackageArchitec
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cobbler
UpgradeStatus: No upgrade log present (probably fresh install)
affects: | ubuntu → cobbler (Ubuntu) |
Changed in cobbler (Ubuntu): | |
importance: | Undecided → Medium |
I don't believe this is still present in 16.10. Please reopen if so.