We do in fact already take steps to ensure we don't call this when using
LVM snapshots to avoid the exact issue that you've reported.  However,
it looks like in your case this is not working.  As you can see,
set_mount_device should be called for all chroot types /except/ lvm-
snapshot (where the dynamic_cast<> will fail)...

sbuild::chroot_block_device_base::set_device():

  /// @todo: This may not be appropriate for derived classes such as
  /// lvm_snapshot, since re-setting the device could overwrite the
  /// mount device.
  chroot_facet_mountable::ptr pmnt
    (get_facet<chroot_facet_mountable>());
#ifdef SBUILD_FEATURE_LVMSNAP
  if (!dynamic_cast<chroot_lvm_snapshot *>(this))
#endif
    pmnt->set_mount_device(this->device);

and preprocessed:

void
chroot_block_device_base::set_device (std::string const& device)
{
  if (!is_absname(device))
    throw error(device, DEVICE_ABS);

  this->device = device;



  chroot_facet_mountable::ptr pmnt
    (get_facet<chroot_facet_mountable>());

  if (!dynamic_cast<chroot_lvm_snapshot *>(this))

    pmnt->set_mount_device(this->device);
}

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

Title:
  schroot session recovery mounts $device, not $mount-device, for LVM
  snapshots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/schroot/+bug/1070008/+subscriptions

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

Reply via email to