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

install oauth gem on puppet agent #1077

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

Conversation

jhoblitt
Copy link
Contributor

puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio. Most of the native types in this module require this gem to be
present.

puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio.  Most of the native types in this module require this gem to be
present.
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is invalid. We have foreman::providers already to take care of this. That installs puppet-agent-oauth which installs the gem in the puppetserver gem environment. However, when you upgrade from Puppetserver 6 to 7 you need to reinstall it. Our installer has a hook to do this automatically.

@jhoblitt
Copy link
Contributor Author

jhoblitt commented Aug 22, 2022

@ekohl I was ignorant to the existence of foreman::providers. It appears that it is installing the puppet-agent-oauth package on my EL7 systems. That package contains:

[jhoblitt@foreman ~]$ repoquery --list puppet-agent-oauth-0.5.5-1.el7.noarch
/usr/share/foreman-installer/gems/oauth-0.5.5.gem

Which doesn't solve my issue as that gem does not end up being installed as part of the puppet agents env. I am not using the types in this package via the installer but as part of regular puppet agent runs.

@ekohl
Copy link
Member

ekohl commented Aug 22, 2022

That's handled via %post:
https://github.com/theforeman/foreman-packaging/blob/b38523b6dd1edb81d90e21875275b4ce97f29cff/packages/foreman/puppet-agent-oauth/puppet-agent-oauth.spec#L32

It really is a hack, but native packaging was hard and it works OK-ish. Except when puppet-agent changes its Ruby version, like with Puppet's major versions.

@jhoblitt
Copy link
Contributor Author

That rpm is already installed on my production puppet6 puppetservers, so it would need to be reinstalled during the first puppet agent run. ;(

@jhoblitt
Copy link
Contributor Author

What about installing /usr/share/foreman-installer/gems/oauth-0.5.5.gem with the puppet_gem provider?

jhoblitt added a commit to lsst-it/lsst-control that referenced this pull request Aug 22, 2022
puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio.  Most of the native types in `theforeman/foreman` require this gem
to be present.

See: theforeman/puppet-foreman#1077
jhoblitt added a commit to lsst-it/lsst-control that referenced this pull request Aug 22, 2022
puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio.  Most of the native types in `theforeman/foreman` require this gem
to be present.

See: theforeman/puppet-foreman#1077
jhoblitt added a commit to lsst-it/lsst-control that referenced this pull request Aug 22, 2022
puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio.  Most of the native types in `theforeman/foreman` require this gem
to be present.

See: theforeman/puppet-foreman#1077
jhoblitt added a commit to lsst-it/lsst-control that referenced this pull request Aug 22, 2022
puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio.  Most of the native types in `theforeman/foreman` require this gem
to be present.

See: theforeman/puppet-foreman#1077
jhoblitt added a commit to lsst-it/lsst-control that referenced this pull request Aug 22, 2022
puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio.  Most of the native types in `theforeman/foreman` require this gem
to be present.

See: theforeman/puppet-foreman#1077
@ekohl
Copy link
Member

ekohl commented Aug 23, 2022

What about installing /usr/share/foreman-installer/gems/oauth-0.5.5.gem with the puppet_gem provider?

While I like the idea, we bumped it to 0.5.10 in current versions. I think it should provide a symlink oauth-latest.gem pointing to the correct version. We could do this in packaging and only then start relying on it. That would also allow us to get rid of the hook to reinstall.

jhoblitt added a commit to lsst-it/lsst-control that referenced this pull request Aug 23, 2022
puppet6 aio bundles the oauth gem but it is not bundled with puppet7
aio.  Most of the native types in `theforeman/foreman` require this gem
to be present.

See: theforeman/puppet-foreman#1077
@jhoblitt
Copy link
Contributor Author

jhoblitt commented Oct 5, 2022

I migrated my production sites from 6 -> 7 a month ago, so this PR is no longer relevant for me. Should we leave it open for someone else to potentially pick up or close it?

@ekohl
Copy link
Member

ekohl commented Oct 6, 2022

This may become relevant again when Puppet 8 comes out so I'd leave it open for now.

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

Successfully merging this pull request may close these issues.

3 participants