Bug #34154

foreman-proxy-content-enable-ostree true doesn't refresh the proxy features, leading to ostree being unavailable

Added by Evgeni Golov 5 months ago. Updated 4 months ago.

Foreman modules
Target version:
Bugzilla link:



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.

katello.log.gz katello.log.gz 111 KB Evgeni Golov, 12/15/2021 03:55 PM

Associated revisions

Revision 8ce716a4 (diff)
Added by Ewoud Kohl van Wijngaarden 4 months ago

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

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.


#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": "",
    "id": 1,
    "url": "",
    "remote_execution_pubkey": null,
    "download_policy": "on_demand",
    "supported_pulp_types": [
    "features": [
            "capabilities": [],
            "name": "Logs",
            "id": 13
            "capabilities": [
            "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 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

Also available in: Atom PDF