Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514355 - oc and oadm completion no longer auto added to bash_completion
Summary: oc and oadm completion no longer auto added to bash_completion
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Xingxing Xia
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-17 08:28 UTC by Kim Borup
Modified: 2018-11-07 09:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-11-07 09:49:30 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Kim Borup 2017-11-17 08:28:13 UTC
Description of problem:

When installing openshift enterprise, before (up until 3.5.1) oc and oadm completion were automatically added to bash_completion, and thats why it is also a prereq in most guides.

After 3.5 to 3.6 the scripts no longer gets added to /usr/share/bash-completion/completions/

How reproducible:
All the time

Steps to Reproduce:
1. Install Openshift and bash_completion
2. Log into a master and run oc command try and complete with <TAB>

Actual results:

oc completion gives nothing and the function is missing. 

Expected results:

oc <command> pop up

Additional info:

Can be fixed manually with 

oc completion bash > /usr/share/bash-completion/completions/oc
oadm completion bash > /usr/share/bash-completion/completions/oadm

Should be fixed so it again gets auto added..

Comment 1 Xingxing Xia 2017-11-20 07:27:58 UTC
AFAIK, since the feature completed in 3.3 via card , envs till v3.7 always put the oc/oadm/openshift files under /etc/bash_completion.d/ . I never see them under /usr/share/bash-completion/completions/
# ls /etc/bash_completion.d/{oc,oadm,openshift}
/etc/bash_completion.d/oadm  /etc/bash_completion.d/oc  /etc/bash_completion.d/openshift

Comment 2 Kim Borup 2017-11-27 15:19:47 UTC
they could be put under /etc/bash_completion.d/ as well, it does not change the output from either places, it has to be  added back to bash completion without you having to tamp it in.. every time.

Comment 3 Xingxing Xia 2017-11-28 03:01:26 UTC
Above just wants to say, no matter 3.3 ~ 3.7 binaries, when they're installed via `yum install atomic-openshift-clients atomic-openshift` (or `dnf install`), the files are always AUTOMATICALLY put under /etc/bash_completion.d/, bash completion can automatically take effect without tamping. I never hit your problem. Wonder how you installed the binaries

Comment 4 Scott Dodson 2017-11-30 20:49:45 UTC

Can you elaborate on how you've installed the environment and confirm that you don't have /etc/bash_completion.d/{oc,oadm,openshift} files?

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