Update. I have been able to fix the cloud-init issue by adding network-config=disabled
to the kernel parameters, and it works with the existing cloud.cfg
that is on the system. I, however, seem to have encountered a bug with MAAS itself.
Aug 24 12:40:39 util01 maas-log[300465]: maas.rpc.rackcontrollers: message repeated 2 times: [ [info] Existing rack controller 'util01' running version 3.5.1-16317-g.409891638 has connected to region 'util01'.]
Aug 24 12:40:39 util01 maas-log[300465]: maas.node: [info] : Status transition from NEW to COMMISSIONING
Aug 24 12:40:39 util01 maas-regiond[300302]: maasserver: [error] ################################ Exception: 'ValidationError' object has no attribute 'message' ################################
Aug 24 12:40:39 util01 maas-regiond[300302]: maasserver: [error] Traceback (most recent call last):
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/db/models/query.py", line 581, in get_or_create
Aug 24 12:40:39 util01 maas-regiond[300302]: return self.get(**kwargs), False
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/db/models/query.py", line 435, in get
Aug 24 12:40:39 util01 maas-regiond[300302]: raise self.model.DoesNotExist(
Aug 24 12:40:39 util01 maas-regiond[300302]: maasserver.models.interface.PhysicalInterface.DoesNotExist: PhysicalInterface matching query does not exist.
Aug 24 12:40:39 util01 maas-regiond[300302]: During handling of the above exception, another exception occurred:
Aug 24 12:40:39 util01 maas-regiond[300302]: Traceback (most recent call last):
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/forms/__init__.py", line 1479, in save
Aug 24 12:40:39 util01 maas-regiond[300302]: node.add_physical_interface(mac)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/models/node.py", line 2146, in add_physical_interface
Aug 24 12:40:39 util01 maas-regiond[300302]: iface, created = PhysicalInterface.objects.get_or_create(
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/models/interface.py", line 434, in get_or_create
Aug 24 12:40:39 util01 maas-regiond[300302]: interface, created = super().get_or_create(*args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/db/models/manager.py", line 85, in manager_method
Aug 24 12:40:39 util01 maas-regiond[300302]: return getattr(self.get_queryset(), name)(*args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/db/models/query.py", line 588, in get_or_create
Aug 24 12:40:39 util01 maas-regiond[300302]: return self.create(**params), True
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/db/models/query.py", line 453, in create
Aug 24 12:40:39 util01 maas-regiond[300302]: obj.save(force_insert=True, using=self.db)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/models/interface.py", line 1763, in save
Aug 24 12:40:39 util01 maas-regiond[300302]: super().save(*args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/models/interface.py", line 1636, in save
Aug 24 12:40:39 util01 maas-regiond[300302]: super().save(*args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/models/cleansave.py", line 46, in save
Aug 24 12:40:39 util01 maas-regiond[300302]: self.full_clean(exclude=exclude_clean_fields, validate_unique=False)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/db/models/base.py", line 1251, in full_clean
Aug 24 12:40:39 util01 maas-regiond[300302]: raise ValidationError(errors)
Aug 24 12:40:39 util01 maas-regiond[300302]: django.core.exceptions.ValidationError: {'mac_address': ["'04:32:01:c5:d0:10,c4:5a:b1:bf:04:bc,04:32:01:c5:d0:11,c4:5a:b1:bf:04:bb' is not a valid MAC address."]}
Aug 24 12:40:39 util01 maas-regiond[300302]: During handling of the above exception, another exception occurred:
Aug 24 12:40:39 util01 maas-regiond[300302]: Traceback (most recent call last):
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 181, in _get_response
Aug 24 12:40:39 util01 maas-regiond[300302]: response = wrapped_callback(request, *callback_args, **callback_kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/utils/views.py", line 298, in view_atomic_with_post_commit_savepoint
Aug 24 12:40:39 util01 maas-regiond[300302]: return view_atomic(*args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/usr/lib/python3.10/contextlib.py", line 79, in inner
Aug 24 12:40:39 util01 maas-regiond[300302]: return func(*args, **kwds)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/api/support.py", line 62, in __call__
Aug 24 12:40:39 util01 maas-regiond[300302]: response = super().__call__(request, *args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/django/views/decorators/vary.py", line 20, in inner_func
Aug 24 12:40:39 util01 maas-regiond[300302]: response = func(*args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/piston3/resource.py", line 196, in __call__
Aug 24 12:40:39 util01 maas-regiond[300302]: result = self.error_handler(e, request, meth, em_format)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/usr/lib/python3/dist-packages/piston3/resource.py", line 194, in __call__
Aug 24 12:40:39 util01 maas-regiond[300302]: result = meth(request, *args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/api/support.py", line 371, in dispatch
Aug 24 12:40:39 util01 maas-regiond[300302]: return function(self, request, *args, **kwargs)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/api/machines.py", line 1937, in create
Aug 24 12:40:39 util01 maas-regiond[300302]: machine = create_machine(request, requires_arch=True)
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/api/machines.py", line 1752, in create_machine
Aug 24 12:40:39 util01 maas-regiond[300302]: machine = form.save()
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/forms/__init__.py", line 401, in save
Aug 24 12:40:39 util01 maas-regiond[300302]: node = super().save()
Aug 24 12:40:39 util01 maas-regiond[300302]: File "/snap/maas/36889/lib/python3.10/site-packages/maasserver/forms/__init__.py", line 1481, in save
Aug 24 12:40:39 util01 maas-regiond[300302]: mac_addresses_errors.append(e.message)
Aug 24 12:40:39 util01 maas-regiond[300302]: AttributeError: 'ValidationError' object has no attribute 'message'
Aug 24 12:40:39 util01 maas-http[300465]: 10.0.0.4 - - [24/Aug/2024:12:40:39 -0400] "POST /MAAS/api/2.0/machines/ HTTP/1.1" 500 51 "-" "Python-urllib/3.10"
The request sent is:
architecture=amd64&mac_addresses=c4:5a:b1:bf:04:bc,04:32:01:c5:d0:10,c4:5a:b1:bf:04:bb,04:32:01:c5:d0:11&commission=True&power_type=ipmi&power_parameters={"cipher_suite_id":+"3",+"k_g":+"",+"mac_address":+"C4:5A:B1:BF:04:B5",+"power_address":+"10.0.0.29",+"power_boot_type":+"efi",+"power_driver":+"LAN_2_0",+"power_pass":+"XXXXXXXXX",+"power_user":+"maas",+"privilege_level":+"ADMIN"}