Description of problem: When the administrator makes a mistake while moving files around, and sets the "name" parameter in cluster.conf to a value different from the "name" parameter in the guest configuration, rgmanager starts the guest on multiple cluster nodes, causing filesystem corruption. Version-Release number of selected component (if applicable): rgmanager-2.0.46-1.el5 How reproducible: always Steps to Reproduce: 1. outside of the cluster, create a Xen guest named "foo" 2. move the Xen configuration file "foo" from /etc/xen to your shared storage, and call the target file "bar"; leave the name parameter inside the file set to "foo" 3. add the virtual machine in cluster.conf, setting the name to "bar" 4. activate the "bar" cluster service Actual results: rgmanager starts the guest on node A. The next status call for guest "bar" returns 1, so node A tries to restart the guest. This fails because Xen sees that guest "foo" is already running. The service is relocated to another cluster node, and the virtual machine is started on multiple hosts in parallel. Expected results: It would be nice if vm.sh checked the name parameter in the Xen configuration file before starting the guest. While this is a mistake made by the administrator, the consequences are quite severe.
Right, so either we need to: 1. enforce that the config file name is the same as the guest name 2. ignore the config file name and use the name parameter as provided by either the xm configuration file or the libvirt xml file I think #2 is the right solution here. So vm.sh should parse the xm or libvirt config file to extract the vm name instead of assuming vm name is the same as filename.
Virsh does #2. Therefore, there is no work to be done on this bugzilla. [root@marge xen]# mv r5filebacked1 r5furious_awesomeness_config_file_name [root@marge xen]# virsh list Id Name State ---------------------------------- 0 Domain-0 running 16 r5filebacked0 idle [root@marge xen]# virsh list --all Id Name State ---------------------------------- 0 Domain-0 running 16 r5filebacked0 idle - r51pv2 shut off - r5filebacked1 shut off - r5filebacked2 shut off - r5filebacked3 shut off - r5filebacked4 shut off - rendertest shut off - rhel4domU0 shut off [root@marge xen]# virsh start r5filebacked1 Domain r5filebacked1 started [root@marge xen]# virsh destroy r5filebacked1 Domain r5filebacked1 destroyed [root@marge xen]# xm create r5filebacked1 Error: Unable to open config file: r5filebacked1 *** This bug has been marked as a duplicate of bug 412911 ***
Making vm.sh parse all domain names in the path spec is going to be inefficient and error-prone; therefore, users wishing to use filenames which differ from their domain name must use virsh.