[Bug 888266] [NEW] 'cobbler sync' fails when run in a bash script after 'service cobbler restart'

Launchpad Bug Tracker 888266 at bugs.launchpad.net
Thu Nov 10 00:04:28 UTC 2011


You have been subscribed to a public bug:

1. Ubuntu
$ lsb_release -rd
Description:	Ubuntu 11.10
Release:	11.10

2. Cobbler
$ apt-cache policy cobbler
cobbler:
  Installed: 2.1.0+git20110602-0ubuntu26
  Candidate: 2.1.0+git20110602-0ubuntu26
  Version table:
 *** 2.1.0+git20110602-0ubuntu26 0
        500 http://fi.archive.ubuntu.com/ubuntu/ oneiric/universe i386 Packages
        100 /var/lib/dpkg/status

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/accessible", although if same commands are run manually in the
terminal, one after another - all is working well, i.e. 'cobbler-sync'
successfully ends up with "*** TASK COMPLETE ***"

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://awaseconfigurations.wordpress.com/2011/10/28/cobbler-
setup-script-problem-with-restarting-service-and-rebuilding-
configuration/

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cobbler 2.1.0+git20110602-0ubuntu26
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
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)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cobbler
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: cobbler (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 oneiric running-unity
-- 
'cobbler sync' fails when run in a bash script after 'service cobbler restart'
https://bugs.launchpad.net/bugs/888266
You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cobbler in Ubuntu.



More information about the Ubuntu-server-bugs mailing list