[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-12-10 Thread Scott Moser
This bug is believed to be fixed in cloud-utils in version 0.31. If this
is still a problem for you, please make a comment and set the state back
to New

Thank you.

** Also affects: cloud-utils
   Importance: Undecided
   Status: New

** Changed in: cloud-utils
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-02-08 Thread Launchpad Bug Tracker
This bug was fixed in the package cloud-utils - 0.27-0ubuntu25

---
cloud-utils (0.27-0ubuntu25) xenial; urgency=medium

  * mount-image-callback: update partitions and settle on nbd mounts.
(LP: #1741300)

 -- Scott Moser   Fri, 26 Jan 2018 13:27:32 -0500

** Changed in: cloud-utils (Ubuntu Xenial)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-31 Thread Scott Moser
Verified. on fresh xenial guest in openstack. See below.

$ lsb_release -sc
xenial
$ cat /etc/cloud/build.info 
build_name: server
serial: 20180126

$ wget "$url" --progress=dot:giga -O xenial-server-cloudimg-
amd64-disk1.img

$ dpkg -S `which mount-image-callback`
cloud-image-utils: /usr/bin/mount-image-callback

$ dpkg-query --show cloud-image-utils
cloud-image-utils   0.27-0ubuntu25

$ sha256sum < xenial-server-cloudimg-amd64-disk1.img 
da7a59cbaf43eaaa83ded0b0588bdcee4e722d9355bd6b9bfddd01b2e7e372e2  -

$ cp -a xenial-server-cloudimg-amd64-disk1.img disk.img

$ sudo mount-image-callback -v disk.img -- true
waiting on pidfile for /dev/nbd0 in /sys/block/nbd0/pid
connected disk.img (qcow2) to /dev/nbd0. waiting for device.
partitioned disk.
mounted /dev/nbd0p1 via qemu-nbd /dev/nbd0
invoking: MOUNTPOINT=/tmp/mount-image-callback.XRd6Rk/mp true
cmd returned 0. unmounting /tmp/mount-image-callback.XRd6Rk/mp

$ sudo mount-image-callback --read-only disk.img -- \
 sh -c 'cd $MOUNTPOINT && cat etc/cloud/build.info'
mount: /dev/nbd0p1 is write-protected, mounting read-only
build_name: server
serial: 20180126


** Tags removed: verification-needed verification-needed-xenial
** Tags added: verification-done verification-done-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-31 Thread Chris J Arges
Hello Scott, or anyone else affected,

Accepted cloud-utils into xenial-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/cloud-
utils/0.27-0ubuntu25 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 on 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-xenial to verification-done-xenial. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-xenial. In either case, without details of
your testing we will not be able to proceed.

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

** Changed in: cloud-utils (Ubuntu Xenial)
   Status: Confirmed => Fix Committed

** Tags added: verification-needed verification-needed-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-26 Thread Scott Moser
** Description changed:

+ === Begin SRU Template ===
+ [Impact] 
+ mount-image-callback fails to mount images that are qcow2 formatted.
+ 
+ This function in mount-image-callback works in other Ubuntu releases
+ but not on xenial.  The function does succeed some times, but is
+ brittle.
+ 
+ The fix applied is also applied upstream, and consists mainly of adding
+ 
+  blockdev --rereadpt /dev/nbdX
+  udevadm settle
+ 
+ where 'nbdX' is the device that mount-image-callback has set up to
+ point to the file that is to be mounted.
+ 
+ These above added function should not be harmful in any case.
+ 
+ [Test Case]
+ In a fresh install:
+ 
+ $ sudo apt-get update -q && sudo apt-get install -qy cloud-image-utils
+ 
+ $ 
url=http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
+ $ wget "$url" -O xenial-server-cloudimg-amd64-disk1.img
+ $ cp -a xenial-server-cloudimg-amd64-disk1.img disk.img
+ 
+ $ sudo mount-image-callback -v disk.img true
+ waiting on pidfile for /dev/nbd0 in /sys/block/nbd0/pid
+ connected disk.img (qcow2) to /dev/nbd0. waiting for device.
+ 
+ [Regression Potential] 
+ The regression potential stems from additional udev events
+ caused by calling blockdev --rereadpt.
+ 
+ udev events should not cause unwanted side effects, but could.
+ 
+ [Other Info]
+ 
+ === End SRU Template ===
+ 
  On xenial only:
  
  $ wget 
http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
  $ cp -a xenial-server-cloudimg-amd64-disk1.img disk.img
  $ sudo mount-image-callback -v disk.img true
  waiting on pidfile for /dev/nbd0 in /sys/block/nbd0/pid
  connected disk.img (qcow2) to /dev/nbd0. waiting for device.
  partitioned disk.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  gave up on waiting for /dev/nbd0p1
  $ echo $?
  1
  
  This fix seems to work and should be safe.
  === modified file 'bin/mount-image-callback'
  --- bin/mount-image-callback2018-01-03 15:44:47 +
  +++ bin/mount-image-callback2018-01-04 17:21:23 +
  @@ -316,6 +316,8 @@
  fi
  
  i=0
  +   [ -b "$mdev" ] || blockdev --rereadpt $nbd ||
  +   { error "blockdev --rereadpt $nbd failed"; return 1; }
  while :; do
  [ -b "$mdev" ] && break
  i=$(($i+1))
  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: cloud-image-utils 0.27-0ubuntu24
  ProcVersionSignature: User Name 4.4.0-104.127-generic 4.4.98
  Uname: Linux 4.4.0-104-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2.14
  Architecture: amd64
  Date: Thu Jan  4 17:23:15 2018
  Ec2AMI: ami-0388
  Ec2AMIManifest: FIXME
  Ec2AvailabilityZone: nova
  Ec2InstanceType: m1.small
  Ec2Kernel: unavailable
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-utils
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-26 Thread Scott Moser
** Description changed:

  On xenial only:
  
  $ wget 
http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
  $ cp -a xenial-server-cloudimg-amd64-disk1.img disk.img
- $ sudo mount-image-callback -v disk.img truewaiting on pidfile for /dev/nbd0 
in /sys/block/nbd0/pid
+ $ sudo mount-image-callback -v disk.img true
+ waiting on pidfile for /dev/nbd0 in /sys/block/nbd0/pid
  connected disk.img (qcow2) to /dev/nbd0. waiting for device.
  partitioned disk.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  waiting for /dev/nbd0p1 part=1 to be ready.
  gave up on waiting for /dev/nbd0p1
  $ echo $?
  1
  
  This fix seems to work and should be safe.
  === modified file 'bin/mount-image-callback'
  --- bin/mount-image-callback2018-01-03 15:44:47 +
  +++ bin/mount-image-callback2018-01-04 17:21:23 +
  @@ -316,6 +316,8 @@
- fi
-  
- i=0
+ fi
+ 
+ i=0
  +   [ -b "$mdev" ] || blockdev --rereadpt $nbd ||
  +   { error "blockdev --rereadpt $nbd failed"; return 1; }
- while :; do
- [ -b "$mdev" ] && break
- i=$(($i+1))
+ while :; do
+ [ -b "$mdev" ] && break
+ i=$(($i+1))
  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: cloud-image-utils 0.27-0ubuntu24
  ProcVersionSignature: User Name 4.4.0-104.127-generic 4.4.98
  Uname: Linux 4.4.0-104-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2.14
  Architecture: amd64
  Date: Thu Jan  4 17:23:15 2018
  Ec2AMI: ami-0388
  Ec2AMIManifest: FIXME
  Ec2AvailabilityZone: nova
  Ec2InstanceType: m1.small
  Ec2Kernel: unavailable
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
-  TERM=screen
-  PATH=(custom, no user)
-  XDG_RUNTIME_DIR=
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  TERM=screen
+  PATH=(custom, no user)
+  XDG_RUNTIME_DIR=
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: cloud-utils
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-07 Thread Scott Moser
** Changed in: cloud-utils (Ubuntu Bionic)
   Importance: Undecided => Medium

** Changed in: cloud-utils (Ubuntu Artful)
   Importance: Undecided => Medium

** Changed in: cloud-utils (Ubuntu Xenial)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-05 Thread Launchpad Bug Tracker
** Branch linked: lp:cloud-utils

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-04 Thread Launchpad Bug Tracker
** Branch linked: lp:~smoser/cloud-utils/trunk.1741096

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-04 Thread Scott Moser
** Changed in: cloud-utils (Ubuntu Xenial)
   Status: Fix Released => Confirmed

** Changed in: cloud-utils (Ubuntu Bionic)
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1741300] Re: mount-image-callback fails on qcow image on xenial

2018-01-04 Thread Scott Moser
artful and bionic are 'fix-released' as some magic in udev/systemd makes it 
work.
It does seem though that maybe running blockdev makes sense there also though.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741300

Title:
  mount-image-callback fails on qcow image on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1741300/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs