Bug 1659051
Summary: | knet option names supported by pcs should match their real names in corosync | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Radek Steiger <rsteiger> | ||||
Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | cluster-qe <cluster-qe> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 8.0 | CC: | cfeist, cluster-maint, idevat, jwboyer, mnovacek, omular, tojeline | ||||
Target Milestone: | rc | ||||||
Target Release: | 8.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | pcs-0.10.1-3.el8 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2019-06-14 00:55:25 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: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Radek Steiger
2018-12-13 13:29:49 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. Created attachment 1519000 [details]
proposed fix + tests
Translation for link options' names fixed, correct names are put into corosync.conf.
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 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 } } ... |