Hide Forgot
Description of problem: ocf:heartbeat:VirtualDomain agent will not for some reason correctly parse domain name from xml file which will consequently disallow it from starting. The domain can be started manually. Version-Release number of selected component (if applicable): resource-agents-3.9.5-16.el7.x86_64 How reproducible: always Steps to Reproduce: 1. create lxc containers with lxc_autogen.sh from pacemaker-cts package. 2. create resource for that container 3. see it end up in FAILED state Actual results: resource not starting ending in FAILED state Expected results: resource started Additional info: # pcs resource show R-light-02-node01-lxc Resource: R-light-02-node01-lxc (class=ocf provider=heartbeat type=VirtualDomain) Attributes: hypervisor=lxc:/// config=/var/lib/libvirt/lxc/light-02-node01.xml force_stop=true Operations: monitor interval=60s (R-light-02-node01-lxc-monitor-interval-60s) # cat /var/lib/libvirt/lxc/light-02-node01.xml <domain type='lxc'> <name>light-02-node01</name> <memory>102400</memory> <os> <type>exe</type> <init>/var/lib/libvirt/lxc/light-02-node01/filesystem/launch-helper</init> </os> <vcpu>1</vcpu> <clock offset='utc' /> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <console type='pty'/> <emulator>/usr/libexec/libvirt_lxc</emulator> <interface type='network'> <mac address='52:54:00:11:47:4'/> <source network='default'/> </interface> <filesystem type='mount'> <source dir='/var/lib/libvirt/lxc/light-02-node01/filesystem/var/run'/> <target dir='/var/run'/> </filesystem> <filesystem type='mount'> <source dir='/var/lib/libvirt/lxc/light-02-node01/filesystem/usr/var/run'/> <target dir='/usr/var/run'/> </filesystem> </devices> </domain> # pcs resource debug-start R-light-02-node01-lxc Operation start for R-light-02-node01-lxc (ocf:heartbeat:VirtualDomain) returned 1 > stderr: ERROR: This is unexpected. Cannot determine domain name. # virsh -c lxc:/// define /var/lib/libvirt/lxc/light-02-node01.xml Domain light-02-node01 defined from /var/lib/libvirt/lxc/light-02-node01.xml # virsh -c lxc:/// start light-02-node01 Domain light-02-node01 started # virsh list Id Name State ---------------------------------------------------- 3 light-02-node01 running This problem exist in the VirtualDomain resource agent downloaded from upstream with: /usr/share/pacemaker/tests/cts/lxc_autogen.sh -d
There is an upstream patch related to this issue. https://github.com/davidvossel/resource-agents/commit/bd3b09252eedbeeab2635f82259714975702257e
I have verified that it is possible to create VirtualDomain resource with xml similar to the one in initial bug report with resource-agents-3.9.5-26.el7.x86_64. --- duck-03# cat /var/lib/libvirt/lxc/duck-03-node01.xml <domain type='lxc'> <name>duck-03-node01</name> <memory unit='KiB'>102400</memory> <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64'>exe</type> <init>/var/lib/libvirt/lxc/duck-03-node01/filesystem/launch-helper</init> </os> <clock offset='utc' /> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/libvirt/lxc/duck-03-node01/filesystem/var/run'/> <target dir='/var/run'/> </filesystem> <filesystem type='mount'> <source dir='/var/lib/libvirt/lxc/duck-03-node01/filesystem/usr/var/run'/> <target dir='/usr/var/run'/> </filesystem> <interface type='network'> <mac address='52:54:00:11:05:51'/> <source network='default'/> </interface> <console type='pty'> <target type='lxc' port='0'/> </console> </devices> </domain> duck-03# virt-xml-validate /var/lib/libvirt/lxc/duck-03-node01.xml /var/lib/libvirt/lxc/duck-03-node01.xml validates duck-03# pcs status Cluster name: STSRHTS30970 Last updated: Mon Mar 31 16:41:52 2014 Last change: Mon Mar 31 16:38:42 2014 via crm_resource on duck-03 Stack: corosync Current DC: duck-03 (1) - partition with quorum Version: 1.1.10-29.el7-368c726 2 Nodes configured 3 Resources configured Online: [ duck-03 ] Containers: [ duck-03-node01:R-duck-03-node01-lxc ] Full list of resources: virt-fencing (stonith:fence_ipmilan): Started duck-03 R-duck-03-node01-lxc (ocf::heartbeat:VirtualDomain): Started duck-03 PCSD Status: duck-03: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled duck-03# pcs resource show R-duck-03-node01-lxc Resource: R-duck-03-node01-lxc (class=ocf provider=heartbeat type=VirtualDomain) Attributes: hypervisor=lxc:/// config=/var/lib/libvirt/lxc/duck-03-node01.xml force_stop=true Meta Attrs: remote-node=duck-03-node01 Operations: start interval=0s timeout=90000 (R-duck-03-node01-lxc-start-timeout-90000) stop interval=0s timeout=90000 (R-duck-03-node01-lxc-stop-timeout-90000) monitor interval=10 timeout=30 (R-duck-03-node01-lxc-monitor-interval-10)
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.