Page MenuHomePhabricator

wmcs-image-create no longer works
Closed, InvalidPublic

Description

INFO:wmcs-image-create:Waiting for snapshot to finish saving...
INFO:wmcs-image-create:Waiting for snapshot to finish saving...
INFO:wmcs-image-create:Grabbing handle to snapshot data
INFO:wmcs-image-create:Downloading snapshot to /tmp/wmcs-image-createj38az52x/snapshot.img
INFO:wmcs-image-create:Disabling the puppet cron on the image
INFO:wmcs-image-create:Running command:
    ('modprobe', 'nbd')
    options: {}
INFO:wmcs-image-create:Running command:
    ('qemu-nbd', '--disconnect', '/dev/nbd0')
    options: {}
INFO:wmcs-image-create:Running command:
    ('qemu-nbd', '--format=raw', '--connect=/dev/nbd0', PosixPath('/tmp/wmcs-image-createj38az52x/snapshot.img'))
    options: {}
INFO:wmcs-image-create:Running command:
    ('mount', '/dev/nbd0p1', PosixPath('/tmp/wmcs-image-createj38az52x/mnt'))
    options: {}
mount: /tmp/wmcs-image-createj38az52x/mnt: special device /dev/nbd0p1 does not exist.
Traceback (most recent call last):
  File "/root/./wmcs-image-create", line 368, in <module>
    main(args)
  File "/root/./wmcs-image-create", line 342, in main
    disable_puppet_on_image(workdir=workdir, snapshot_path=snapshot_path, run=run)
  File "/root/./wmcs-image-create", line 262, in disable_puppet_on_image
    run("mount", "/dev/nbd0p1", mountpath)
  File "/root/./wmcs-image-create", line 92, in run
    subprocess.check_output(command, **kwargs)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('mount', '/dev/nbd0p1', PosixPath('/tmp/wmcs-image-createj38az52x/mnt'))' returned non-zero exit status 32.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It looks like the image does not have that partition anymore (it used to have at least one partition, that would generate the nbd0p1 device that is missing)

I retried after manually creating the mountpoint and it worked. I haven't tested at length but it may be as simple as adding a sleep between creating the mountpoint and mounting.

Pretty sure this should be close as 'invalid' but I will retest everything once the new bullseye build shows up on https://cloud.debian.org/images/cloud/bullseye/ (probably late next week).

I've used this recently without any trouble. Closing until/unless I can find a real problem.