[21.5b2] ERROR 'NoneType' object has no attribute 'relay_vlan'

Bug #1797135 reported by Chris Gregan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Mike Pontillo

Bug Description

2.5 MAAS deployment fails due to relay_vlan not found.

2018-10-10-10:52:35 INFO Creating grafana-1 in leafeon
2018-10-10-10:52:35 DEBUG maas root pod compose 1 hostname=grafana-1 cores=2 memory=2048 storage=40 zone=1
2018-10-10-10:52:38 ERROR Command failed: pod compose 1 hostname=grafana-1 cores=2 memory=2048 storage=40 zone=1
2018-10-10-10:52:38 ERROR 'NoneType' object has no attribute 'relay_vlan'
Traceback (most recent call last):
  File "/usr/local/bin/fce", line 11, in <module>
    load_entry_point('foundationcloudengine', 'console_scripts', 'fce')()
  File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/main.py", line 102, in entry_point
    sys.exit(main(sys.argv[1:]))
  File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/main.py", line 93, in main
    opts.func(opts)
  File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/build.py", line 38, in build_main
    layer.build()
  File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/layers/maaslayer.py", line 307, in build
    self.setup_pods()
  File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/layers/maaslayer.py", line 790, in setup_pods
    zone['id'],
  File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/maas_cli.py", line 402, in add_pod_vm
    return cmd(maas_profile, command)
  File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/maas_cli.py", line 100, in cmd
    raise error
subprocess.CalledProcessError: Command '['maas', 'root', 'pod', 'compose', '1', 'hostname=grafana-1', 'cores=2', 'memory=2048', 'storage=40', 'zone=1']' returned non-zero exit status 2
Exception in thread Thread-3 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1832, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'
Build step 'Execute shell' marked build as failure

Related branches

Revision history for this message
Chris Gregan (cgregan) wrote :
Revision history for this message
Chris Gregan (cgregan) wrote :
Revision history for this message
Andres Rodriguez (andreserl) wrote :

The actual traceback in MAAS is:

(gzip))
2018-10-10 10:52:37 maasserver: [error] ################################ Exception: 'NoneType' object has no attribute 'relay_vlan' ################################
2018-10-10 10:52:37 maasserver: [error] Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3/dist-packages/maasserver/utils/views.py", line 277, in view_atomic_with_post_commit_savepoint
    return view_atomic(*args, **kwargs)
  File "/usr/lib/python3.6/contextlib.py", line 52, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3/dist-packages/maasserver/api/support.py", line 70, in __call__
    response = upcall(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/views/decorators/vary.py", line 21, in inner_func
    response = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/piston3/resource.py", line 190, in __call__
    result = self.error_handler(e, request, meth, em_format)
  File "/usr/lib/python3/dist-packages/piston3/resource.py", line 188, in __call__
    result = meth(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/maasserver/api/support.py", line 310, in dispatch
    return function(self, request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/maasserver/api/support.py", line 173, in wrapper
    return func(self, request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/maasserver/api/pods.py", line 283, in compose
    machine = form.compose()
  File "/usr/lib/python3/dist-packages/maasserver/forms/pods.py", line 623, in compose
    _, result = db_work(None)
  File "/usr/lib/python3/dist-packages/maasserver/forms/pods.py", line 560, in db_work
    for interface in self.pod.host.interface_set.all()
  File "/usr/lib/python3/dist-packages/maasserver/forms/pods.py", line 560, in <listcomp>
    for interface in self.pod.host.interface_set.all()
AttributeError: 'NoneType' object has no attribute 'relay_vlan'

Revision history for this message
Andres Rodriguez (andreserl) wrote :

This log is in .31.

Changed in maas:
importance: Undecided → Critical
status: New → Triaged
assignee: nobody → Mike Pontillo (mpontillo)
milestone: none → 2.5.0rc1
summary: - ERROR 'NoneType' object has no attribute 'relay_vlan'
+ [21.5b2] ERROR 'NoneType' object has no attribute 'relay_vlan'
Revision history for this message
Andres Rodriguez (andreserl) wrote :

To confirm, a physical bridge is created and a 'maas' network is created on libvirt side to provide networking to the VMs.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

@cgregan, I've linked a merge proposal that should fix this. If you'd like to apply the patch and test MAAS with this change, that would be much appreciated.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

For the record, this issue only seems to surface when we have pod hosts that have interfaces where the VLAN is disconnected.

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0beta3
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.