With MAAS 2.6.2-7841-ga10625be3-0ubuntu1~18.04.1, Solutions QA tests failed when updating VLANs.
Two separate test runs failed, with details and artifacts available at the following URLS:
https://solutions.qa.canonical.com/#/qa/testRun/a1f9f79e-ed99-48f2-a376-e6e999c51ce5
https://solutions.qa.canonical.com/#/qa/testRun/42edc0da-6bd6-462f-a41b-2b68346981a4
The error output can be seen in the fce_build console log:
2019-11-16-08:30:53 foundationcloudengine.maas_config_networks DEBUG Setting vlan: untagged - fabric to default
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 141, in entry_point
sys.exit(main(sys.argv[1:]))
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/main.py", line 132, in main
opts.func(opts)
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/build.py", line 77, in build_main
args.steps)
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/build.py", line 51, in build_and_validate_if_needed
layer.build_outer(only_steps)
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/layers/baselayer.py", line 120, in build_outer
self.build(only_steps=only_steps)
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/layers/maaslayer.py", line 2671, in build
super(MaasLayer, self).run_steps(only_steps)
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/layers/steppedbaselayer.py", line 113, in run_steps
step.build()
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/layers/maaslayer.py", line 1276, in build
configure_networks(self._network_config, self._api_url, self._apikey)
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/maas_config_networks.py", line 521, in configure_networks
fabric_vlans=fabric_vlans)
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/maas_config_networks.py", line 355, in apply_vlans_to_fabric
set_vlan_attr(vlan, attr='fabric', value=fabric) # Move the vlan
File "/home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/maas_config_networks.py", line 326, in set_vlan_attr
vlan.save()
File "/usr/lib/python3/dist-packages/maas/client/utils/async.py", line 49, in wrapper
result = eventloop.run_until_complete(result)
File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/usr/lib/python3/dist-packages/maas/client/viscera/vlans.py", line 108, in save
self._data = await self._handler.update(**update_data)
File "/usr/lib/python3/dist-packages/maas/client/bones/__init__.py", line 302, in __call__
response = await self.bind(**params).call(**data)
File "/usr/lib/python3/dist-packages/maas/client/bones/__init__.py", line 463, in dispatch
raise CallError(request, response, content, self)
maas.client.bones.CallError: PUT http://10.246.64.33/MAAS/api/2.0/fabrics/1/vlans/2696/ -> HTTP 400 Bad Request ({"__all__": ["A VLAN with the specified VID alrea…)
Could you share what the code is trying to do?
It seems the client is trying to the VID of a VLAN to one that is already in use by another VLAN.