'bosh cck' can't delete vm reference completely
bosh version: 265.2.0
Steps to reproduce the problem:
- Run
bosh delete-vm CIDto delete a vm from IaaS. - Run
bosh cckand apply the option4: Delete VM reference
# Type Description
48 missing_vm VM for 'diego-cell/d8377294-bd69-45f5-8f0e-4e98e78753ac (0)' missing.
1 problems
1: Skip for now
2: Recreate VM without waiting for processes to start
3: Recreate VM and wait for processes to start
4: Delete VM reference
VM for 'diego-cell/d8377294-bd69-45f5-8f0e-4e98e78753ac (0)' missing. (1): 4
Continue? [yN]: y
- Run
bosh cckagain but it still reports the same problem.
After checking bosh vms and bosh instances, the missing vm is not in bosh vms but still listed in bosh instances. Further checking bosh db and found the vm reference is only deleted from vms table but still exists in instances table. bosh cck scans the instances table so the problem prompts.
/cc @mattcui
@gu-bin this is working as expected. delete-vm and "delete vm reference" are only expected to delete "vm". we want to maintain instance model to make sure that bosh knows that this instance doesnt have associated vm, hence bosh should bring it back via resurrection (if enabled). instance model itself represents actually a set of resources: vm + persistent disk.