Katello Proxies: What determines mirror (and thus content/sync)?

We are deep in the mess of setting up Katello and its proxies in an HA environment. Specifically active/active. For the most part, its all working, except we keep running into an issue where sometime the proxies no longer have a content tab or a sync option. We believe this is due to both proxies having a setting of :mirror: false.
There is an NFS share that both proxies are using, so the idea of having them both set to false is that if one of the proxies goes down and someone doesnt notice, the other proxy can still sync content and accept guest registrations and serve content.

But I have a feeling that Foreman doesnt like seeing multiple mirrors as false, because randomly we will just seem to lose the content tab and sync options. But if we refresh the proxies then usually it comes back.

That being said, is this a viable option? Or do we need to set one to mirror true, and then handle changing that if the mirror false proxy ever goes down?

There obviously isnt a lot of documentation on HA within Katello. We’ve got it working at 95%, so looking for a little direction. Thanks!

Hi @singularity001 ,

Smart proxies, for better or for worse, have multiple “modes” in Katello. On the main Katello server, there is one special smart proxy that Pulp is associated with. That is, the Pulp you use to sync repositories and such. This smart proxy has mirror set to false.

“External” smart proxies, however you want to call them, must have mirror set to true, or else it will appear as an “internal” smart proxy. We have logic in Katello that determines the pulp_primary:

      def pulp_mirror?
        self.has_feature?(PULP_NODE_FEATURE) || self.setting(SmartProxy::PULP3_FEATURE, 'mirror')
      end

      def pulp_primary?
        self.has_feature?(PULP_FEATURE) || self.setting(SmartProxy::PULP3_FEATURE, 'mirror') == false
      end

Why is changing the mirror config option necessary in your solution?

Hello and thank you for the reply.

To answer your question, it is not necessary. We just didn’t understand it, hence the post and question here.

We have two main foreman servers in HA right now, both are set to mirror false, and working just fine. So we though the proxies should be the same (since both are technically server content). But your explanation makes sense, we’ll flip all the external proxies (78 of them) to mirror true.

Thanks!
Current setup we have is a total of 4 main foreman servers behind a load balancer, two in US two in EU. Then 2 proxies at each of our co-locations, each behind a load balancer, for a total of 78 individual proxies, serving out to roughly 60,000 linux hosts.

Appreciate the response!

1 Like

I’m glad to hear it should be that simple, let us know here if it ends up not being so.