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 1462248 - pcs should not allow or at least warn about a bundle with no IP address having an inner resource
Summary: pcs should not allow or at least warn about a bundle with no IP address havin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Ondrej Mular
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-16 13:30 UTC by Tomas Jelinek
Modified: 2018-10-30 08:06 UTC (History)
9 users (show)

Fixed In Version: pcs-0.9.165-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1447951
: 1578898 (view as bug list)
Environment:
Last Closed: 2018-10-30 08:05:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3066 0 None None None 2018-10-30 08:06:10 UTC

Description Tomas Jelinek 2017-06-16 13:30:15 UTC
+++ This bug was initially created as a clone of Bug #1447951 +++

Description of problem:
If a bundle resource is created without an IP address and a primitive resource is put inside the bundle, the bundle and the primitive is not shown in crm_mon and crm_mon --xml output. crm_verify shows why:
# crm_verify --live-check --verbose
   error: container_unpack:     Cannot control http-bundle inside dummy1
without either ip-range-start or control-port
   error: unpack_resources:     Failed unpacking bundle http-bundle
Errors found during check: config not valid

It would be nice to see these resources in crm_mon output.


Version-Release number of selected component (if applicable):
pacemaker-1.1.16-8.el7.x86_64


How reproducible:
always, easily


Steps to Reproduce:
1. create a bundle without an IP
2. put a primitive into the bundle


Actual results:
The bundle is missing in crm_mon and crm_mon --xml output. 


Expected results:
The bundle is present in crm_mon --xml output. Failed actions are shown in crm_mon output.


Additional info:
Expected results seem to be consistent with a misconfigured primitive (tested with a primitive based on a nonexistent resource agent).

--- Additional comment from Ken Gaillot on 2017-05-04 10:42:41 EDT ---

This will be considered in the 7.5 timeframe.

--- Additional comment from Andrew Beekhof on 2017-05-04 20:09:23 EDT ---

I agree invalid resources (not just bundles) should be in the xml output, I'm less sure about the normal output - unless as a "invalid resources detected, use crm_verify" line somewhere.

(Consider that it may be invalid because there is no id)

> Expected results seem to be consistent with a misconfigured primitive (tested with a primitive based on a nonexistent resource agent).

Thats a very different kind of invalid resource.

We would not want resources that cannot even be unpacked to show up in the "failed operations" section of the output.

--- Additional comment from Tomas Jelinek on 2017-05-05 03:07:16 EDT ---

This is the use case I am concerned about:
1) The user creates an invalid resource.
2) The user runs pcs status / crm_mon.
3) There is no sign of the resource created in step 1.
4) The user is confused.

Consider some time may pass between step 1 and two.

As long as crm_mon shows there is something wrong, by any means possible, I am fine with that.

Comment 1 Tomas Jelinek 2017-06-16 13:31:53 UTC
When putting a resource into a bundle, pcs should check the bundle has an IP address defined. Similar check should be done when removing an IP address in the bundle update command.

Comment 2 Ken Gaillot 2017-06-16 14:24:42 UTC
(In reply to Tomas Jelinek from comment #1)
> When putting a resource into a bundle, pcs should check the bundle has an IP
> address defined. Similar check should be done when removing an IP address in
> the bundle update command.

IP address or control port. Pacemaker can reach inside the container if it using the host's network (without its own IP address) and has pacemaker remote running on a distinct port.

Comment 3 Andrew Beekhof 2017-06-19 01:10:38 UTC
> It would be nice to see these resources in crm_mon output.

I disagree, it's not the right tool (clearly, since we have one for this purpose).
At most, a catch-all "You should go and run crm_verify now" could be added.

Comment 6 Ivan Devat 2018-06-22 12:07:04 UTC
After Fix:

[ant ~] $ rpm -q pcs pcs-snmp
pcs-0.9.165-1.el7.x86_64
pcs-snmp-0.9.165-1.el7.x86_64

[ant ~] $ pcs resource bundle create B1 container docker image=pcs:test network host-netmask=24
[ant ~] $ pcs resource create R ocf:heartbeat:Dummy bundle B1
Error: Unknown report: RESOURCE_IN_BUNDLE_NOT_ACCESSIBLE info: {'inner_resource_id': 'R', 'bundle_id': 'B1'}, use --force to override

Comment 8 Tomas Jelinek 2018-06-22 13:44:37 UTC
additional fix which actually makes --force work and translates the error to a comprehensible message:
https://github.com/ClusterLabs/pcs/commit/6f6cce412538da12845576b018a3e6d7512f0b96

Comment 9 Ivan Devat 2018-07-24 06:56:03 UTC
After Fix:

[ant ~] $ rpm -q pcs
pcs-0.9.165-2.el7.x86_64

[ant ~] $ pcs resource bundle create B1 container docker image=pcs:test network host-netmask=24
[ant ~] $ pcs resource create R ocf:heartbeat:Dummy bundle B1
Error: Resource 'R' will not be accessible by the cluster inside bundle 'B1', at least one of bundle options 'control-port' or 'ip-range-start' has to be specified, use --force to override
[ant ~] $ pcs resource create R ocf:heartbeat:Dummy bundle B1 --force
Warning: Resource 'R' will not be accessible by the cluster inside bundle 'B1', at least one of bundle options 'control-port' or 'ip-range-start' has to be specified

Comment 13 errata-xmlrpc 2018-10-30 08:05:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3066


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