[SRU] dlm package installation fails

Bug #1248054 reported by Michael Ribeiro on 2013-11-05
This bug affects 27 people
Affects Status Importance Assigned to Milestone
dlm (Ubuntu)
Billy Olsen

Bug Description

dlm fails to install, per the following.

Install process output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcfg6 libcmap4 libcorosync-common4 libcpg4 libdlm3 libdlmcontrol3 libqb0 libquorum5
The following NEW packages will be installed:
  dlm libcfg6 libcmap4 libcorosync-common4 libcpg4 libdlm3 libdlmcontrol3 libqb0 libquorum5
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 213 kB of archives.
After this operation, 1,622 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ saucy/main libcorosync-common4 amd64 2.3.0-1ubuntu4 [7,278 B]
Get:2 http://us.archive.ubuntu.com/ubuntu/ saucy/main libqb0 amd64
Setting up libdlmcontrol3 (4.0.1-0ubuntu1) ...
Setting up libquorum5 (2.3.0-1ubuntu4) ...
Setting up dlm (4.0.1-0ubuntu1) ...
/etc/init.d/dlm: 22: .: Can't open /etc/rc.d/init.d/functions
invoke-rc.d: initscript dlm, action "start" failed.
dpkg: error processing dlm (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              Processing triggers for libc-bin ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

[Test Case]

 * Install dlm package
 * - Note fails to install

[Regression Potential]

 * None, already broken, though there is risk of other bugs in the

[Other Info]

 * This is a change to the debian provided init script for clvm. Upstream
   debian still has the redhat-cluster package which contains the cman
   tool, as such this change is applicable to Ubuntu only since the
   redhat clustering suite is not available.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dlm (Ubuntu):
status: New → Confirmed
Robie Basak (racb) on 2014-02-04
Changed in dlm (Ubuntu):
importance: Undecided → High
melter (termant) on 2014-06-08
summary: - dlm package doesn't install
+ dlm package installation fails

I fixed it by editing /etc/init.d/dlm

I was able to get past this by commenting out the ". /etc/rc.d/init.d/functions" line and changing the
"daemon $prog $DLM_CONTROLD_OPTS" line to "$prog $DLM_CONTROLD_OPTS"

I was using it with clvmd and needed to tweak that as well. Needed to comment out the cluster.conf stuff since I wasn't using pacemaker. These changes were made to /etc/init.d/clvm

#if [ ! -f /etc/cluster/cluster.conf ]; then
# log_failure_msg "clvmd: cluster not configured. Aborting."
# exit 0

#if ! cman_tool status >/dev/null 2>&1; then
# log_failure_msg "clvmd: cluster is not running. Aborting."
# exit 0

Again my setup is with pacemaker

Ted Bodfish (tedbs) wrote :

I have been having difficulties trying to set up Pacemaker, CoroSync, STONITH and DRBD on Ubuntu 14.04 LTS.

It appears that the port of dlm to Ubuntu has not taken into account the fact that the Ubuntu distro uses file system locations that differ from those used by the distro where dlm was developed.

I was getting the error
/etc/init.d/dlm: 22: .: Can't open /etc/rc.d/init.d/functions
so in the /etc/init.d/dlm file I changed the line
. /etc/rc.d/init.d/functions
. /lib/lsb/init-functions
and that error went away.

Unfortunately I then started to get the error
Starting dlm_controld: /etc/init.d/dlm: 51: /etc/init.d/dlm: daemon: not found
which I have not been able to resolve.

After examining the /lib/lsb/init-functions file I modified the /etc/init.d/dlm file by changing the line
        daemon $prog $DLM_CONTROLD_OPTS
        start_daemon $prog $DLM_CONTROLD_OPTS
but that just resulted in the error
$Starting dlm_controld: /sbin/start-stop-daemon: unable to stat //dlm_controld (No such file or directory)
which is probably also due to file system differences.

Any clues?

David Imhoff (dimhoff) wrote :

Ran into the same problem with the DLM package for Ubuntu 14.04. In my setup I replaced the init script contained in the package with a new one based on the /etc/init.d/skeleton file. This works for me.

Ted Bodfish (tedbs) wrote :

Thank you David, the init script you provided works. Now on to the next steps in my quest ...

Tanks David. Very Nice

lynxis lazus (lynxis-6) wrote :

I've made small modifications to the script.
Be consistant to the scriptname. Use everywhere dlm as NAME except for the daemon executable.
This makes it easier for scripts and tools when the same name is used everywhere across distros. E.g. for ansible it's good to use the same service name everywhere.

lynxis lazus (lynxis-6) wrote :

patch between the posted dlm init script version and mine

The attachment "dlm.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in dlm (Ubuntu):
assignee: nobody → Billy Olsen (billy-olsen)
description: updated
Billy Olsen (billy-olsen) wrote :
Billy Olsen (billy-olsen) wrote :
Billy Olsen (billy-olsen) wrote :
summary: - dlm package installation fails
+ [SRU] dlm package installation fails
Changed in dlm (Ubuntu Trusty):
importance: Undecided → High
Changed in dlm (Ubuntu Wily):
importance: Undecided → High
Changed in dlm (Ubuntu):
status: Confirmed → Triaged
Changed in dlm (Ubuntu Trusty):
status: New → Triaged
Changed in dlm (Ubuntu Wily):
status: New → Triaged
Louis Bouchard (louis) wrote :


I would suggest a few modifications :

1) lockfile="/var/run/$progdir/$NAME.pid"
 Should point to /run as /var/run is a symbolic link

