nsd fails to install
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nsd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[IMPACT]
Currently, nsd fails to install. The postinst attempts to start the nsd daemon before creating the nsd user, and fails when starting the daemon fails.
The daemon is started by debhelper-generated snippets. The attached fixes move the auto-generated snippets to the end of the postinst, after the non-auto-generated code creates the user.
(This is the fix used by Debian to fix Debian bug #743396)
[TEST CASE]
1. Ensure that the nsd user doesn't already exist:
$ getent passwd nsd
$
2. Install nsd:
$ sudo apt-get install nsd
Note: This won't work in an environment such as a buildd chroot where daemons are disabled via policy-rc.d - you'll either have to remove the file or specifically whitelist the nsd daemon.
Expected results: package install successfully
Actual results:
$ sudo apt-get install nsd
....
Unpacking nsd (4.0.1-1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up nsd (4.0.1-1) ...
start: Job failed to start
invoke-rc.d: initscript nsd, action "start" failed.
dpkg: error processing package nsd (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
nsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
[REGRESSION POTENTIAL]
Seems quite low. There are no changes to the actual nsd code, so the likelihood of affecting successful installs seems minimal. The only debhelper-generated code in the postinst are related to the init script (starting the daemon, and upgrading from sysvinit to upstart), so the possibility for side-effects from moving the snippets also seems minimal.
===
Original description:
installing nsd fails unless the `nsd` user is created first.
On a completely fresh Ubuntu 14.04 machine (from AWS's AMI):
$ sudo apt-get update
$ sudo apt-get install nsd
....
Unpacking nsd (4.0.1-1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up nsd (4.0.1-1) ...
start: Job failed to start
invoke-rc.d: initscript nsd, action "start" failed.
dpkg: error processing package nsd (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
nsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ sudo useradd nsd
$ sudo dpkg --configure nsd
Setting up nsd (4.0.1-1) ...
nsd start/running, process 1887
Changed in nsd (Ubuntu Trusty): | |
status: | New → Confirmed |
Changed in nsd (Ubuntu Utopic): | |
status: | New → Confirmed |
Changed in nsd (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in nsd (Ubuntu Trusty): | |
status: | Confirmed → In Progress |
Changed in nsd (Ubuntu Utopic): | |
status: | Confirmed → In Progress |
tags: | added: verification-done-trusty |
tags: |
added: verification-needed-utopic removed: verification-needed |
tags: |
added: trusty verification-needed removed: verification-needed-utopic |
tags: |
added: verification-needed-utopic removed: verification-needed |
Status changed to 'Confirmed' because the bug affects multiple users.