8000 PLM should delete cloud-init config disk image when detaching a vm · Issue #441 · ibmcb/cbtool · GitHub
[go: up one dir, main page]

Skip to content

PLM should delete cloud-init config disk image when detaching a vm #441

Open

Description

@rayx

When user detaches a vm, PLM calls lib/clouds/plm_cloud_ops.py:vmdestroy(), which does the following:

vmdestroy()
   -> _instance.destroy()
   -> _instance.undefine()
   -> self.vvdestroy(obj_attr_list)

vvdestroy() gets the volumes from obj_attr_list["volume_list"]. In the current implementation, it doesn't include cloud-init config disk image and hence leave the image file undeleted.


Another bug related to config disk image is that it's placed under /var/lib/libvirt, instead of /var/lib/libvirt/images. See log below:

cd /tmp/cb-centos-MYPLM-vm2-check; genisoimage -output cb-centos-MYPLM-vm2-check.iso -input-charset utf-8 -volid cidata -joliet -rock user-data meta-data; scp /tmp/cb-centos-MYPLM-vm2-check/cb-centos-MYPLM-vm2-check.iso root@100.88.37.170:/var/lib/libvirt/imagescb-centos-MYPLM-vm2-check.iso

A slash is missing between /var/lib/libvirt/images and cb-centos-MYPLM-vm2-check.iso in above command.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0