okay, we’re back to the state “pre-pulpcore-3.14”, upgrades are failing because rex can’t find its key:
[2021-07-09T11:44:58.569Z] e[0;31m 2021-07-09 11:44:39 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[pipe-up-katello-nightly-centos8.n22.example.com]: Failed to call refresh: Error making PUT request to https://pipe-up-katello-nightly-centos8.n22.example.com/api/v2/smart_proxies/1/refresh: Response: 500 Internal Server Error: Check /var/log/foreman/production.log on Foreman server for detailed informatione[0m
[2021-07-09T11:44:58.569Z] e[0;31m 2021-07-09 11:44:39 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[pipe-up-katello-nightly-centos8.n22.example.com]: Error making PUT request to https://pipe-up-katello-nightly-centos8.n22.example.com/api/v2/smart_proxies/1/refresh: Response: 500 Internal Server Error: Check /var/log/foreman/production.log on Foreman server for detailed informatione[0m
2021-07-09T11:57:33 6830a2ae [I] Started GET /ssh/pubkey
2021-07-09T11:57:33 6830a2ae [W] Error processing request '6830a2ae-6886-40dd-8b4a-c97afa4efca2: <Errno::ENOENT>: No such file or directory @ rb_sysopen - /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy.pub
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.4.1/lib/smart_proxy_remote_execution_ssh/api.rb:11:in `read'
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.4.1/lib/smart_proxy_remote_execution_ssh/api.rb:11:in `block in <class:Api>'
This PR would make the Smart Proxy plugin fail to start up if the public key is not readable:
While it’s not a guarantee (a user could remove the key after it was started), it’s a much better start. The user experience then becomes that the feature is not recognized on Foreman, but at least there is no internal server error due to the assumption that /ssh/pubkey returns a result.
I think the fix proposed above is a good code change for robustness. It does not address to me the core problem that the upgrade recognizes. This is just now the same problem but presented in a new way. Take a look at my proposal for my thoughts on the technical cause and the user facing problem and how we could fix it
Thanks for that part. It now looks like the problem is that the module is enabled after yum install while all plugins are shipped disabled by default. That means the user must opt in to configure. I’ve submitted this PR: