Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Under docker-1.10, flag.go exits 125 when a command-line flag is missing a required argument. With docker-1.12.0-6.el7.x86_64 *most* commands do so... except for a seemingly random few:
# docker load --input;echo $?
flag needs an argument: --input
See 'docker load --help'.
1 <-- 125 with docker-1.10
# docker ps --filters;echo $? <-- same with -n or --format
unknown flag: --filters
See 'docker ps --help'.
1 <-- 125 with docker-1.10
(List is not meant to be exhaustive; there are more).
If my diagnosis is correct, root cause is that as part of the cobra migration in June some NewXxxCommand() functions were added with this line:
cmd.SetFlagErrorFunc(flagErrorFunc)
...and some were not:
$ grep -L lagErrorFunc api/client/{image,container}/* | wc -l
23
If this analysis is correct, I hope there's a less duplicationy way to solve this than adding cmd.SetFlagErrorFunc() to each source file!
Upstream patch https://github.com/docker/docker/pull/25354 cannot be backported - I tried it and only after the 7 commits in that PR there were another about 10 to be backported as well in order to have docker to fully use cobra.
I'll try to update the code to use SetFlagErrorFunc where it's needed and carry a FIX patch to fix this.
The exit code is `125` in docker-1.12.3-4.el7.x86_64, and confirmed
https://github.com/docker/docker/pull/26777
is in this build.
Move to verified
# docker load --input;echo $?
flag needs an argument: --input
See 'docker load --help'.
125
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://rhn.redhat.com/errata/RHSA-2017-0116.html
Under docker-1.10, flag.go exits 125 when a command-line flag is missing a required argument. With docker-1.12.0-6.el7.x86_64 *most* commands do so... except for a seemingly random few: # docker load --input;echo $? flag needs an argument: --input See 'docker load --help'. 1 <-- 125 with docker-1.10 # docker ps --filters;echo $? <-- same with -n or --format unknown flag: --filters See 'docker ps --help'. 1 <-- 125 with docker-1.10 (List is not meant to be exhaustive; there are more). If my diagnosis is correct, root cause is that as part of the cobra migration in June some NewXxxCommand() functions were added with this line: cmd.SetFlagErrorFunc(flagErrorFunc) ...and some were not: $ grep -L lagErrorFunc api/client/{image,container}/* | wc -l 23 If this analysis is correct, I hope there's a less duplicationy way to solve this than adding cmd.SetFlagErrorFunc() to each source file!