Code review comment for lp:~zulcss/nova/nova-lxc

Revision history for this message
Soren Hansen (soren) wrote :

2011/3/15 Chuck Short <email address hidden>:
>> What's mapped_device? I'm not really sure what the assumptions here are. In
>> what format are you expecting these LXC images to be distributed?
>
> Ok well spotted. The assumption is that they are using a regular UEC image. LXC container support has already been added in the latest imgaes.

So only raw disk images are supported? Ok.

>>> +        raise exception.Error(_('Failed to mount filesystem: %s')
>>> +                             % err)
>>> +        _unlink_device(device, nbd)
>>> +
>>> +def destroy_container(target, instance, nbd=False):
>>> +    """Destroy the container once it terminates"""
>>> +    try:
>>> +        container_dir = '%s/rootfs' % target
>>> +        utils.execute('sudo', 'umount', container_dir)
>>> +    finally:
>>> +        image = os.path.join(FLAGS.instances_path, instance['name'], '' +
>> 'disk')
>>> +        out, err = utils.execute('sudo', 'losetup', '--find', '--show',
>> image)
>> I still think this will create another loopback device..
> It wont, its getting the information associated with the associated image

« Back to merge proposal