Renaming the Default Org and/or Location Breaks Published Repo

Problem:
I did a fresh install of Foreman with the Katello scenario but didn’t specify the Org name or Location. Once the install was completed I renamed the Org and Location but when I went to do a provisioning of a sever the Published Repository was giving a 404: not found error. I tried to resync and it didn’t fix the issue.

Since it was a fresh install I decided to retry and ended up forgetting to specify the org and location again and ran into the same issue. I then did a fresh install a 3rd time but specified the Org and Location and the repo is displaying properly. However If I rename the org it breaks it again.

The published repo URL still would show the original Organization in the repository details instead of the renamed Org.
Ie: https://foreman-server.com/pulp/content/Default_Org/Library/custom/RockyLinux_8_5/8_5_AppStream_x86_64_os/

Trying the URL with the correct Org name still gave the 404: Not Found error

Additionally I tried deleting and recreating the product and syncing the repository but it still didn’t update to the new Org.

Expected outcome:
Repository Link should be published with current Organization name.

Foreman and Proxy versions:
Foreman 3.1.2
Proxy 3.1.2

Foreman and Proxy plugin versions:
katello 4.3.0

Distribution and version:
Rocky Linux 8.5

I think this is a bug but I am not sure how to report it.

Hi @thinkdez!

While the name of an Organization can be changed, the label cannot. Repository paths are based on the Organization’s label, so it shouldn’t change. You would have to make a new Organization if you want to rename it fully.

You shouldn’t be getting a 404 if the URL is correct, though. Do you see all of the expected repositories if you browse to the following URL? https://foreman-server.com/pulp/content/

And, just to be sure, the sync ended without warning?

Changing the Org did present a problem but when I did a resync afterwards I was also having an issue where the content wasn’t being published. I think this resulted in my 404 error. I have since resolved said issue and now everything appears correctly.

1 Like