one icon indicating copy to clipboard operation
one copied to clipboard

Locked VMs fail to migrate during host fencing

Open tuxtobin opened this issue 5 years ago • 3 comments

Description When a VM is locked it fails to migrate to another host. The ft/host_error.rb script successful runs with the action set to migrate (-m) the VM but the rescheduling fails. The VM then enters an UNKNOWN LCM state.

To Reproduce

  1. Enable host fencing (https://docs.opennebula.org/5.8/advanced_components/ha/ftguide.html?highlight=fencing#host-failures) with it configured to migrate the VMs.
  2. Locate a host with a running VM.
  3. Force host to enter an ERROR state - stopping sshd is good for this.
  4. Wait.
  5. In oned.log ... Wed Feb 26 11:27:34 2020 [Z0][ReM][D]: Req:1632 UID:0 one.vm.info result SUCCESS, "<VM><ID>1096</ID><UI..." Wed Feb 26 11:27:34 2020 [Z0][ReM][D]: Req:7600 UID:0 IP:127.0.0.1 one.vm.action invoked , "resched", 1096 Wed Feb 26 11:27:34 2020 [Z0][ReM][E]: Req:7600 UID:0 one.vm.action result FAILURE [one.vm.action] User[0] : VM is locked. [1096].

Expected behavior The VM to be migrated, as suggested by the documentation (https://docs.opennebula.org/5.8/operation/users_groups_management/chmod.html#locking-resources)

Details

  • Affected Component: Scheduler
  • Hypervisor: KVM
  • Version: 5.8.5

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

tuxtobin avatar Feb 26 '20 18:02 tuxtobin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. The OpenNebula Dev Team

stale[bot] avatar Jun 18 '21 23:06 stale[bot]

Not sure what we should do here. It's correct that the locked VM can't be migrated. So maybe update the ft/host_error.rb script to unlock, migrate and lock again? Or just update the docs, that the script doesn't work for locked VMs?

paczerny avatar Jul 10 '21 19:07 paczerny

For 6.2 we add the warning about locked VMs For 6.2.1 we'll automatically call lock/unlock

rsmontero avatar Sep 09 '21 14:09 rsmontero