"failed to detect a valid IP address" when trying to view node details
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Unassigned | ||
1.9 |
Fix Released
|
High
|
Unassigned |
Bug Description
1.9.0~rc2+
While in a situation that shows bug #1519527, I get a backtrace in regiond.log when trying to view the bootstrap node details in the MAAS UI:
2015-11-25 18:46:01 [-] Error on request (25) subnet.list: failed to detect a valid IP address from u'10.245.
Traceback (most recent call last):
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
return super(ThreadPool, self)._worker()
--- <exception caught here> ---
File "/usr/lib/
result = context.call(ctx, function, *args, **kwargs)
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
return func_outside_
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
for obj in objs
File "/usr/lib/
return self.dehydrate(obj, data, for_list=for_list)
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
ranges |= self._get_
File "/usr/lib/
File "/usr/lib/
if make_ipaddress(
File "/usr/lib/
return IPAddress(input)
File "/usr/lib/
Related branches
- Blake Rouse (community): Approve
-
Diff: 611 lines (+570/-0)3 files modifiedsrc/maasserver/forms_subnet.py (+14/-0)
src/maasserver/migrations/0191_remove_comma_from_dns_servers.py (+528/-0)
src/maasserver/tests/test_forms_subnet.py (+28/-0)
- Lee Trager (community): Approve
-
Diff: 611 lines (+570/-0)3 files modifiedsrc/maasserver/forms_subnet.py (+14/-0)
src/maasserver/migrations/south/migrations/0191_remove_comma_from_dns_servers.py (+528/-0)
src/maasserver/tests/test_forms_subnet.py (+28/-0)
description: | updated |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Critical |
milestone: | none → 1.9.0 |
tags: | removed: kanban-cross-team |
description: | updated |
description: | updated |
description: | updated |
Andres and I tracked this down to a possibly- incorrectly- migrated field.
The dns_servers column in the Subnet table is supposed to be a list (postgresql array). However, looking at the output of "subnets list", Andres saw that the dns_servers list was in the form:
dns_servers: ["10.245. 200.27, 10.245. 200.1"]
Whereas, we would expect it to be:
dns_servers: ["10.245.200.27", "10.245.200.1"]
So, two issues we need to solve here:
(1) See if we can fix the migrations to correctly migrate this field (if that was indeed the issue); requires installing 1.7 or 1.8, specifying multiple DNS servers within a cluster interface configuration, and then migrating to 1.9.
(2) Make the code more robust by checking wherever we read this field if there is a comma, and if so, split it by commas, then strip the whitespace off of all split sections. (maybe create a property or helper method in the Subnet model class to do this.)
I think fix (2) may be required even if we do fix (1), because people who have already migrated to a more recent MAAS 1.9 RC could already have a corrupt field.