Merge lp:~jtv/maas/bug-1066958 into lp:~maas-committers/maas/trunk
Proposed by
Jeroen T. Vermeulen
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jeroen T. Vermeulen | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1276 | ||||
Proposed branch: | lp:~jtv/maas/bug-1066958 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
53 lines (+25/-6) 2 files modified
src/provisioningserver/dns/config.py (+9/-6) src/provisioningserver/dns/tests/test_config.py (+16/-0) |
||||
To merge this branch: | bzr merge lp:~jtv/maas/bug-1066958 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel (community) | Approve | ||
Review via email:
|
Commit message
Don't produce CNAMEs that are identical to hosts' respective auto-generated names.
Description of the change
This implements Raphael's suggestion in bug 1066958, so that we no longer create invalid CNAME records when we enlist nodes. I did not have a pre-imp; I just reproduced the bug in a unit test, and then changed the code to make the test pass. No other tests were affected.
Jeroen
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/16/2012 8:13 AM, Jeroen T. Vermeulen wrote: reviewers) /bugs.launchpad .net/maas/ +bug/1066958 /code.launchpad .net/~jtv/ maas/bug- 1066958/ +merge/ 129798
> Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/bug-1066958
> into lp:maas.
>
> Commit message: Don't produce CNAMEs that are identical to hosts'
> respective auto-generated names.
>
> Requested reviews: Launchpad code reviewers (launchpad-
> Related bugs: Bug #1066958 in MAAS: "DNS config is invalid after a
> node gets enlisted." https:/
>
> For more details, see:
> https:/
>
> This implements Raphael's suggestion in bug 1066958, so that we no
> longer create invalid CNAME records when we enlist nodes. I did
> not have a pre-imp; I just reproduced the bug in a unit test, and
> then changed the code to make the test pass. No other tests were
> affected.
>
>
> Jeroen
>
This seems like a case where using the 'yield' form for a generator
would be better, so that you don't have to double-compute the value.
for hostname, ip in self.mapping. items() : hostname( ip)
gen_hostname = generated_
if gen_hostname != hostname:
yield (hostname, generated_hostname)
Otherwise:
review: approve
John
=:->
-----BEGIN PGP SIGNATURE----- www.enigmail. net/
854gACgkQJdeBCY SNAAM7PgCgxBWSV kpZo4SFy1+ qhVo+ApAZ wbn6jF+ APx9E9n1Wf
Version: GnuPG v1.4.12 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAlB
Mj0An2plDHYeivl
=wOxy
-----END PGP SIGNATURE-----