Re: rgmanager vm.sh using virsh under RHEL5.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Le 3 nov. 2009 à 18:56, Lon Hohberger a écrit :

Federico kicked be in to finishing this... Want to give it a shot?
Effectively, it makes 'path' work with virsh - making virsh mode upgrade
compatible with 'xm' mode.  This means that we can really (actually)
deprecate 'xm' support.

Pay no attention to the fact that it uses a global var called 'xmlfile';
it doesn't do any config file parsing, so it still works with Xen and
libvirt (xml) style config files:

http://git.fedorahosted.org/git/?p=resource-agents.git;a=commit;h=1e42add4f2ec63d4c796d544118dfcccbd8a042b

It just splits up a OCF_RESKEY_path on ':' and looks for a file in each
directory named NAME or NAME.xml.  The requirement is obviously that
your config files need to be named after your VM.  If this is a problem,
you must use the full 'xmlfile' option.

-- Lon


I am currently testing this version of vm.sh that is handling xmlfile and path differently :

- if use_virth=0, use xm as before
- if path and xmlfile, ignore path and issue a warning (you should use xmlfile)
- if xmlfile only, use it
- if path, search for a file name under path or name.xml under path and set xmfile to this file

in the case of virsh, creation is handled using 'virsh create xmlfile' if xmlfile is not empty, or 'virsh create name' if there is no xmlfile/path configured.

The effect of this is that the config file must be :

- an xml file, with or without .xml extension, if xmlfile or path attribute is set
- else, a classic xen config file under /etc/xen

In order to stay compatible with current rgmanager configuration, we must ensure that use_virsh is set to 0 for vm that use classical xen conf files and path directive, else the vm fails to lauch because virsh create is not able to handle xen config file and virsh start, that is able to handle xen conf files, is not able to get the file from an other location than /etc/xen.

An other point is that if libvirtd is not running, the status returned by this vm.sh for a vm is always "indeterminate", so I have to launch it and to disable the default libvirt network because I really don't need it.

The last problem so far is that clusvcadm -M always end-up with an error although the migration is working correctly :

#clusvcadm -M vm:ns2 -m titan2
Trying to migrate vm:ns2 to titan2...Failure

# clustat 
Cluster Status for titan-cluster @ Thu Nov  5 10:07:24 2009
Member Status: Quorate

 Member Name                                                     ID   Status
 ------ ----                                                     ---- ------
 titan1                                                              1 Online, rgmanager
 titan2                                                              2 Online, Local, rgmanager
 qdisk1                                                              0 Online, Quorum Disk

 Service Name                                                     Owner (Last)                                                     State         
 ------- ----                                                     ----- ------                                                     -----         
 vm:ns2                                                           titan2                                                           started       

Looking at rgmanager log, I found this :

Nov  5 10:05:19 titan1 clurgmgrd[11231]: <notice> Migrating vm:ns2 to titan2 
Nov  5 10:05:19 titan1 clurgmgrd: [11231]: <debug> Using /data/vmconf/ns2.xml 
Nov  5 10:05:19 titan1 clurgmgrd: [11231]: <debug> virsh migrate --live ns2 xen:/// xenmigr://titan2/ 
Nov  5 10:05:27 titan1 clurgmgrd: [11231]: <err> Migrate ns2 to titan2 failed: 
Nov  5 10:05:27 titan1 clurgmgrd: [11231]: <err> error: Domain not found: xenUnifiedDomainLookupByName 
Nov  5 10:05:27 titan1 clurgmgrd[11231]: <notice> migrate on vm "ns2" returned 7 (unspecified) 
Nov  5 10:05:27 titan1 clurgmgrd[11231]: <err> Migration of vm:ns2 to titan2 failed; return code 7 

Nov  5 10:05:19 titan2 clurgmgrd[7484]: <debug> FW: Forwarding migrate request to 1 
Nov  5 10:05:24 titan2 clurgmgrd: [7484]: <debug> Using /data/vmconf/ns2.xml 
Nov  5 10:05:25 titan2 clurgmgrd[7484]: <notice> vm:ns2 is now running locally 
Nov  5 10:05:34 titan2 clurgmgrd: [7484]: <debug> Using /data/vmconf/ns2.xml 

This error is generated by libvirtd :

# virsh migrate --live ns2 xen:/// xenmigr://titan1/
error: Domain not found: xenUnifiedDomainLookupByName

# echo $?
1

Is it normal ? My initial goal to use virsh instead of xm was for better error handling during migrations...

Regards,

-- 

Alain RICHARD <mailto:alain.richard@xxxxxxxxxxx>

EQUATION SA <http://www.equation.fr/>

Tel : +33 477 79 48 00     Fax : +33 477 79 48 01

E-Liance, Opérateur des entreprises et collectivités,

Liaisons Fibre optique, SDSL et ADSL <http://www.e-liance.fr>



--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux