maas hooks/triggers for dns (de-)registration

Patrizio Bassi patrizio.bassi at gmail.com
Wed Mar 29 13:36:19 UTC 2017


2017-03-29 15:18 GMT+02:00 Andres Rodriguez <andres.rodriguez at canonical.com>
:

> Hi Patrizio,
>
> I have an external dns providing name resolution for bare metal machines
>> and everything works fine.
>> Basically we have a subnet 10.10.xxx.xxx/16 allocated where first
>> addresses are statically registered in the dns server, while the others are
>> "assigned" (meaning, without any hostname association) to maas so it can
>> dynamically use them.
>>
>
> Does this mean that your machines in MAAS share the same hostname as those
> in your upstream DNS server? Are you configuring MAAS DNS to point to the
> upstream DNS (Under the Settings page). This would allow MAAS to use your
> upstream DNS server to resolve for domains names MAAS doesn't know about.
>

Dear Andres,

MAAS is configured like this:
1) under global settings it has the upstream DNS (Infoblox) to resolve
hostnames it doesn't know, this dns list is passed to maas-deployed
machines too
2) the upstream DNS has some (read: first 50s) ips/hostnames already
configured in the network 10.x.x.x we are using
3) under DNS settings MAAS has the domain configured as not Authoritative.
in the Subnet network, infact i reserved the first 50 ips not to be used by
MAAS (statically allocated in our upstream dns)
4) when MAAS commissions a machine or a juju container it can allocate
ip/hostname  without problems but, as it's not authoritative and as our
clients are pointing to upstream dns, we do need to notify upstream server
to add new entry (and remove when it's gone)


>
>
>> I could not deploy the openstack-telemetry charm because
>> Mar 13 08:13:41 juju-45a437-0-lxd-0 aodh-api[20910]: Traceback (most
>> recent call last):
>> Mar 13 08:13:41 juju-45a437-0-lxd-0 aodh-api[20910]:   File
>> "/usr/bin/aodh-api", line 14, in <module>
>> Mar 13 08:13:41 juju-45a437-0-lxd-0 aodh-api[20910]:     my_ip =
>> socket.gethostbyname(socket.gethostname())
>> Mar 13 08:13:41 juju-45a437-0-lxd-0 aodh-api[20910]: socket.gaierror:
>> [Errno -2] Name or service not known
>>
>> infact the LXD containers allocated by juju don't have a dns entry.
>> Beside the need to fix the juju charm somehow it spots a problem: how to
>> register a container ip/hostname in a upstream dns.
>>
>
> What version of Juju are you using? Juju should be registering the
> container in MAAS, and requesting an static IP address, that will trigger
> the creation of a DNS entry and a hostmap.
>
>>
>> It looks something similar to https://lists.ubuntu.com/archi
>> ves/maas-devel/2017-February/002381.html
>>
>> Question is: can maas trigger a custom script (actually a remote rest api
>> curl) when a machine or a container is created (event of new dns entry) and
>> when it gets destroyed (so we can unregister the hostname?).
>>
>
>> I was looking at DHCP Snippets but i'm not sure it's the most proper way
>> (actually should be a bind trigger).
>>
>
> MAAS can't trigger a custom script when a machine/container is created,
> however, you can use DHCP snippets to include configuration to trigger a
> script when a new hostmap / lease is created. That said, although
> discouraged, you could also potentially use DHCP snippets to do DDNS.
>

DHCP snippets do not fit juju* container because containers do no appear to
do dhcp even on first startup but have statically configured IPs unless i'm
missing something.

i'm quite stuck at the moment because of this....we lack the infoblox
integration.

Thanks
Patrizio



>>
>>
>>
>> --
>> Maas-devel mailing list
>> Maas-devel at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/maas-devel
>>
>>
>
>
> --
> Andres Rodriguez
> Engineering Manager, MAAS
> Canonical USA, Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/maas-devel/attachments/20170329/10811963/attachment.html>


More information about the Maas-devel mailing list