| Summary: | VirtualDomain will not start lxc container that is shut off | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | michal novacek <mnovacek> |
| Component: | resource-agents | Assignee: | David Vossel <dvossel> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Cluster QE <mspqa-list> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | agk, cluster-maint, fdinitto, mnovacek |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | resource-agents-3.9.5-16.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 12:53:48 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
michal novacek
2013-10-07 15:12:47 UTC
libvirt domains managed by the VirtualDomain agent shouldn't be modified outside of the VirtualDomain agent. The VirtualDomain agent starts domains with the 'virsh create <domain.xml>' command. Domains initialized with this command are undefined on shutdown automatically. This means as long as this agent is used, no cluster lxc container should be defined anywhere except on the cluster it is currently active on. We do need to be able to handle the case where a user defines the domain outside of the agent. I believe the only way to handle this correctly is to undefine the domain on start, then enable the domain again using 'virsh create'. I'll write up a patch. related upstream patch. https://github.com/davidvossel/resource-agents/commit/f00dcaf19467e3d96d9790d386b860b53ca381f9
I have verified that VirtualDomain resource can be enabled and starts correctly
after being disabled in pacemaker after the domain has been started outside of
pacemaker in resource-agents-3.9.5-26.el7.x86_64.
----
[root@duck-03 ~]# pcs resource
R-duck-03-node01-lxc (ocf::heartbeat:VirtualDomain): Started
[root@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)
[root@duck-03 ~]# pcs resource disable R-duck-03-node01-lxc
[root@duck-03 ~]# pcs resource
R-duck-03-node01-lxc (ocf::heartbeat:VirtualDomain): Stopped
[root@duck-03 ~]# virsh -c lxc:/// list
Id Name State
----------------------------------------------------
[root@duck-03 ~]# virsh -c lxc:/// list --all
Id Name State
----------------------------------------------------
[root@duck-03 ~]# virsh -c lxc:/// define /var/lib/libvirt/lxc/duck-03-node01.xml
Domain duck-03-node01 defined from /var/lib/libvirt/lxc/duck-03-node01.xml
[root@duck-03 ~]# pcs resource enable R-duck-03-node01-lxc
[root@duck-03 ~]# pcs resource
R-duck-03-node01-lxc (ocf::heartbeat:VirtualDomain): Started
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. |