Comment 10 for bug 1628216

Revision history for this message
James Page (james-page) wrote :

Groking the code:

def compute_joined(rid=None):
    # NOTE(james-page) in MAAS environments the actual hostname is a CNAME
    # record so won't get scanned based on private-address which is an IP
    # add the hostname configured locally to the relation.
    settings = {
        'hostname': gethostname(),
        'private-address': get_relation_ip(
            'cloud-compute', cidr_network=config('os-internal-network')),

the get_relation_id command will

a) use os-internal-network if set - legacy approach to multi-networks
b) use the network space binding of the 'cloud-compute' relation
c) fallback to 'unit-get private-address'