host-swact blocked during USM upgrade

Bug #2066063 reported by Heitor Matsui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Invalid
Low
Heitor Matsui

Bug Description

Brief Description
-----------------
host-swact is blocked during USM upgrade due to failures on swact semantic check from host api

Severity
--------
Critical, unable to swact to continue the upgrade

Steps to Reproduce
------------------
- start USM upgrade
- deploy controller-1
- try host-swact

Expected Behavior
------------------
controller-1 becomes active

Actual Behavior
----------------
swact fails with database errors on sysinv.log

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Multi-node

Branch/Pull Time/Commit
-----------------------
master - 2024-05-16

Last Pass
---------
2024-05-14

Timestamp/Logs
--------------
sysinv 2024-05-16 18:57:20.657 2234536 ERROR wsme.api [req-9ce1ce34-9717-408f-ae2d-74741d312ebd admin admin] Server-side error: "Entity '<class 'sysinv.db.sqlalchemy.models.Load'>' has no property 'hostname'". Detail:
Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/sqlalchemy/orm/base.py", line 406, in _entity_descriptor
    return getattr(entity, key)

AttributeError: type object 'Load' has no attribute 'hostname'

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

Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/wsmeext/pecan.py", line 84, in callfunction
    result = f(self, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/sysinv/api/controllers/v1/host.py", line 1989, in patch
    return self._patch_gen(uuid, patch)

  File "/usr/lib/python3/dist-packages/oslo_concurrency/lockutils.py", line 360, in inner
    return f(*args, **kwargs)

  File "/usr/lib/python3/dist-packages/sysinv/api/controllers/v1/host.py", line 1997, in _patch_gen
    return self._patch(uuid, patch)

  File "/usr/lib/python3/dist-packages/sysinv/api/controllers/v1/host.py", line 2167, in _patch
    if self.action_check(myaction, hostupdate):

  File "/usr/lib/python3/dist-packages/sysinv/api/controllers/v1/host.py", line 4987, in action_check
    self.check_swact(hostupdate)

  File "/usr/lib/python3/dist-packages/sysinv/api/controllers/v1/host.py", line 6575, in check_swact
    self._semantic_check_swact_upgrade(hostupdate.ihost_orig,

  File "/usr/lib/python3/dist-packages/sysinv/api/controllers/v1/host.py", line 6346, in _semantic_check_swact_upgrade
    from_sw_version = objects.load.get_by_uuid(

  File "/usr/lib/python3/dist-packages/sysinv/objects/base.py", line 103, in wrapper
    result = fn(cls, context, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/sysinv/objects/load.py", line 33, in get_by_uuid
    return self.dbapi.load_get(uuid)

  File "/usr/lib/python3/dist-packages/sysinv/db/sqlalchemy/objects.py", line 29, in wrapper
    first_result = fn(*args, **kwargs)

  File "/usr/lib/python3/dist-packages/sysinv/db/sqlalchemy/api.py", line 6742, in load_get
    query = add_identity_filter(query, load)

  File "/usr/lib/python3/dist-packages/sysinv/db/sqlalchemy/api.py", line 190, in add_identity_filter
    return query.filter_by(hostname=value)

  File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 1921, in filter_by
    clauses = [

  File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 1922, in <listcomp>
    _entity_descriptor(zero, key) == value

  File "/usr/lib/python3/dist-packages/sqlalchemy/orm/base.py", line 408, in _entity_descriptor
    util.raise_(

  File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception

sqlalchemy.exc.InvalidRequestError: Entity '<class 'sysinv.db.sqlalchemy.models.Load'>' has no property 'hostname'
: sqlalchemy.exc.InvalidRequestError: Entity '<class 'sysinv.db.sqlalchemy.models.Load'>' has no property 'hostname'

Test Activity
-------------
Feature Testing

Workaround
----------
N/A

Tags: stx.update
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/config/+/919980

Changed in starlingx:
status: New → In Progress
Revision history for this message
Heitor Matsui (heitormatsui) wrote :
Changed in starlingx:
status: In Progress → Invalid
assignee: nobody → Heitor Matsui (heitormatsui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on config (master)

Change abandoned by "Heitor Matsui <email address hidden>" on branch: master
Review: https://review.opendev.org/c/starlingx/config/+/919980
Reason: Fixes from this commit will be merged with https://review.opendev.org/c/starlingx/config/+/919962

Ghada Khalil (gkhalil)
tags: added: stx.update
Changed in starlingx:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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