Bug #34154
foreman-proxy-content-enable-ostree true doesn't refresh the proxy features, leading to ostree being unavailable
Description
Ohai,
freshly deployed Katello nightly on EL8. Wanted to enable OSTree support after the fact, so ran foreman-installer --foreman-proxy-content-enable-ostree true
which passed successfully, but OSTree was still not available in the UI.
On further investigation it turned out the smart proxy didn't have "ostree" in the "services" tab. Hitting refresh made "ostree" show up and allowed me to create an OSTree repository.
Attached is the log of the installer run that was supposed (at least from a users perspective) to do this for me.
Associated revisions
History
#1
Updated by Evgeni Golov 5 months ago
I think the problem is that the proxy already exists and the feature list doesn't change (the capabilities list does), so the "foreman_smartproxy" provider in puppet-foreman doesn't consider this a change and doesn't force a refresh of the features.
# curl -H 'Content-Type: application/json' -XPUT -uadmin:changeme -k https://localhost/api/v2/smart_proxies/1/refresh | python3 -m json.tool { "created_at": "2021-12-15 13:42:08 UTC", "updated_at": "2021-12-15 13:42:08 UTC", "hosts_count": 0, "name": "centos8-katello-nightly.tanso.example.com", "id": 1, "url": "https://centos8-katello-nightly.tanso.example.com:9090", "remote_execution_pubkey": null, "download_policy": "on_demand", "supported_pulp_types": [ "ansible_collection", "deb", "docker", "file", "python", "yum", "ostree" ], "features": [ { "capabilities": [], "name": "Logs", "id": 13 }, { "capabilities": [ "ansible", "certguard", "container", "core", "deb", "file", "ostree", "python", "rpm" ], "name": "Pulpcore", "id": 3 } ], "locations": [ { "id": 2, "name": "Default Location", "title": "Default Location", "description": null } ], "organizations": [ { "id": 1, "name": "Default Organization", "title": "Default Organization", "description": null } ] }
#2
Updated by Evgeni Golov 5 months ago
Oh, and this also means that the installer doesn't re-run apipie:cache, resulting in wrong apidocs.
#3
Updated by The Foreman Bot 5 months ago
- Assignee set to Ewoud Kohl van Wijngaarden
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/puppet-foreman_proxy_content/pull/393 added
#4
Updated by The Foreman Bot 4 months ago
- Fixed in Releases 3.2.0 added
#5
Updated by Ewoud Kohl van Wijngaarden 4 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset puppet-foreman_proxy_content|8ce716a484a8fd714fe8a75d150ae63ebadeeab9.
Fixes #34154 - Refresh on Pulp plugin installation
smart_proxy_pulp dynamically retrieves the Pulp content types and
Katello uses this. This means the features need to be refreshed after a
content type is added. The API also changes so that cache needs to be
regenerated.
This does refreshes on the foreman_smartproxy which could be considered
a private API from theforeman/foreman_proxy and collectors would
silently be skipped if anything changes. That's why this must be covered
by spec tests.