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 1659051 - knet option names supported by pcs should match their real names in corosync
Summary: knet option names supported by pcs should match their real names in corosync
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: 8.0
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-13 13:29 UTC by Radek Steiger
Modified: 2019-06-14 00:55 UTC (History)
7 users (show)

Fixed In Version: pcs-0.10.1-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 00:55:25 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix + tests (4.84 KB, patch)
2019-01-07 12:39 UTC, Tomas Jelinek
no flags Details | Diff

Description Radek Steiger 2018-12-13 13:29:49 UTC
> Description of problem:

In the name of simplification pcs introduced a way for specifying various knet parameters stripped off its prefixes. While this is understandable in regards to make user's life easier when doing cluster setup, it complicates things on various levels.

First, these shortened names do only exist in pcs, so whenever user needs to search for the details in corosync man page or any other source, he needs to be looking for different names than referenced in pcs manual page.

Second, translating things like knet_transport to transport can cause confusion with other properties, like an actual transport mode for corosync.

Third, should pcs ever implement parsing of corosync.conf in order to prettyprint configuration it would have to do a reverse translation which is currently not implemented and might eventually lead to the same collisions as in the previous point.

And fourth, during the development of both pcs and knet it is possible that changes are made to the actual option names making it more difficult to track source of issues.

Please take into account that this is a conceptual problem and cannot be fixed once RHEL 8.0 is released due to backwards compatibility reasons.


> Version-Release number of selected component (if applicable):

pcs-0.10.1-1.el8.x86_64

Comment 2 Radek Steiger 2018-12-13 13:56:54 UTC
Example:

> Valid options as described in 'man 5 corosync.conf' are not recognized:

[root@virt-029 ~]# pcs cluster setup STSRHTS30587 virt-028 addr=virt-028 virt-029 addr=virt-029  virt-031 addr=virt-031 transport knet link knet_transport=sctp knet_link_priority=1 crypto crypto_hash=sha512 compression knet_compression_model=none
Error: invalid compression option 'knet_compression_model', allowed options are: level, model, threshold
Error: invalid crypto option 'crypto_hash', allowed options are: cipher, hash, model
Error: invalid link options: 'knet_link_priority', 'knet_transport', allowed options are: ip_version, link_priority, linknumber, mcastport, ping_interval, ping_precision, ping_timeout, pong_count, transport
Error: Errors have occurred, therefore pcs is unable to continue


> Pcs specific options have to be used:

[root@virt-029 ~]# pcs cluster setup STSRHTS30587 virt-028 addr=virt-028 virt-029 addr=virt-029  virt-031 addr=virt-031 transport knet link transport=sctp link_priority=1 crypto hash=sha512 compression model=none
...
Sending 'corosync.conf' to 'virt-028', 'virt-029', 'virt-031'
virt-029: successful distribution of the file 'corosync.conf'
virt-031: successful distribution of the file 'corosync.conf'
virt-028: successful distribution of the file 'corosync.conf'
Cluster has been successfully set up.


> The generated corosync.conf file now has some of the options translated (knet_compression_model, crypto_hash) while others (transport, link_priority) have been passed without changes rendering the configuration file in fact invalid!

[root@virt-029 ~]# cat /etc/corosync/corosync.conf
totem {
    version: 2
    cluster_name: STSRHTS30587
    transport: knet
    knet_compression_model: none
    crypto_hash: sha512

    interface {
        link_priority: 1
        linknumber: 0
        transport: sctp
    }
}
...


> From corosync.conf manual page:

       knet_link_priority
              This specifies the priority for the link when knet is used in 'passive' mode. (see link_mode below)

       knet_transport
              Which IP transport knet should use. valid values are "sctp" or "udp". (default: udp)

       crypto_hash
              This  specifies  which HMAC authentication should be used to authenticate all messages. Valid values are none (no authentication), md5, sha1, sha256, sha384 and sha512. Encrypted transmission
              is only supported for the knet transport.

       knet_compression_level
              Many compression libraries allow tuning of compression parameters. For example 0 or 1 ... 9 are commonly used to determine the level of compression. This value is  passed  unmodified  to  the
              compression library so it is recommended to consult the library's documentation for more detailed information.


I consider this option translation method too complicated, confusing and in some cases even bugged, defying its original intention of making user's life easier.

Comment 7 Tomas Jelinek 2019-01-07 12:39:42 UTC
Created attachment 1519000 [details]
proposed fix + tests

Translation for link options' names fixed, correct names are put into corosync.conf.

Comment 8 Ivan Devat 2019-01-14 14:06:49 UTC
After Fix:

[ant8 ~] $ rpm -q pcs
pcs-0.10.1-3.el8.x86_64

[ant8 ~] $ pcs cluster setup zoo ant8 addr=ant8 bee8 addr=bee8  transport knet link transport=sctp link_priority=1 crypto hash=sha512 compression model=none
...
Cluster has been successfully set up.
[ant8 ~] $ cat /etc/corosync/corosync.conf|grep "knet_link_priority\|knet_transport"
        knet_link_priority: 1
        knet_transport: sctp

Comment 10 michal novacek 2019-03-21 11:16:52 UTC
I have verified that the named cluster options are correctly turned into valid corosync variables and form valid corosync.conf in pcs-0.10.1-4.el8.x86_64.

---
[root@virt-422 ~]# rpm -q pcs
pcs-0.10.1-4.el8.x86_64

>> [root@virt-422 ~]# pcs cluster setup el-cluster \
    virt-422 addr=virt-422.ipv6 addr=virt-422.ipv4 \
    virt-423 addr=virt-423.ipv6 addr=virt-423.ipv4 \
    --start --enable --wait \
(1) transport knet \
(2) link transport=udp \
(3) link_priority=1 \
(4) crypto hash=sha256 \
(5) compression model=none

...
virt-423: Cluster started
virt-422: Cluster started

>> [root@virt-422 ~]# cat /etc/corosync/corosync.conf
totem {
     version: 2
     cluster_name: el-cluster
>(1) transport: knet
>(5) knet_compression_model: none
>(4) crypto_hash: sha256

    interface {
>(3)    knet_link_priority: 1
>(2)    knet_transport: udp
        linknumber: 0
    }
}
...


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