[2.1] dnsresources create fails on valid IP
Bug #1676619 reported by
Kevin Metz
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Unassigned | ||
2.1 |
Fix Released
|
High
|
Unassigned |
Bug Description
running the following command
maas ubuntu dnsresources create fqdn=my.host.com ip_addresses=
fails with the error
invalid literal for int() with base 10: '172.31.0.11'
Related branches
lp://staging/~lamont/maas/bug-1676619
- Mike Pontillo (community): Approve
-
Diff: 113 lines (+23/-6)4 files modifiedsrc/maasserver/api/dnsresourcerecords.py (+1/-1)
src/maasserver/api/dnsresources.py (+3/-2)
src/maasserver/forms/dnsresource.py (+8/-0)
src/maasserver/forms/tests/test_dnsresource.py (+11/-3)
lp://staging/~lamont/maas/bug-1676619-2.1
- Mike Pontillo (community): Approve
-
Diff: 184 lines (+96/-9)4 files modifiedsrc/maasserver/api/dnsresourcerecords.py (+1/-1)
src/maasserver/api/dnsresources.py (+3/-2)
src/maasserver/forms_dnsresource.py (+28/-0)
src/maasserver/tests/test_forms_dnsresource.py (+64/-6)
Changed in maas: | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
summary: |
- dnsresources create fails on valid IP + [2.1] dnsresources create fails on valid IP |
Changed in maas: | |
milestone: | none → 2.2.0 |
Changed in maas: | |
status: | Triaged → Fix Committed |
milestone: | 2.2.0 → 2.2.0rc1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
In the current code, forms/dnsresour ce.py's clean_ip converts a given IP address into a StaticIPAddress .id... if that fails, it happily leaves it as a string, and we die.
I played with a branch over the weekend that starts to address it, by creating the needed StaticIPAddress entries in save() if they do not exist.