dannys
January 17, 2022, 4:58pm
1
Hi all,
I want to install Foreman 3.1 with salt, but noticed there is no smart_proxy_salt in the foreman-plugins EL repository: Index of /plugins/3.1/el7/x86_64
Is it correct that there is no smart_proxy_salt plugin available for this Foreman version?
Unfortunately, there was a build issue for the salt plugin in 3.1 and we were able to fix this issue only yesterday.
Have a look at Index of /plugins/nightly/el7/x86_64 - they should be compatible with 3.1.
dannys
January 18, 2022, 8:29am
3
Thanks! I’ll try that package.
Will it be added to the 3.1 repository as well when it is stable?
I just started to do this. See PR:
theforeman:rpm/3.1
← ATIX-AG:rpm31_salt1400
opened 08:29AM - 18 Jan 22 UTC
<!--
If your package needs to be released within one or more release streams, a… nd/or distributions, please open PRs to each of those branches respectively. The easiest way to do this is to make the initial commit for the mainline branch (e.g. rpm/develop or deb/develop) and then cherry pick the commit hash onto each subsequent branch.
Supported Versions:
* Nightly
* 2.0
* 1.24
* 1.23
RPM Example:
git checkout -b rpm/develop-foreman-tasks-1.0.1 rpm/develop
# Make changes to update package
git commit -a -m 'Release foreman-tasks-1.0.1'
COMMIT=`git rev-parse HEAD`
git checkout -b rpm/1.20-foreman-tasks-1.0.1-1.20 rpm/1.20
git cherry-pick -x $COMMIT
DEB Example:
git checkout -b deb/develop-foreman-tasks-1.0.1 deb/develop
# Make changes to update package
git commit -a -m 'Release foreman-tasks-1.0.1'
COMMIT=`git rev-parse HEAD`
git checkout -b deb/1.20-foreman-tasks-1.0.1-1.20 deb/1.20
git cherry-pick -x $COMMIT
See Foreman's [plugin maintainer documentation](https://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin#Release-strategies) for more information.
-->
theforeman:rpm/3.1
← ATIX-AG:rpm31_sp_salt400
opened 08:30AM - 18 Jan 22 UTC
* Remove _core packages completely
* Make use of /usr/share/foreman-proxy/salt/… for reactor and runner
files
* Make use of /var/lib/foreman-proxy/salt/ for autosign authentication
files
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Co-authored-by: Evgeni Golov <evgeni@golov.de>
(cherry picked from commit 66aac56018fed4246b480164bf8f2646be33b31a)
<!--
If your package needs to be released within one or more release streams, and/or distributions, please open PRs to each of those branches respectively. The easiest way to do this is to make the initial commit for the mainline branch (e.g. rpm/develop or deb/develop) and then cherry pick the commit hash onto each subsequent branch.
Supported Versions:
* Nightly
* 2.0
* 1.24
* 1.23
RPM Example:
git checkout -b rpm/develop-foreman-tasks-1.0.1 rpm/develop
# Make changes to update package
git commit -a -m 'Release foreman-tasks-1.0.1'
COMMIT=`git rev-parse HEAD`
git checkout -b rpm/1.20-foreman-tasks-1.0.1-1.20 rpm/1.20
git cherry-pick -x $COMMIT
DEB Example:
git checkout -b deb/develop-foreman-tasks-1.0.1 deb/develop
# Make changes to update package
git commit -a -m 'Release foreman-tasks-1.0.1'
COMMIT=`git rev-parse HEAD`
git checkout -b deb/1.20-foreman-tasks-1.0.1-1.20 deb/1.20
git cherry-pick -x $COMMIT
See Foreman's [plugin maintainer documentation](https://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin#Release-strategies) for more information.
-->
1 Like
dannys
January 18, 2022, 8:34am
5
Thanks again, that is perfect!
2 Likes
dannys
January 24, 2022, 3:34pm
6
What is needed to move the pull-requests forward?
I do have one finding with the upload-salt-reports
command in this version:
$> upload-salt-reports
/opt/rh/rh-ruby27/root/usr/bin/ruby: error while loading shared libraries: libruby.so.2.7: cannot open shared object file: No such file or directory
It looks like there is more to it than just missing dependencies. There seems to be a special salt wrapper where:
upload-salt-reports
(python) uses salt_python_wrapper
(ruby) as its hashbang
salt_python_wrapper
(ruby) , which loads salt_python_wrapper
(shellscript) from the gem (and interprets it as ruby code?).
salt_python_wrapper
(shellscript) tries to locate the active python version on the system to execute the python code with.
I’m not a ruby expert, but changing the hashbang in /usr/bin/salt_python_wrapper
to #!/usr/bin/tfm-ruby
seems to help a bit.
But still, the salt_python_wrapper
tries to load the shellscript as ruby code, which seems to fail.
I’ve found the following pull request which might help to solve this: Remove py2/3 distinction script by bastian-src · Pull Request #76 · theforeman/smart_proxy_salt · GitHub
However that pull request drops python2 support, so I don’t know if that is an option for this smart_proxy_salt version.
This is strange.
upload-salt-reports is a python script and uses the salt_python_wrapper because it need to choose between python2 / 3.
Actually, I don’t understand why the ruby error occurs that it can not find the libruby.so.2.7. Do you have a backtrace?
dannys
January 25, 2022, 8:53am
8
No, there is no backtrace, just this single error message.
I did note different hashbangs in foreman-node and salt_python_wrapper:
foreman_node:
#!/usr/bin/tfm-ruby
salt_python_wrapper:
#!/opt/rh/rh-ruby27/root/usr/bin/ruby
I don’t know if that is an expected difference? Changing it seems to fix the error libruby.so.2.7 error to get one step further in the process.
dannys
February 7, 2022, 6:49pm
10
Thanks! I’ll try it when the package is available.
The change is to use tfm-ruby.
1 Like