2) Your mount statement should terminate by : || true as in

mount -t configfs none /sys/kernel/config > /dev/null 2>&1 || true

If the mount fails for any reason the fact that the shell runs as -e will make the complete command fails badly.

3) The upstream has a systemd service ; shouldn't it be used instead of relying on the obsolete sysinit script ? While I understand that this is intended to be SRUed, the proper service should be used on Xenial anyhow.

pitti also commented that the script (if used) should go in /usr/lib/modules-load.d/ but that would not be required if we go with the systemd service.


        daemon $prog $DLM_CONTROLD_OPTS
        start_daemon $prog $DLM_CONTROLD_OPTS

doesn't seem constructive. The dependency on the `daemon` binary seems to be missing and I don't see it added in the `debdiff` for `wily` (and didn't check the others). As a workaround manually install `daemon` on `wily`.

Applying https://bugs.launchpad.net/ubuntu/+source/dlm/+bug/1248054/+attachment/4557735/+files/lp1248054_wily.debdiff following http://packaging.ubuntu.com/html/traditional-packaging.html#applying-a-debdiff fails with

    $ patch -p1 < ../lp1248054_wily.debdiff
    patching file debian/changelog
    Hunk #1 FAILED at 1.
    1 out of 1 hunk FAILED -- saving rejects to file debian/changelog.rej
    patching file debian/local/modules-load.conf
    patching file debian/patches/debianize_init_script.patch
    patching file debian/patches/series
    Hunk #1 FAILED at 1.
    1 out of 1 hunk FAILED -- saving rejects to file debian/patches/series.rej
    patching file debian/rules

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dlm - 4.0.4-3ubuntu1

dlm (4.0.4-3ubuntu1) xenial; urgency=medium

  * Resync with Debian unstable (LP: #1248054, #1491745); remaining changes:
    - d/control,dlm.install,rules: Rename dlm-controld -> dlm inline
      with packaging history in Ubuntu.

dlm (4.0.4-3) unstable; urgency=medium

  * [526167a] Add corosync dependency to dlm-controld (Closes: #814519)
  * [3c98ecb] Update Standards-Version to 3.9.7 (no changes needed)

dlm (4.0.4-2) unstable; urgency=medium

  * [a10e0c9] New patch Build-reproducibly-don-t-compile-in-the-build-time.patch
  * [dda5591] Replace obsolete libsystemd-daemon-dev B-D with libsystemd-dev
    (Closes: #813376)
  * [12b55a9] Switch to secure VCS URIs as Lintian suggests
  * [562bd20] New patch Enable-bindnow-for-libdlmcontrol.patch

dlm (4.0.4-1) unstable; urgency=medium

  * [0c99a79] Imported Upstream version 4.0.4
  * [619a537] Avoid useless libxml2 dependency of dlm-controld
  * [203aa46] debian/watch: look for tar.xz instead of tar.gz
  * [0ce96d5] Delete upstreamed patches, update the remaining one
  * [6a30ac3] Upstream udev dir is under /usr/lib since 102d3c2
  * [d655c87] Taking over dlm_{controld,tool} requires Breaks+Replaces cman
    (Closes: #812419)
  * [a7b3406] Hardening seems to work now, enable it

dlm (4.0.2-1) unstable; urgency=medium

  [ Ferenc Wágner ]
  * [eb5910d] Switch to the new DLM upstream from redhat-cluster and redo
  * [1bdc449] Add symbols file for libdlmcontrol3
  * [ce903ed] Force building with Corosync 2 libraries
  * [f0cc3b2] Build and ship the dlm_stonith helper
  * [03ccd41] New patch Make-systemd-stop-dlm-on-corosync-restart.patch
  * [3127527] New patch If-an-error-occurs-unlink-the-lock-file-and-exit-
  * [05e959e] New patch Don-t-SIGKILL-dlm_controld.patch
  * [61adabd] Ensure configfs is loaded before sys-kernel-config.mount needs it

  [ Christoph Berg ]
  * Rely on dh for -dbgsym packages instead of providing our own.
  * Add watch file.

 -- James Page <email address hidden> Tue, 08 Mar 2016 10:31:02 +0000

Changed in dlm (Ubuntu):
status: Triaged → Fix Released
Martin Pitt (pitti) wrote :

Ubuntu 15.10 (wily) will EOL in a week or two, not worth SRUing this any more.

Changed in dlm (Ubuntu Wily):
status: Triaged → Won't Fix
Martin Pitt (pitti) wrote :

Trusty SRU uploaded to review queue, thanks! Unsubscribing sponsors.

Changed in dlm (Ubuntu Trusty):
status: Triaged → In Progress

Hello Michael, or anyone else affected,

Accepted dlm into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dlm/4.0.1-0ubuntu1.14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in dlm (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Billy Olsen (billy-olsen) wrote :

Tested this today and the package can now be installed with the -proposed package.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dlm - 4.0.1-0ubuntu1.14.04.1

dlm (4.0.1-0ubuntu1.14.04.1) trusty; urgency=medium

  * Debianize init script to fix broken package install (LP: #1248054)
    - debian/patches/debianize_init_script.patch: source
      /lib/lsb/init-functions instead of /etc/rc.d/init.d/init-functions,
      use start-stop-daemon and remove rh_* specific function targets.
    - debian/local/modules-load.conf: create new file to define the kernel
      modules which need to be loaded at system start.
    - debian/rules: install the modules config file

 -- Billy Olsen <email address hidden> Wed, 13 Jan 2016 18:02:24 -0700

Changed in dlm (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for dlm has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers