Katello-nightly-rpm-pipeline 1022 failed

Katello nightly pipeline failed:

https://ci.theforeman.org/job/katello-nightly-rpm-pipeline/1022/

foreman-pipeline-katello-nightly-centos8-stream-install (passed) (remote job)
foreman-pipeline-katello-nightly-centos8-install (passed) (remote job)
foreman-pipeline-katello-nightly-centos7-install (passed) (remote job)
foreman-pipeline-katello-nightly-centos8-upgrade (failed) (remote job)
foreman-pipeline-katello-nightly-centos7-upgrade (failed) (remote job)

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:
https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/57

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.

Does that mean the proxy would start, but the plugin won’t be loaded? That sounds good.

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

https://github.com/theforeman/foreman-packaging/pull/6861

Yes it does.

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:
https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/59

This is in addition to others.

We merged Erics PR and things are passing now.

Whether we want also “do not enable by default”, is up to y’all :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.