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

updating path to prefer /sbin #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anthonysomerset
Copy link

Pull Request (PR) description

RHEL has a consolehelper based wrapper around subscription-manager at /bin/subscription-manager used for elevating permissions gracefully and interactively - something not available within a puppet run

The real subscription-manager binary is available at /sbin/subscription manager (or more correctly perhaps - /usr/sbin/subscription-manager

for some reason or another likely path ordering when running from within puppet the subscription-manager exec can fail with no output

when disabling the "Sensitive" around the exec you would get this error:

Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns: Traceback (most recent call last):
Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns:   File "/bin/subscription-manager", line 9, in <module>
Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns:     load_entry_point('subscription-manager==1.24.51', 'console_scripts', 'subscription-manager')()
Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns:   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns:     return get_distribution(dist).load_entry_point(group, name)
Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns:   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2565, in load_entry_point
Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns:     raise ImportError("Entry point %r not found" % ((group,name),))
Notice: /Stage[main]/Rhsm/Exec[RHSM-register]/returns: ImportError: Entry point ('console_scripts', 'subscription-manager') not found

which notes the use of /bin/subscription-manager - this PR explicitly sets the exec to use /sbin/subscription-manager for more reliability

This Pull Request (PR) fixes the following issues

none raised (yet)

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

Successfully merging this pull request may close these issues.

2 participants