Bug #4688

onevm disk-attach results in LCM state HOTPLUG_PROLOG_POWEROFF

Added by Stefan Kooman over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:07/26/2016
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:worksforme Pull request:
Affected Versions:OpenNebula 5.0

Description

onevm disk-attach results in LCM state HOTPLUG_PROLOG_POWEROFF. Example:

onevm disk-detach 194 4

Jul 26 17:42:28 test-oned2 oned3315: [Z0][ReM][D]: Req:816 UID:0 VirtualMachineDetach invoked , 194, 4
Jul 26 17:42:28 test-oned2 oned3315: [VM 194][Z0][VM][I]: New state is ACTIVE
Jul 26 17:42:28 test-oned2 oned3315: [VM 194][Z0][VM][I]: New LCM state is HOTPLUG_EPILOG_POWEROFF
Jul 26 17:42:28 test-oned2 oned3315: [Z0][ReM][D]: Req:816 UID:0 VirtualMachineDetach result SUCCESS, 194
Jul 26 17:42:28 test-oned2 oned3315: [Z0][TM][D]: Message received: TRANSFER SUCCESS 194 -
Jul 26 17:42:28 test-oned2 oned3315: [VM 194][Z0][LCM][I]: VM Disk successfully detached.
Jul 26 17:42:28 test-oned2 oned3315: [VM 194][Z0][VM][I]: New state is POWEROFF
Jul 26 17:42:28 test-oned2 oned3315: [VM 194][Z0][VM][I]: New LCM state is LCM_INIT

onevm disk-attach 194 --image 130

Jul 26 17:43:27 test-oned2 oned3315: [Z0][ReM][D]: Req:7888 UID:0 VirtualMachineAttach invoked , 194, "DISK = [ IMAGE_ID = ..."
Jul 26 17:43:27 test-oned2 oned3315: [Z0][ReM][D]: Req:8032 UID:8 SystemVersion invoked
Jul 26 17:43:27 test-oned2 oned3315: [Z0][ReM][D]: Req:8032 UID:8 SystemVersion result SUCCESS, "5.0.2"
Jul 26 17:43:27 test-oned2 oned3315: [VM 194][Z0][VM][I]: New state is ACTIVE
Jul 26 17:43:27 test-oned2 oned3315: [VM 194][Z0][VM][I]: New LCM state is HOTPLUG_PROLOG_POWEROFF
Jul 26 17:43:27 test-oned2 oned3315: [Z0][ReM][D]: Req:7888 UID:0 VirtualMachineAttach result SUCCESS, 194

The actual result is succesful ... but the LCM state stays in HOTPLUG_PROLOG_POWEROFF .... and our script keeps waiting until state changes to POWEROFF which never happens. This impacts SNAPSHOT_FLATTEN functionality (disk detach, snapshot flatten, disk attach).

History

#1 Updated by Carlos Martín over 4 years ago

Hi,

This must be a problem with the driver operation. The life-cycle seems to work.
The success message you see is actually the API request success, meaning the request to start the disk-attach action has been accepted. The VM will stay in HOTPLUG_PROLOG_POWEROFF until the driver returns failure or success.

If the action does not finish, it must be blocked for some reason or the script crashed.

What VM and TM drivers are you using?

#2 Updated by Stefan Kooman over 4 years ago

VM_MAD="kvm"
TM_MAD="qcow2" (image datastore)
TM_MAD="shared" (system datastore)

#3 Updated by Stefan Kooman over 4 years ago

for some weird reason the nfs share on this (test) frontend was not accessible ... and the driver was basically waiting (I guess) for a IO operation to complete which never happened ... and hence the driver never returned a success/failure. After fixing the nfs issue the operation works fine again.

@Carlos: Thanks for pointing me in the right direction! You can close this "bug" ... won't fix works for me ;).

#4 Updated by Carlos Martín over 4 years ago

  • Status changed from Pending to Closed
  • Resolution set to worksforme

Glad you solved it.

Also available in: Atom PDF