~canonical-launchpad-branches/launchpad-buildd/trunk

« back to all changes in this revision

Viewing changes to lpbuildd/target/lxd.py

  • Committer: Ubuntu One Auto Copilot
  • Author(s): Robert C Jennings
  • Date: 2019-11-21 18:22:10 UTC
  • mfrom: (398.1.1 launchpad-buildd)
  • Revision ID: otto-copilot@canonical.com-20191121182210-q91jcdpkupw1tm62
LXD: Create dm-X devices to address kpartx hangs (LP: #1852518)

On focal kpartx looks for dm devices and hangs in their absense.

Merged from https://code.launchpad.net/~rcj/launchpad-buildd/lp1852518/+merge/375529

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
                ["mknod", "-m", "0660", "/dev/loop%d" % minor,
447
447
                 "b", "7", str(minor)])
448
448
 
 
449
        # Create dm-# devices.  On focal kpartx looks for dm devices and hangs
 
450
        # in their absense.
 
451
        for minor in range(8):
 
452
            self.run(
 
453
                ["mknod", "-m", "0660", "/dev/dm-%d" % minor,
 
454
                 "b", "251", str(minor)])
 
455
 
449
456
        # XXX cjwatson 2017-09-07: With LXD < 2.2 we can't create the
450
457
        # directory until the container has started.  We can get away with
451
458
        # this for the time being because snapd isn't in the buildd chroots.