Bug 1698763
Summary: | pcs exits with traceback when port with invalid value was given to the auth command | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Miroslav Lisik <mlisik> | ||||
Component: | pcs | Assignee: | Miroslav Lisik <mlisik> | ||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.0 | CC: | cfeist, cluster-maint, idevat, mmazoure, omular, tojeline | ||||
Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
||||
Target Release: | 8.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | pcs-0.10.3-1.el8 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause: The `pcs host auth` command does not validate network port.
Consequence: Python traceback is propagated to the user in the case when invalid port was given.
Fix: Catch an exeption in case when port is invalid and display proper error message to the user.
Result: The user is informed about invalid port by error message and proper port range is displayed.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-04-28 15:27:56 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
Miroslav Lisik
2019-04-11 08:17:17 UTC
Created attachment 1626534 [details]
proposed fix
Test:
1. Use some port out of range with address specified in `pcs auth host` command.
2. Error message should be displayed instead of python traceback.
[root@r81-node-01 pcs]# lpcs host auth node-001 -u hacluster -p password addr=virt-001.cluster-qe.lab.eng.brq.redhat.com:65536
Error: Invalid port number in address 'virt-001.cluster-qe.lab.eng.brq.redhat.com:65536', use 1..65535
[root@r81-node-01 pcs]# lpcs host auth node-001 -u hacluster -p password addr=virt-001.cluster-qe.lab.eng.brq.redhat.com:notaportnumber
Error: Invalid port number in address 'virt-001.cluster-qe.lab.eng.brq.redhat.com:notaportnumber', use 1..65535
After fix: [root@r81-node-01 ~]# rpm -q pcs pcs-0.10.3-1.el8.x86_64 [root@r81-node-01 ~]# pcs host auth -u hacluster -p password r81-node-01 addr=r81-node-01:65536 Error: Invalid port number in address 'r81-node-01:65536', use 1..65535 [root@r81-node-01 ~]# echo $? 1 [root@r81-node-01 ~]# pcs host auth -u hacluster -p password r81-node-01 addr=r81-node-01:65535 r81-node-02 addr=192.168.122.82:string Error: Invalid port number in address '192.168.122.82:string', use 1..65535 [root@r81-node-01 ~]# echo $? 1 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/RHEA-2020:1568 |