RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1016140 - VirtualDomain will not start lxc container that is shut off
Summary: VirtualDomain will not start lxc container that is shut off
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: resource-agents
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Vossel
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 15:12 UTC by michal novacek
Modified: 2015-07-27 15:00 UTC (History)
4 users (show)

Fixed In Version: resource-agents-3.9.5-16.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:53:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1242558 0 urgent CLOSED journal: cannot remove config /etc/libvirt/qemu/tux1.xml: Operation not permitted 2021-02-22 00:41:40 UTC

Internal Links: 1242558

Description michal novacek 2013-10-07 15:12:47 UTC
Description of problem:
VirtualDomain resource agent will not start lxc container that is shut off only (instead of not being defined at all for virsh) after disabling the resource. 

Version-Release number of selected component (if applicable):
resource-agents-3.9.5-15.el7.x86_64
pacemaker-1.1.10-15.el7.x86_64
pacemaker-cts-1.1.10-15.el7.x86_64

How reproducible: always

Steps to Reproduce:
1. have lxc container generated by lxc_autogen.sh
2. start it as a resource v-lxc1 and verify that it runs and is recognized as
	remote node lxc1 
3. pcs resource disable v-lxc1
4. virsh -c lxc:/// define /var/lib/pacemaker/cts/lxc/lxc1.xml 
5. pcs resource enable v-lxc1

Actual results: resource will never start 

Expected results: started resource

Additional info:
It will start correctly that lxc container that is not defined in virsh.

Selinux is off, virtual containers are created with pacemaker-cts lxc_autogen.sh.

Comment 2 David Vossel 2013-10-07 17:31:05 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.

Comment 6 michal novacek 2014-03-28 14:42:17 UTC
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

Comment 7 Ludek Smid 2014-06-13 12:53:48 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.