Score:0

MAAS failed to deal with infiniband 20-octet long MAC addresses

ug flag

I'm installing MAAS 3.0 (regiond+rackd) on a HPC management node (Ubuntu 18.04). The infiniband network interfaces immediately caused some problems because its MAC-address is 20-octet long, not 6-octet long. But the MAAS DB uses type macaddr for column mac_address in table maasserver_interface, which assumes 6-octet.

2021-07-21 07:37:31 maasserver.start_up: [error] Database error during start-up
Traceback (most recent call last):
  File "/snap/maas/15003/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type macaddr: "20:00:19:07:fe:80:00:00:00:00:00:00:b8:83:03:ff:ff:7f:31:d5"
LINE 1: ...15:fe', '00:11:0a:6c:25:4d', '14:02:ec:33:2b:75', '20:00:19:...
                                                             ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/start_up.py", line 68, in start_up
    yield deferToDatabase(inner_start_up, master=master)
  File "/snap/maas/15003/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
   result = inContext.theWork()
  File "/snap/maas/15003/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/snap/maas/15003/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/snap/maas/15003/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/snap/maas/15003/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 870, in callInContext
    return func(*args, **kwargs)
  File "/snap/maas/15003/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 202, in wrapper
    result = func(*args, **kwargs)
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/utils/orm.py", line 706, in call_with_connection
    return func(*args, **kwargs)
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/utils/__init__.py", line 194, in call_with_lock
    return func(*args, **kwargs)
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/utils/orm.py", line 751, in call_within_transaction
    return func_outside_txn(*args, **kwargs)
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/utils/orm.py", line 554, in retrier
    return func(*args, **kwargs)
  File "/usr/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/start_up.py", line 121, in inner_start_up
    node = RegionController.objects.get_or_create_running_controller()
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/models/node.py", line 741, in get_or_create_running_controller
    node = self._find_or_create_running_controller()
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/models/node.py", line 778, in _find_or_create_running_controller
    node = self._find_running_node()
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/models/node.py", line 798, in _find_running_node
    return get_one(nodes.distinct())
  File "/snap/maas/15003/lib/python3.8/site-packages/maasserver/utils/orm.py", line 112, in get_one
    retrieved_items = tuple(islice(items, 0, 2))
  File "/snap/maas/15003/usr/lib/python3/dist-packages/django/db/models/query.py", line 274, in __iter__
    self._fetch_all()
  File "/snap/maas/15003/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/15003/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/15003/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1140, in execute_sql
    cursor.execute(sql, params)
  File "/snap/maas/15003/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/15003/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/15003/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/snap/maas/15003/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/15003/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: "20:00:19:07:fe:80:00:00:00:00:00:00:b8:83:03:ff:ff:7f:31:d5"
LINE 1: ...15:fe', '00:11:0a:6c:25:4d', '14:02:ec:33:2b:75', '20:00:19:...
                                                             ^

Is there a way to restrict the network interfaces that maas will read? To exclude infiniband intefaces (ib0 & ib1 in my case), for example.

Or I suggest the MAAS developers use a different type (character varying) for column mac_address.

Thanks

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.