The location of isc-dhcpd is incorrect in sync_post_restart_services.py

Bug #709723 reported by Tony Lucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cobbler (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: cobbler

Clean Natty install
Using cobbler 2.1.0~bzr1988-0ubuntu1

sync_post_restart_services.py is used to restart services after a 'cobbler sync'. It correctly tests the dhcpd config but then fails to restart it.

It's executing 'service dhcpd restart', but thats the Redhat location, it's 'isc-dhcp-server' in natty and 'dhcp-server' in lucid.

Same issue with apache2 vs httpd in remote.py (Should I file that seperately?)

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Tony,

Thank you for reporting bugs and trying to make Ubuntu better.

Could you please provide an step by step to be able to reproduce this bug?

Thank you!

Changed in cobbler (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Tony Lucas (tony-flexiant) wrote :

Install Natty
apt-get update
apt-get install cobbler dhcp3-server

(Fix Proxy Settings for Apache)
change manage_dhcp: 0 to manage_dhcp: 1 in /etc/cobbler/settings
service cobbler restart
cobbler sync

It will fail with:

running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout:
recieved on stderr:
running: service dhcpd restart
received on stdout:
recieved on stderr: dhcpd: unrecognized service

Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler trigger failed: cobbler.modules.sync_post_restart_services'
Exception Info:
  File "/usr/lib/python2.7/dist-packages/cobbler/remote.py", line 93, in run
    rc = self._run(self)
   File "/usr/lib/python2.7/dist-packages/cobbler/remote.py", line 183, in runner
    return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger)
   File "/usr/lib/python2.7/dist-packages/cobbler/api.py", line 698, in sync
    return sync.run()
   File "/usr/lib/python2.7/dist-packages/cobbler/action_sync.py", line 152, in run
    utils.run_triggers(self.api, None, "/var/lib/cobbler/triggers/sync/post/*", logger=self.logger)
   File "/usr/lib/python2.7/dist-packages/cobbler/utils.py", line 911, in run_triggers
    raise CX("cobbler trigger failed: %s" % m.__name__)

!!! TASK FAILED !!!

/usr/lib/python2.7/dist-packages/cobbler/modules/sync_post_restart_services.py contains:

              rc = utils.subprocess_call(logger,"service dhcpd restart", shell=True)

Which thus looks for /etc/init.d/dhcpd which doesn't exist, as it's /etc/init.d/isc-dhcp-server

I've worked around it by symlinking the two for now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cobbler - 2.1.0~bzr1998-0ubuntu1

---------------
cobbler (2.1.0~bzr1998-0ubuntu1) natty; urgency=low

  * New upstream release.
  * Dropped:
    - debian/patches/01-ubuntu-webroot.patch: Accepted upstream.
    - debian/patches/04-logfile-check.patch: Accepted upstream.
    - debian/patches/05_fix_init_paths.patch: Accepted upstream.
    - debian/patches/11_support-other-wol-tools.patch: Accepted upstream.
    - debian/patches/22_re-enable_debmirror.patch: Accepted upstream.
    - debian/patches/03-localboot-value.patch: Accepted upstream.
   * debian/control: Add python-all as a build dependency.
   * debian/patches/05_cobbler_fix_reposync_permissions.patch:
     Fix reposync permissions. (LP: #710757)
   * debian/patches/12_fix_dhcp_restart.patch: Fix dhcp restart.
     (LP: #709723)
 -- Chuck Short <email address hidden> Fri, 28 Jan 2011 14:39:12 -0500

Changed in cobbler (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers