Page MenuHomePhabricator

Diskimage fail on xvfb/systemd
Closed, ResolvedPublic

Description

Debug: Automatically imported contint::browsers from contint/browsers into production
Debug: importing '/puppet/modules/xvfb/manifests/init.pp' in environment production
Debug: Automatically imported xvfb from xvfb into production
Debug: importing '/puppet/modules/base/manifests/init.pp' in environment production
Debug: importing '/puppet/modules/base/manifests/service_unit.pp' in environment production
Debug: Automatically imported base::service_unit from base/service_unit into production
Error: This service unit lacks a custom sysvinit script at /puppet/modules/base/manifests/service_unit.pp:82 on node ****
Wrapped exception:
This service unit lacks a custom sysvinit script
Error: This service unit lacks a custom sysvinit script at /puppet/modules/base/manifests/service_unit.pp:82 on node ****
Puppet run failed. Exit code 1

While building a new image.

Details

Related Gerrit Patches:
integration/config : masterdib: override initsystem fact

Event Timeline

hashar created this task.Mar 9 2016, 9:05 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 9 2016, 9:05 AM
hashar updated the task description. (Show Details)Mar 9 2016, 9:06 AM
Paladox added a subscriber: Paladox.Mar 9 2016, 9:15 AM
hashar added a comment.Mar 9 2016, 9:22 AM

The call chain is:

  • xvfb class
  • base::service_unit
  • pick_initscript( $::initsystem )

initsystem is a fact provided by modules/base/lib/facter/initsystem.rb which detects it by looking for file existences such as /run/systemd/system.

I have made the build script to export FACTER_initsystem='systemd' and that got me past the error:

Notice: /Stage[main]/Xvfb/Base::Service_unit[xvfb]/File[/lib/systemd/system/xvfb.service]/ensure: created
Info: /Stage[main]/Xvfb/Base::Service_unit[xvfb]/File[/lib/systemd/system/xvfb.service]: Scheduling refresh of Service[xvfb]
Info: /Stage[main]/Xvfb/Base::Service_unit[xvfb]/File[/lib/systemd/system/xvfb.service]: Scheduling refresh of Exec[systemd reload for xvfb]

The cause is we run in a chroot so systemd is not really there and that breaks base_unit assumption that it is running. Ops advised one should use a container with systemd-nspawn instead of chroot.

Change 276128 had a related patch set uploaded (by Hashar):
dib: override initsystem fact

https://gerrit.wikimedia.org/r/276128

Mentioned in SAL [2016-03-09T10:29:43Z] <hashar> Nodepool: created new image and refreshing snapshot in attempt to get Xvfb running T129320 T128090

hashar closed this task as Resolved.Mar 9 2016, 10:37 AM
hashar claimed this task.

Disk image builds properly now. Fixed by exporting env variable FACTER_initsystem='systemd'

Change 276128 merged by jenkins-bot:
dib: override initsystem fact

https://gerrit.wikimedia.org/r/276128