Trying to assign an IP address statically to a device results in builtins.AttributeError: 'NoneType' object has no attribute 'link_subnet'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Gavin Panella |
Bug Description
I have subnet where I'm managing DHCP. This is not on fabric-0. That being said, I'm trying to add a device with an IP that's statically assigned in this subnet.
However, I see the following error:
2016-03-17 11:33:25 [-] Error on request (49) device.create: 'NoneType' object has no attribute 'link_subnet'
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
return target()
File "/usr/lib/
task()
File "/usr/lib/
task()
--- <exception caught here> ---
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
inContext.
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, **kwds)
File "/usr/lib/
interface.
builtins.
Related branches
- Lee Trager (community): Approve
-
Diff: 138 lines (+58/-8)3 files modifiedsrc/maasserver/testing/factory.py (+19/-3)
src/maasserver/websockets/handlers/device.py (+11/-5)
src/maasserver/websockets/handlers/tests/test_device.py (+28/-0)
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | none → 2.0.0 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
I Same happens if I try to create a device with 'Dynamic' IP address assignment:
016-03-17 11:36:17 [-] Error on request (51) device.create: 'NoneType' object has no attribute 'link_subnet' python3. 5/threading. py", line 862, in run _target( *self._ args, **self._kwargs) python3/ dist-packages/ provisioningser ver/utils/ twisted. py", line 794, in worker python3/ dist-packages/ twisted/ _threads/ _threadworker. py", line 46, in work python3/ dist-packages/ twisted/ _threads/ _team.py" , line 190, in doWork python3/ dist-packages/ twisted/ python/ threadpool. py", line 246, in inContext python3/ dist-packages/ twisted/ python/ threadpool. py", line 262, in <lambda> theWork = lambda: context.call(ctx, func, *args, **kw) python3/ dist-packages/ twisted/ python/ context. py", line 118, in callWithContext text(). callWithContext (ctx, func, *args, **kw) python3/ dist-packages/ twisted/ python/ context. py", line 81, in callWithContext python3/ dist-packages/ maasserver/ utils/orm. py", line 448, in call_within_ transaction txn(*args, **kwargs) python3/ dist-packages/ maasserver/ utils/orm. py", line 275, in retrier python3. 5/contextlib. py", line 30, in inner python3/ dist-packages/ maasserver/ websockets/ handlers/ device. py", line 263, in create link_subnet( INTERFACE_ LINK_TYPE. DHCP, None) AttributeError: 'NoneType' object has no attribute 'link_subnet'
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
return target()
File "/usr/lib/
task()
File "/usr/lib/
task()
--- <exception caught here> ---
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
inContext.
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, **kwds)
File "/usr/lib/
interface.
builtins.