Brand new Smart Proxy forces association with almost all Locations

Good day!

I have recently setup a standalone smart proxy (installed with katello). I intend on using this for REX in a single secured network. When create the proxy in Infrastructure > Smart Proxies, assign it to a specific Location, the list of proxies displays it in the assigned Location.

If I go to Edit the proxy, all locations except Default Location are under the Selected column and they cannot be removed. They are greyed out with “This is used by a host” displayed on hover. This proxy is intended to be used for a single location.

Similarly, if I use foreman-installer to register the proxy (–foreman-proxy-register-in-foreman true), it displays null for location, but on Edit, all Locations (except Default Location) are selected and cannot be removed. If I save any Edit to the proxy, it Displays all Locations (except Default Location) in the list of Smart Proxies.

Problem: Smart Proxy gets bound to all Locations except Default Location, cannot assign it solely to the Location I need.

Expected outcome: Be able to assign the proxy to Locations I select, not all.

Foreman and Proxy versions: 1.23.2

Distribution and version: CentOS 7.7 x86_64

Other relevant data: Not sure what would be useful yet!

Does anyone know why Foreman is forcing a proxy into almost all of my Locations?
I have tried to Assign Location on the Hosts page, but I think that is probably irrelevant.

If I go to Administer > Locations > Smart Proxies, I have verified that none of the Locations has the new proxy selected.

Could this be due to some commonality of another object like Templates/Subnets/Domains/Host Groups or something?

The other issue is that when the second proxy is associated with other Locations, it load balances REX, which causes 50% of my Jobs to fail since my new proxy has a dedicated ssh key that won’t be installed in other Locations.

Cheers and thank you for any assistance!
Aaron

Any thoughts on this? I haven’t been able to find anything after quite a few hours and days looking at this.

Thanks!

Well, I figured out what was causing the forced association, but I have no idea why!

When I re-ran foreman-installer and enabled --foreman-proxy-puppet=true I could freely assign and remove Locations from the smart proxy

If puppet was disabled (I don’t use Puppet in my environment and it takes a lot of RAM on the proxy), the smart-proxy forced itself into all Locations. I can even disable the puppetserver service on the proxy and it will still allow free association of Locations.

I’m not sure if this is a bug, or intended, but I cannot fathom why it would be intended.

Hi,

this most definetly sounds like a bug.
I have no clue how this comes (not a Foreman dev myself), but the associations breaking as long as smart-proxy-puppet is disabled definetly sounds like a bug to me.
Have you filed a Redmine Ticket at projects.theforeman.org? If so, it would be great to link it here so others who might still stuble across this thread will have an easier time finding the ticket.

Regards

Thanks @areyus

I figured it could be a bug, or some purposefully built constraint.

Bug filed: Bug #29450: Smart Proxy forces association to all Locations unless Puppet is enabled on the proxy - Smart Proxy - Foreman