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 1368106 - qnetd is not checked for usage when killed
Summary: qnetd is not checked for usage when killed
Keywords:
Status: CLOSED DUPLICATE of bug 1158805
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-18 12:40 UTC by Roman Bednář
Modified: 2016-09-13 07:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-13 07:42:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Roman Bednář 2016-08-18 12:40:12 UTC
There is no check that qdevice is actually used by a cluster.
It is possible to kill it any time without any warning or prompt.

# pcs qdevice status net
QNetd address:			*:5403
TLS:				Supported (client certificate required)
Connected clients:		4
Connected clusters:		1
Cluster "STSRHTS10485":
    Algorithm:		LMS
    Tie-breaker:	Node with lowest node ID
    Node ID 1:
        Client address:		::ffff:192.168.0.137:35018
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)
    Node ID 2:
        Client address:		::ffff:192.168.0.140:59852
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)
    Node ID 3:
        Client address:		::ffff:192.168.0.141:35462
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)
    Node ID 4:
        Client address:		::ffff:192.168.0.142:52374
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)


# pcs qdevice kill net
quorum device killed

# pcs qdevice status net
QNetd address:			*:5403
TLS:				Supported (client certificate required)
Connected clients:		0
Connected clusters:		0


corosync-qnetd-2.4.0-3.el7.x86_64
corosynclib-2.4.0-3.el7.x86_64
corosync-qdevice-2.4.0-3.el7.x86_64
corosync-2.4.0-3.el7.x86_64
pcs-0.9.152-6.el7.x86_64

Comment 2 Tomas Jelinek 2016-08-24 08:06:09 UTC
That is how it was designed.  Is it wrong?  What behavior do you expect?

We could check if qdevice is in use in "pcs qdevice kill" based on "pcs qdevice status" output.  But the kill command is expected to be used when things go terribly wrong and the user needs to forcefully stop the qdevice.  In that case we cannot rely on "pcs qdevice status" to be working.

Moreover qdevice can be killed by the "kill" and "killall" commands at any time without any prompt or warning.

So far this looks like NOTABUG for me.

Comment 3 Roman Bednář 2016-09-06 10:46:52 UTC
Alright, can't argue with that logic. So how about the stop command? Is it also intended for that one not to check the status/usage? 
You're right that kill command is a forcefull way and should be a last resort, but a stopping action seems reasonable to have a check/prompt there.
Keeping in mind that user can stop the service anytime using other tools anyway, same as killing it as you mentioned, but that's why we have pcs right? To make things easier, faster and help users avoid mistakes.

Also with latest build the kill command does not seem to work at all, do we need a separate BZ to track this?

# pcs qdevice kill net
quorum device killed

# systemctl is-active corosync-qnetd.service 
active

# pcs qdevice status net
QNetd address:			*:5403
TLS:				Supported (client certificate required)
Connected clients:		4
Connected clusters:		1
Cluster "STSRHTS16137":
    Algorithm:		LMS
    Tie-breaker:	Node with lowest node ID
    Node ID 1:
        Client address:		::ffff:192.168.0.35:40572
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)
    Node ID 4:
        Client address:		::ffff:192.168.0.43:40480
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)
    Node ID 2:
        Client address:		::ffff:192.168.0.36:42636
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)
    Node ID 3:
        Client address:		::ffff:192.168.0.42:46054
        Configured node list:	1, 2, 3, 4
        Membership node list:	1, 2, 3, 4
        Vote:			ACK (ACK)


=================================
corosynclib-2.4.0-4.el7.x86_64
corosync-2.4.0-4.el7.x86_64
corosync-qdevice-2.4.0-4.el7.x86_64
corosync-qnetd-2.4.0-4.el7.x86_64
pcs-0.9.152-8.el7.x86_64

Comment 4 Tomas Jelinek 2016-09-06 13:43:36 UTC
Fair enough, we can add the check when stopping a qdevice.

Are you sure the killing does not work?  I suspect that another instance of qnetd was started by systemd just after you killed it.  Can you check that?

Comment 5 Roman Bednář 2016-09-08 12:29:00 UTC
>Are you sure the killing does not work?  I suspect that another instance of >qnetd was started by systemd just after you killed it.  Can you check that?

Checked that, it's exactly the case.

Comment 6 Tomas Jelinek 2016-09-13 07:42:13 UTC
This has been reported and fixed in the original pcs qdevice bz.

*** This bug has been marked as a duplicate of bug 1158805 ***


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