[2.6] newly virsh pod cannot be removed

Bug #1859733 reported by Bui Hong Ha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Expired
Undecided
Unassigned

Bug Description

Maas refuses to remove a virsh pod with following messages were output to regiond.log

---
AttributeError: 'Subnet' object has no attribute '_vlan_cache'

        During handling of the above exception, another exception occurred:
...
            allow_joins=allow_joins, split_subq=split_subq,
          File "/usr/lib/python3/dist-packages/django/db/models/sql/query.py", line 1160, in build_filter
            value, lookups, used_joins = self.prepare_lookup_value(value, lookups, can_reuse, allow_joins)
          File "/usr/lib/python3/dist-packages/django/db/models/sql/query.py", line 1019, in prepare_lookup_value
            if (connections[DEFAULT_DB_ALIAS].features.interprets_empty_strings_as_nulls and
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 838, in __getattr__
            "disabled." % threading.currentThread().name)
        RuntimeError: Database connections in this thread (MainThread) are disabled.

I attached the regiond.log file for reference

Revision history for this message
Bui Hong Ha (telescreen) wrote :
Revision history for this message
Adam Collard (adam-collard) wrote :
Download full text (8.3 KiB)

2020-01-15 00:35:13 maasserver.websockets.protocol: [critical] Error on request (22660) pod.delete: <ProtectedError instance at 0x7f3743c0d408 with str error:
  Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 178, in __get__
     rel_obj = getattr(instance, self.cache_name)
 AttributeError: 'Subnet' object has no attribute '_vlan_cache'

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/python/reflect.py", line 448, in safe_str
     return str(o)
   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 229, in __repr__
     return '<%s %r>' % (self.__class__.__name__, data)
   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 590, in __repr__
     u = six.text_type(self)
   File "/usr/lib/python3/dist-packages/maasserver/models/subnet.py", line 438, in __str__
     self.name, self.cidr, self.vlan.vid)
   File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 184, in __get__
     rel_obj = self.get_object(instance)
   File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 159, in get_object
     return qs.get(self.field.get_reverse_related_filter(instance))
   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 371, in get
     clone = self.filter(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 784, in filter
     return self._filter_or_exclude(False, *args, **kwargs)
   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 802, in _filter_or_exclude
     clone.query.add_q(Q(*args, **kwargs))
   File "/usr/lib/python3/dist-packages/django/db/models/sql/query.py", line 1250, in add_q
     clause, _ = self._add_q(q_object, self.used_aliases)
   File "/usr/lib/python3/dist-packages/django/db/models/sql/query.py", line 1270, in _add_q
     current_negated, allow_joins, split_subq)
   File "/usr/lib/python3/dist-packages/django/db/models/sql/query.py", line 1276, in _add_q
     allow_joins=allow_joins, split_subq=split_subq,
   File "/usr/lib/python3/dist-packages/django/db/models/sql/query.py", line 1160, in build_filter
     value, lookups, used_joins = self.prepare_lookup_value(value, lookups, can_reuse, allow_joins)
   File "/usr/lib/python3/dist-packages/django/db/models/sql/query.py", line 1019, in prepare_lookup_value
     if (connections[DEFAULT_DB_ALIAS].features.interprets_empty_strings_as_nulls and
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 838, in __getattr__
     "disabled." % threading.currentThread().name)
 RuntimeError: Database connections in this thread (MainThread) are disabled.
 >
 Traceback (most recent call last):
   File "/usr/lib/python3.6/threading.py", line 864, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 852, in worker
     return target()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
     task...

Read more...

Revision history for this message
Björn Tillenius (bjornt) wrote :

Which version of MAAS are you running?

Also, could you attach the output of:

  maas $profile pods read

Changed in maas:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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