local policy-rc.d file preventing services from running in CI

Bug #1995954 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lpci
Fix Released
Low
Simone Pelosi

Bug Description

The presence of the following file is preventing services from running in CI:

/usr/local/sbin/policy-rc.d
:: #!/bin/sh
::
:: # policy-rc.d script for chroots.
:: # Copyright (c) 2007 Peter Palfrader <email address hidden>
:: # License: <weasel> MIT, if you want one.
::
:: while true; do
:: case "$1" in
:: -*) shift ;;
:: makedev) exit 0;;
:: *) echo "Not running services in chroot."; exit 101 ;;
:: esac
:: done

In my `.launchpad.yaml` I ran `rm /usr/local/sbin/policy-rc.d` before any other steps and was able to run full tests, which start postgresql and then a django web server.

Related branches

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thanks a lot for filing this issue and providing a workaround.

More info about that issue:
http://jpetazzo.github.io/2013/10/06/policy-rc-d-do-not-start-services-automatically/

Changed in launchpad:
status: New → Triaged
importance: Undecided → Critical
importance: Critical → Low
Revision history for this message
Colin Watson (cjwatson) wrote :

This isn't a consequence of running in Launchpad; that file is in the LXD image that lpcraft uses:

  $ lxc image export craft-com.ubuntu.cloud-buildd:focal/amd64
  Image exported successfully!
  $ tar tvf focal-server-cloudimg-amd64-lxd_combined.tar.gz | grep usr/local/sbin/policy-rc.d
  -rwxr-xr-x 0/0 298 2021-08-16 11:56 rootfs/usr/local/sbin/policy-rc.d

lpcraft should possibly just remove it; I agree it doesn't obviously make sense in this context. (We should test that it doesn't have weird consequences for what processes are run when the container created by lpcraft starts up, though.)

affects: launchpad → lpcraft
Simone Pelosi (pelpsi)
Changed in lpci:
assignee: nobody → Simone Pelosi (pelpsi)
Simone Pelosi (pelpsi)
Changed in lpci:
status: Triaged → Fix Committed
status: Fix Committed → In Progress
Simone Pelosi (pelpsi)
Changed in lpci:
status: In Progress → Fix Committed
Simone Pelosi (pelpsi)
Changed in lpci:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.