Skip to content

Instances not cleaned up on failure #171

@Metallion

Description

@Metallion

Problem

When I ran into #169, I noticed that instances are correctly being set to the FAILED state in OpenVDC but their files on disk are not cleaned up.

$ openvdc show i-0000000000
{
  "ID": "i-0000000000",
  "instance": {
    "id": "i-0000000000",
    "slave_id": "24afc003-a255-4f52-b146-9c8e71041b87-S0",
    "last_state": {
      "state": "FAILED",
      "created_at": "2017-05-23T07:22:43.246760347Z"
    },
...
# lxc-info -n i-0000000000
Name:           i-0000000000
State:          STOPPED

# ls /var/lib/lxc/i-0000000000
config  rootfs
# du -hs /var/lib/lxc/i-0000000000
422M    /var/lib/lxc/i-0000000000

The above files stay on disk forever.

Solution

If an instance fails, clean up its resources in a similar way that openvdc destroy <instance-id> does.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions