Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash completion non-functional #148

Open
rax-rstark opened this issue Feb 27, 2020 · 1 comment
Open

bash completion non-functional #148

rax-rstark opened this issue Feb 27, 2020 · 1 comment

Comments

@rax-rstark
Copy link
Contributor

Hello,

After running the playbook: https:/rcbops/openstack-ops/blob/master/playbooks/configure-bash-environment.yml , I find that openstack bash completions do not function as expected. This issue appears to be due to the root user not sourcing /etc/profile.d/bash_completion.sh at login. Running source /etc/profile.d/bash_completion.sh from within utility container enables openstack bash completions to function as expected.

@rax-rstark
Copy link
Contributor Author

rax-rstark commented Feb 27, 2020

So a little additional spelunking:

bash-completion is installed on utility container, which creates /etc/profile.d/bash_completion.sh. Upon login to utility container with /bin/bash as root user's shell I expect bash to read global /etc/profile and see that /etc/profile has an explicit call out to run *.sh within /etc/profile.d/ like so:

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi

From the settings above, I would expect /etc/profile.d/bash_completion.sh would be ran by default upon interactive login. Despite the setup above, bash-completion is not working.

I can test default bash-completion functionality by logging into the container and running apt <tab><tab> to see if command completions are returned. By default, command completions are not returned. Manually running source /etc/profile.d/bash_completion.sh causes all bash-completions to subsequently function as expected. Completion commands tested:
apt, cinder, glance, nova, heat, keystone, neutron, nova, and openstack

¯_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant