MAAS doesn't handle IPoIB interface properly

When MASS tried to add node as LXD host, but it failed due to the following error. It seems MASS can’t handle MAC address of IPoIB properly.

invalid input syntax for type macaddr: “00:00:11:0f:fe:80:00:00:00:00:00:00:7c:fe:90:03:00:5d:7c:06” LINE 1: …38:67’, ‘52:54:00:e5:36:44’, ‘fe:54:00:34:15:b9’, '00:00:11:… ^

A node has IPoIB Interfaces. They are not used for MAAS, but MASS can’t complete adding LXD host because of error above.

$ ifconfig -a

ibp4s0f0: flags=4098<BROADCAST,MULTICAST> mtu 4092
unspec 00-00-11-0F-FE-80-00-00-00-00-00-00-00-00-00-00 txqueuelen 256 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ibp4s0f1: flags=4098<BROADCAST,MULTICAST> mtu 4092
unspec 00-00-19-0F-FE-80-00-00-00-00-00-00-00-00-00-00 txqueuelen 256 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I would get fix of this issue and MASS should handle IPoIB interfaces properly otherwise, any nodes can’t be added if nodes have Infiniband adapters and IPoIB interfaces are populated.

here is exact error messags in /var/snap/maas/common/log/regiond.log.

2021-12-23 03:43:14 maasserver.websockets.protocol: [critical] Error on request (36) pod.create: invalid input syntax for type macaddr: “00:00:11:0f:fe:80:00:00:00:00:00:00:7c:fe:90:03:00:5d:7c:06”
LINE 1: …38:67’, ‘52:54:00:e5:36:44’, ‘fe:54:00:34:15:b9’, ‘00:00:11:…
^
Traceback (most recent call last):
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 501, in errback
self._startRunCallbacks(fail)
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 568, in _startRunCallbacks
self._runCallbacks()
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 1475, in gotResult
_inlineCallbacks(r, g, status)
— —
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File “/snap/maas/17913/lib/python3.8/site-packages/maasserver/websockets/handlers/pod.py”, line 209, in create
pod = await deferToDatabase(self._try_sync_and_save, pod)
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/python/threadpool.py”, line 250, in inContext
result = inContext.theWork()
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/python/threadpool.py”, line 266, in
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/python/context.py”, line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File “/snap/maas/17913/usr/lib/python3/dist-packages/twisted/python/context.py”, line 85, in callWithContext
return func(*args,**kw)
File “/snap/maas/17913/lib/python3.8/site-packages/provisioningserver/utils/twisted.py”, line 870, in callInContext
return func(*args, **kwargs)
File “/snap/maas/17913/lib/python3.8/site-packages/provisioningserver/utils/twisted.py”, line 202, in wrapper
result = func(*args, **kwargs)
File “/snap/maas/17913/lib/python3.8/site-packages/maasserver/utils/orm.py”, line 756, in call_within_transaction
return func_outside_txn(*args, **kwargs)
File “/snap/maas/17913/lib/python3.8/site-packages/maasserver/utils/orm.py”, line 559, in retrier
return func(*args, **kwargs)
File “/usr/lib/python3.8/contextlib.py”, line 75, in inner
return func(*args, **kwds)
File “/snap/maas/17913/lib/python3.8/site-packages/maasserver/websockets/handlers/pod.py”, line 330, in _try_sync_and_save
discover_and_sync_vmhost(pod, self.user)
File “/snap/maas/17913/lib/python3.8/site-packages/maasserver/vmhost.py”, line 87, in discover_and_sync_vmhost
vmhost = _update_db(discovered_pod, discovered, vmhost, user)
File “/snap/maas/17913/lib/python3.8/site-packages/maasserver/vmhost.py”, line 296, in _update_db
vmhost.sync(discovered_pod, user, cluster=cluster)
File “/snap/maas/17913/lib/python3.8/site-packages/maasserver/models/bmc.py”, line 1567, in sync
Node.objects.filter(
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/models/query.py”, line 653, in first
for obj in (self if self.ordered else self.order_by(‘pk’))[:1]:
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/models/query.py”, line 274, in iter
self._fetch_all()
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/models/query.py”, line 1242, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/models/query.py”, line 55, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py”, line 1140, in execute_sql
cursor.execute(sql, params)
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/backends/utils.py”, line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/backends/utils.py”, line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/backends/utils.py”, line 84, in _execute
return self.cursor.execute(sql, params)
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/utils.py”, line 89, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File “/snap/maas/17913/usr/lib/python3/dist-packages/django/db/backends/utils.py”, line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: invalid input syntax for type macaddr: “00:00:11:0f:fe:80:00:00:00:00:00:00:7c:fe:90:03:00:5d:7c:06”
LINE 1: …38:67’, ‘52:54:00:e5:36:44’, ‘fe:54:00:34:15:b9’, '00:00:11:…
^

Hi Sihara, this is a known issue and we will be looking at fixing it in next cycle (after April).