← Back to team overview

sts-sponsors team mailing list archive

Re: [Merge] ~cgrabowski/maas:fix_glue_zones into maas:master

 


Diff comments:

> diff --git a/src/maasserver/dns/zonegenerator.py b/src/maasserver/dns/zonegenerator.py
> index 658147f..c165131 100644
> --- a/src/maasserver/dns/zonegenerator.py
> +++ b/src/maasserver/dns/zonegenerator.py
> @@ -494,7 +494,12 @@ class ZoneGenerator:
>                      ):
>                          glue_update = False
>                          break
> -                if glue_update:
> +                if (
> +                    glue_update
> +                    and update.answer
> +                    and update.answer_is_ip
> +                    and IPAddress(update.answer) in network

Well its size can vary, if you're deploying many machines, there will be many updates, same if you added many records via the API. I suppose it could be a cached property on the update itself.

> +                ):
>                      domain_updates.append(
>                          DynamicDNSUpdate.as_reverse_record_update(
>                              update, str(network)
> diff --git a/src/provisioningserver/dns/actions.py b/src/provisioningserver/dns/actions.py
> index bafbac9..86a4274 100644
> --- a/src/provisioningserver/dns/actions.py
> +++ b/src/provisioningserver/dns/actions.py
> @@ -50,6 +50,11 @@ def bind_reload(timeout=2):
>      :return: True if success, False otherwise.
>      """
>      try:
> +        # if first configuring a zone, we have to reload, but if already dynamically updated,
> +        # BIND can use freeze / thaw so changes don't conflict with dynamic updates so both are done
> +        # to load new zone data *and* config

So I suppose doing it by the book is cleaner and easier to reason about, so I'll change it. Right now it works because it's a situation where BIND is still processing dynamic updates, and then we tell it to read a new file, if it were the reverse we'd have to do it the other way.

> +        execute_rndc_command(("freeze",), timeout=timeout)
> +        execute_rndc_command(("thaw",), timeout=timeout)
>          execute_rndc_command(("reload",), timeout=timeout)
>          return True
>      except CalledProcessError as exc:


-- 
https://code.launchpad.net/~cgrabowski/maas/+git/maas/+merge/436005
Your team MAAS Committers is subscribed to branch maas:master.



References