Debian: sysinv-agent sometimes reports wrong lvm_pv_name

Bug #1965144 reported by Al Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Al Bailey

Bug Description

Brief Description
-----------------
pvdisplay on Centos and Debian return different values for PV Name.
On Centos it is the actual path, and on Debian it is a symlink.

The pvdisplay command is invoked by sysinv-agent to report disks to sysinv.

The difference in path logic means that sysinv can create additional entries in the database, and those entries are incomplete (they do not have all fields) due to their odd format.

The incomplete rows in the database lead to invalid entries in hieradata, which cause puppet apply failures and eventually leads to an inability to unlock the host.
Typically the first unlock is fine, it is subsequent unlocks and reboots that will fail.

Severity
--------
Major

Steps to Reproduce
------------------
reboot an unlocked debian controller

Expected Behavior
------------------
It shouldnt blow up

Actual Behavior
----------------
It fails the puppet apply.

Reproducibility
---------------
Almost 100%. We think a SCSI backend does not encounter this scenario, but the majority of other disk types do.

System Configuration
--------------------
Debian AIO-SX

Branch/Pull Time/Commit
-----------------------
March 12

Last Pass
---------
Never. We dont typically get this far, as debian is still under development.

Timestamp/Logs
--------------
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager Traceback (most recent call last):
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sysinv/conductor/manager.py", line 5050, in ipv_update_by_ihost
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager self.dbapi.partition_update(
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sysinv/db/sqlalchemy/objects.py", line 29, in wrapper
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager first_result = fn(*args, **kwargs)
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sysinv/db/sqlalchemy/api.py", line 2927, in partition_update
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager query = add_identity_filter(query, partition_id)
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sysinv/db/sqlalchemy/api.py", line 189, in add_identity_filter
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager return query.filter_by(hostname=value)
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 1921, in filter_by
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager clauses = [
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 1922, in <listcomp>
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager _entity_descriptor(zero, key) == value
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sqlalchemy/orm/base.py", line 408, in _entity_descriptor
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager util.raise_(
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager raise exception
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager sqlalchemy.exc.InvalidRequestError: Entity '<class 'sysinv.db.sqlalchemy.models.partition'>' has no property 'hostname'
2022-03-07 22:15:25.499 61824 ERROR sysinv.conductor.manager
sysinv 2022-03-07 22:15:25.519 61824 INFO sysinv.conductor.manager [-] PV not found in Agent. uuid: e46017ee-9ff1-4591-b800-fe4e454358d5 current state: provisioned

Test Activity
-------------
Developer Testing

Workaround
-----------
Dont reboot

Al Bailey (albailey1974)
Changed in starlingx:
assignee: nobody → Al Bailey (albailey1974)
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/+/834032

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config-files (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tools (master)

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

Revision history for this message
Al Bailey (albailey1974) wrote :

The change for config was abandoned.
the config-files and associated tools submissions address this issue

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config-files (master)

Reviewed: https://review.opendev.org/c/starlingx/config-files/+/834205
Committed: https://opendev.org/starlingx/config-files/commit/4cf6884ef2df00c6e813c73271590ba8fbf631d8
Submitter: "Zuul (22348)"
Branch: master

commit 4cf6884ef2df00c6e813c73271590ba8fbf631d8
Author: Al Bailey <email address hidden>
Date: Thu Mar 17 14:57:09 2022 +0000

    Adding lvm2-config package for debian

    This initial submission of this package overrides:
     - /etc/lvm/lvm.conf (based on the file from lvm2 2.03.11)

    The modification(s) to lvm.conf are:
     - set a value for preferred_names

    Test Plan:
      Build the package
      Build a Debian ISO
      Install/Bootstrap/Unlock Debian AIO-SX
      Verify that pvdisplay shows expected values

    Co-authored-by: Robert Church <email address hidden>
    Closes-Bug: 1965144
    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: Ic3a80ab17c58eaed1c3d1886f9c699b3940a36c3

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tools (master)

Reviewed: https://review.opendev.org/c/starlingx/tools/+/834206
Committed: https://opendev.org/starlingx/tools/commit/1c83f3834b6ccb0b9fa5882dc951407b85548c1e
Submitter: "Zuul (22348)"
Branch: master

commit 1c83f3834b6ccb0b9fa5882dc951407b85548c1e
Author: Al Bailey <email address hidden>
Date: Thu Mar 17 17:54:05 2022 +0000

    Adding lvm2-config to the debian install

    This includes a lvm2-config package which overwrites /etc/lvm/lvm.conf

    Depends-On: https://review.opendev.org/c/starlingx/config-files/+/834205
    Partial-Bug: 1965144
    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: Idb2ed9e7a29de77298bfa05a4cf34fbefe288017

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on config (master)

Change abandoned by "Al Bailey <email address hidden>" on branch: master
Review: https://review.opendev.org/c/starlingx/config/+/834032
Reason: Fixed by adding a lvm2-config package

Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.debian
Changed in starlingx:
importance: Undecided → Medium
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.