Support Multiple regiond Endpoints in MAAS Client

Currently MAAS client library only supports specifying a single target region controller endpoint.

For non-shared-L2 scenarios, however, there are multiple endpoints on different subnets without a shared VIP to hide them.

It should be possible to specify multiple target endpoints in a client library similar to how libpq handles this with PostgreSQL 10 (see

The problem is that MAAS is the first thing to be deployed on a given management network and there are no load-balancers or other infrastructure to provide means of proper handling of multi-endpoint scenarios.

Any python software that uses maas client would benefit from the multi-endpoint connection logic.

A specific example would be charm-hacluster which is used to manage address records with 0 TTL in MAAS in order to solve the multi-endpoint problem for MAAS API services. It does solve a problem by creating those records but it cannot connect to multiple MAAS region endpoints by using MAAS client as it expects a single target endpoint.


Seems related to Support setting target_session_attrs postgres option by passing additional options to a django database backend too… wonder if we can have a general discussion for all the PostgreSQL 10 features we could/should support


It’s not about PostgreSQL though.

This one is about a client being able to connect to one of multiple region controller endpoints if region controllers are deployed in different subnets. In this case you cannot use VIPs as there is no shared L2 so a client has to be able to iterate over multiple hostnames/ips.

1 Like

Ah, my bad. Yes you’re right, I misread your post