[one-users] "Wrong state to perform action" when onevm livemigrate'ing a RUNNING machine ?

Carlos Martín Sánchez cmartin at opennebula.org
Tue Sep 25 09:47:11 PDT 2012


Hi Steffen,

Looks like you are right, a migration failed and somehow left the history
records corrupted.

If you only need to be able to migrate, change the reason of history 7 to
'<REASON>3</REASON>'. To do so, stop opennebula, do a DB backup, and update
the body column of the history table. As I said, do this for history with
SEQ 7.

The history seq. 8 is completely uninitialized, all the timestamps are 0,
and that will show strangely in the accounting. But if you just need to
migrate, changing the history 7 reason should be enough.

Regards
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>



On Tue, Sep 25, 2012 at 10:05 AM, Steffen Neumann <sneumann at ipb-halle.de>wrote:

> Hi,
>
> sorry for replying to self. I found a thread from august this year,
> http://comments.gmane.org/gmane.comp.distributed.opennebula.user/7554
> which I missed in my earlier searches, where Shantanu Pavgi suggests
> to clean the history and vm_pool tables.
>
> To avoid messing this up, which entries in history do I sql delete ?
>  SEQ        HOSTNAME REASON           START        TIME       PTIME
>    0      node-blc28   user  08/15 13:07:13 40 02:47:35 00 00:00:15
>    1     node-cc08d5   none  09/24 15:54:48 00 17:40:19 00 00:00:00
>    2      node-blc28   user  09/24 15:54:48 00 00:01:22 00 00:00:00
>    3     node-cc08d5   none  09/24 15:56:10 00 17:38:57 00 00:00:00
>    4      node-blc28   user  09/24 15:56:10 00 00:20:27 00 00:00:00
>    5      node-blc07   none  09/24 16:16:37 00 17:18:30 00 00:00:00
>    6      node-blc28   user  09/24 16:16:37 00 00:28:09 00 00:00:00
>    7      node-blc02   none  09/24 16:44:46 00 16:50:21 00 00:00:00
>    8      node-blc28   none               - 268 07:35:0 00 00:00:00
>
> So do I delete just SEQ 7 ?
>
> What do I replace in VM_POOL ?
> Here the <HISTORY> in column body seems to list only <SEQ>8</SEQ> ?
>
> Yours,
> Steffen
>
>
> <VM><ID>1004</ID><UID>0</UID><GID>0</GID><UNAME>oneadmin</UNAME><GNAME>oneadmin</GNAME><NAME>one-1004</NAME><LAST_POLL>1348559422</LAST_POLL><STATE>3</STATE><LCM_STATE>3</LCM_STATE><STIME>1345028806</STIME><ETIME>0</ETIME><DEPLOY_ID>one-1004</DEPLOY_ID><MEMORY>33554432</MEMORY><CPU>431</CPU><NET_TX>2015720310</NET_TX><NET_RX>559760171</NET_RX><TEMPLATE><CPU><![CDATA[8.0]]></CPU><DISK><DISK_ID><![CDATA[0]]></DISK_ID><FILES><![CDATA[/cumulus/goldenimages/suse113/init.sh]]></FILES><READONLY><![CDATA[no]]></READONLY><SOURCE><![CDATA[/cumulus/goldenimages/suse113/suse113.img]]></SOURCE><TARGET><![CDATA[hda]]></TARGET></DISK><FEATURES><ACPI><![CDATA[yes]]></ACPI></FEATURES><GRAPHICS><LISTEN><![CDATA[0.0.0.0]]></LISTEN><PORT><![CDATA[6904]]></PORT><TYPE><![CDATA[vnc]]></TYPE></GRAPHICS><MEMORY><![CDATA[32768]]></MEMORY><NAME><![CDATA[one-1004]]></NAME><NIC><BRIDGE><![CDATA[br0]]></BRIDGE><IP><![CDATA[10.20.2.30]]></IP><MAC><![CDATA[02:00:0a:14:02:1e]]></MAC><MODEL><![CDATA[virtio]]>
>  </MODEL><NETWORK><![CDATA[VNET202]]></NETWORK><NETWORK_ID><![CDATA[3]]></NETWORK_ID></NIC><NIC><BRIDGE><![CDATA[br1]]></BRIDGE><IP><![CDATA[10.21.2.30]]></IP><MAC><![CDATA[02:00:0a:15:02:1e]]></MAC><MODEL><![CDATA[virtio]]></MODEL><NETWORK><![CDATA[VNET212]]></NETWORK><NETWORK_ID><![CDATA[2]]></NETWORK_ID></NIC><OS><ARCH><![CDATA[x86_64]]></ARCH><BOOT><![CDATA[hd]]></BOOT></OS><RAW><DATA><![CDATA[<devices><serial
> type="pty"><source path="/dev/pts/5"/><target port="0"/></serial><console
> type="pty" tty="/dev/pts/5">
> <source path="/dev/pts/5"/><target
>
> port="0"/></console></devices>]]></DATA><TYPE><![CDATA[kvm]]></TYPE></RAW><TEMPLATE_ID><![CDATA[1]]></TEMPLATE_ID>
>
> <VCPU><![CDATA[8]]></VCPU><VMID><![CDATA[1004]]></VMID></TEMPLATE><HISTORY_RECORDS>
>
> <HISTORY><SEQ>8</SEQ><HOSTNAME>node-blc28</HOSTNAME><VM_DIR>/cumulus/one/var/</VM_DIR><HID>37</HID><STIME>0</STIME><ETIME>0</ETIME><VMMMAD>vmm_kvm</VMMMAD><TMMAD>tm_shared</TMMAD><PSTIME>0</PSTIME><PETIME>0</PETIME><RSTIME>0</RSTIME><RETIME>0</RETIME><ESTIME>0</ESTIME><EETIME>0</EETIME><REASON>0</REASON></HISTORY></HISTORY_RECORDS>
> </VM>
>
>
>
> On Tue, 2012-09-25 at 09:44 +0200, Steffen Neumann wrote:
> > Hi,
> >
> > I have a working one-3.0 cluster, and for upgrading to 3.6
> > I need to move around VMs. The cluster has been up and
> > running for about a year now.
> >
> > At least two VMs on one host are stubbornly refusing
> > to live-migrate:
> >
> > oneadmin at cumulus:~$ onevm livemigrate 1004 55
> > [VirtualMachineDeploy] Wrong state to perform action
> >
> > As the machine is RUNNING, I can ssh into it,
> > I am a bit at a loss here. Only strange thing is
> > that current VM monitoring reports "Net_TX: -1"
> > which happens since August 17th.
> >
> > Any idea ?
> >
> > <jfontan> sneumann: can you send onevm show of that machine to the
> mailing list?
> > <jfontan> sneumann: there could be something wrong with the history and
> my pals may know what it is
> >
> > onehost list:
> >   ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM
> STAT
> >   55 node-blc02           3   2400   2393      0  94.6G  71.6G  46.6G
>   on
> >   37 node-blc28           2   2400    766    800  94.6G  48.7G  30.6G
>   on
> >   ...
> >
> > onevm show 1004:
> > VIRTUAL MACHINE 1004 INFORMATION
> > ID                  : 1004
> > NAME                : one-1004
> > USER                : oneadmin
> > GROUP               : oneadmin
> > STATE               : ACTIVE
> > LCM_STATE           : RUNNING
> > HOSTNAME            : node-blc28
> > START TIME          : 08/15 13:06:46
> > END TIME            : -
> > DEPLOY ID           : one-1004
> >
> > VIRTUAL MACHINE MONITORING
> > USED MEMORY         : 33554432
> > NET_TX              : 2015720310
> > USED CPU            : 431
> > NET_RX              : 559760171
> >
> > VIRTUAL MACHINE TEMPLATE
> > CPU=8.0
> > DISK=[
> >   DISK_ID=0,
> >   FILES=/cumulus/goldenimages/suse113/init.sh,
> >   READONLY=no,
> >   SOURCE=/cumulus/goldenimages/suse113/suse113.img,
> >   TARGET=hda ]
> > FEATURES=[
> >   ACPI=yes ]
> > GRAPHICS=[
> >   LISTEN=0.0.0.0,
> >   PORT=6904,
> >   TYPE=vnc ]
> > MEMORY=32768
> > NAME=one-1004
> > NIC=[
> >   BRIDGE=br0,
> >   IP=10.20.2.30,
> >   MAC=02:00:0a:14:02:1e,
> >   MODEL=virtio,
> >   NETWORK=VNET202,
> >   NETWORK_ID=3 ]
> > NIC=[
> >   BRIDGE=br1,
> >   IP=10.21.2.30,
> >   MAC=02:00:0a:15:02:1e,
> >   MODEL=virtio,
> >   NETWORK=VNET212,
> >   NETWORK_ID=2 ]
> > OS=[
> >   ARCH=x86_64,
> >   BOOT=hd ]
> > RAW=[
> >   DATA="<devices><serial type=\"pty\"><source
> path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\"
> tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
> port=\"0\"/></console></devices>",
> >   TYPE=kvm ]
> > TEMPLATE_ID=1
> > VCPU=8
> > VMID=1004
> >
> > VIRTUAL MACHINE HISTORY
> >  SEQ        HOSTNAME REASON           START        TIME       PTIME
> >    0      node-blc28   user  08/15 13:07:13 40 02:47:35 00 00:00:15
> >    1     node-cc08d5   none  09/24 15:54:48 00 17:40:19 00 00:00:00
> >    2      node-blc28   user  09/24 15:54:48 00 00:01:22 00 00:00:00
> >    3     node-cc08d5   none  09/24 15:56:10 00 17:38:57 00 00:00:00
> >    4      node-blc28   user  09/24 15:56:10 00 00:20:27 00 00:00:00
> >    5      node-blc07   none  09/24 16:16:37 00 17:18:30 00 00:00:00
> >    6      node-blc28   user  09/24 16:16:37 00 00:28:09 00 00:00:00
> >    7      node-blc02   none  09/24 16:44:46 00 16:50:21 00 00:00:00
> >    8      node-blc28   none               - 268 07:35:0 00 00:00:00
> >
> >
> > oned.log:
> > Tue Sep 25 09:35:37 2012 [ReM][D]: HostPoolInfo method invoked
> > Tue Sep 25 09:35:37 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
> > Tue Sep 25 09:35:37 2012 [ReM][D]: AclInfo method invoked
> > Tue Sep 25 09:35:50 2012 [ReM][D]: VirtualMachineInfo method invoked
> > Tue Sep 25 09:35:50 2012 [ReM][D]: VirtualMachineDeploy method invoked
> > Tue Sep 25 09:35:50 2012 [ReM][E]: [VirtualMachineDeploy] Wrong state to
> perform action
> >
> >
> > 1004/vm.log:
> > Tue Sep 25 09:30:22 2012 [VMM][D]: Monitor Information:
> >         CPU   : 431
> >         Memory: 33554432
> >         Net_TX: -1
> >         Net_RX: -1
> >
> >
>
> --
> IPB Halle                    AG Massenspektrometrie & Bioinformatik
> Dr. Steffen Neumann          http://www.IPB-Halle.DE
> Weinberg 3                   http://msbi.bic-gh.de
> 06120 Halle                  Tel. +49 (0) 345 5582 - 1470
>                                   +49 (0) 345 5582 - 0
> sneumann(at)IPB-Halle.DE     Fax. +49 (0) 345 5582 - 1409
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120925/0bd01600/attachment.htm>


More information about the Users mailing list