Bug 2000236

Summary: Confusing usage message from dynkeepalived CLI
Product: OpenShift Container Platform Reporter: Ben Nemec <bnemec>
Component: NetworkingAssignee: Christoph Stäbler <cstabler>
Networking sub component: runtime-cfg QA Contact: Victor Voronkov <vvoronko>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low Keywords: Triaged
Version: 4.9   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:06:37 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:

Description Ben Nemec 2021-09-01 16:09:19 UTC
Description of problem: When an error of any type happens in dynkeepalived, the usage help message is output. This implies that there was a problem with the options passed to the CLI, but in most cases that is not the case. This unnecessary output also tends to hide the actual error message.


Steps to Reproduce:
1. Trigger an error in dynkeepalived, perhaps by killing the keepalived container.


Actual results: Error message followed by usage message.


Expected results: Just the relevant error message.


Additional info: Example output:
2021-04-28T18:21:05.790460143Z time="2021-04-28T18:21:05Z" level=error msg="Failed to write reload to Keepalived container control socket" socket=/var/run/keepalived/keepalived.sock
2021-04-28T18:21:05.790480581Z Error: write unix @->/var/run/keepalived/keepalived.sock: write: broken pipe
2021-04-28T18:21:05.790879437Z Usage:
2021-04-28T18:21:05.790879437Z   dynkeepalived path_to_kubeconfig path_to_keepalived_cfg_template path_to_config [flags]
2021-04-28T18:21:05.790879437Z
2021-04-28T18:21:05.790879437Z Flags:
2021-04-28T18:21:05.790879437Z       --api-port uint16           Port where the OpenShift API listens (default 6443)
2021-04-28T18:21:05.790879437Z       --api-vip ip                Virtual IP Address to reach the OpenShift API
2021-04-28T18:21:05.790879437Z       --check-interval duration   Time between keepalived watch checks (default 10s)
2021-04-28T18:21:05.790879437Z   -c, --cluster-config string     Path to cluster-config ConfigMap to retrieve ControlPlane info
2021-04-28T18:21:05.790879437Z       --dns-vip ip                Virtual IP Address to reach an OpenShift node resolving DNS server
2021-04-28T18:21:05.790879437Z   -h, --help                      help for dynkeepalived
2021-04-28T18:21:05.790879437Z       --ingress-vip ip            Virtual IP Address to reach the OpenShift Ingress Routers
2021-04-28T18:21:05.790879437Z       --lb-port uint16            Port where the API HAProxy LB will listen (default 9445)

Comment 6 errata-xmlrpc 2022-03-10 16:06:37 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 (Moderate: OpenShift Container Platform 4.10.3 security update), 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/RHSA-2022:0056