Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ceph+trash instantiation failure (ONe does not see snapshots in trash) #5446

Closed
7 tasks
Yenya opened this issue Jul 1, 2021 · 0 comments
Closed
7 tasks

Comments

@Yenya
Copy link

Yenya commented Jul 1, 2021

Description
When using the Trash feature of Ceph, OpenNebula does not account for images in trash, which leads to images in Error state after certain actions, which are not allowed when snapshots exist.

To Reproduce

  • Create a template referring to a new non-persistent image.
  • Instantiate the template
  • After the VM is running terminate it (hard)
  • Modify the image to be persistent this time
  • Instantiate the template again
  • The VM enters the Acive/Prolog_failure state (logs below)
  • Terminate the VM
  • The image now enters an Error state

Expected behavior
The new VM should either be up and running, or instantiation or moving to persistent state should fail ourtright.

Details

  • Affected Component: sunstone, scheduler
  • Hypervisor: KVM
  • Version: 5.12.0.3

Additional context

The log for failed VM is:

Thu Jul 1 11:48:35 2021 [Z0][TM][I]: Command execution failed (exit code: 16): /var/lib/one/remotes/tm/ceph/ln myhost:one/one-1316 mynode13:/var/lib/one//datastores/0/4750/disk.0 4750 100
Thu Jul 1 11:48:35 2021 [Z0][TM][E]: ln: Command " RBD="rbd --id libvirt"
Thu Jul 1 11:48:35 2021 [Z0][TM][I]:
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: rbd_rm_snap one/one-1316" failed: 2021-07-01 11:48:34.963 7fd9fffff700 -1 librbd::SnapshotUnprotectRequest: cannot unprotect: at least 2 child(ren) [68df2723501d23,68dfba7e246818] in pool 'one'
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: 2021-07-01 11:48:34.964 7fd9fffff700 -1 librbd::SnapshotUnprotectRequest: encountered error: (16) Device or resource busy
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: 2021-07-01 11:48:34.964 7fd9fffff700 -1 librbd::SnapshotUnprotectRequest: 0x5590ce86fd70 should_complete_error: ret_val=-16
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: 2021-07-01 11:48:34.966 7fd9fffff700 -1 librbd::SnapshotUnprotectRequest: 0x5590ce86fd70 should_complete_error: ret_val=-16
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: rbd: unprotecting snap failed: (16) Device or resource busy
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: 2021-07-01 11:48:35.091 7f39acff9700 -1 librbd::Operations: snapshot is protectedRemoving snap: 0
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: % complete...failed.
Thu Jul 1 11:48:35 2021 [Z0][TM][I]: rbd: snapshot 'snap' is protected from removal.

The problem is that OpenNebula does not see the child images created from non-persistent instantiation, and then moved to trash:

# rbd children one/one-1316
# rbd children one/one-1316 -a
one/one-1316-4748-0 (trash 68df2723501d23)

Thanks!

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@rsmontero rsmontero added this to the Release 6.2 milestone Jul 16, 2021
rsmontero added a commit to OpenNebula/docs that referenced this issue Aug 23, 2021
rsmontero pushed a commit that referenced this issue Aug 23, 2021
Snap might be undeletable due to child in trash
atodorov-storpool pushed a commit to storpool/one that referenced this issue Sep 1, 2021
Snap might be undeletable due to child in trash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants