Project

General

Profile

Bug #57999

cephadm: cephadm always reports new or changed devices even if devices are the same

Added by Adam King 3 months ago. Updated about 2 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
quincy, pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

This appears to be an issue with the "created" field changing, which should not affect equality in this case

We have tried to look up in the code snippet that is generating the log message as below.
~~~
The code is here: mgr/cephadm/inventory.py:
    def devices_changed(self, host: str, b: List[inventory.Device]) -> bool:
        a = self.devices[host]
        if len(a) != len(b):
            return True
        aj = {d.path: d.to_json() for d in a}
        bj = {d.path: d.to_json() for d in b}
        if aj != bj:
            self.mgr.log.info("Detected new or changed devices on %s" % host)
            return True
        return False
~~~

And while dumping the values of both aj & bj variables, observed that the difference is only for the field "created" which is 30 mins.
     - This 30 mins is after which the above function is called coming from the configuration parameter mgr/cephadm/device_cache_timeout

~~~
aj: {'/dev/sdX': {'ceph_device': None, 'rejected_reasons': [], 'available': True, 'path': '/dev/sdX', 'sys_api': {'human_readable_size': '10.00 GB', 'locked': 0, 'model': 'QEMU HARDDISK', 'nr_requests': '256', 'partitions': {}, 'path': '/dev/sdX', 'removable': '0', 'rev': '2.5+', 'ro': '0', 'rotational': '1', 'sas_address': '', 'sas_device_handle': '', 'scheduler_mode': 'mq-deadline', 'sectors': 0, 'sectorsize': '512', 'size': 10737418240.0, 'support_discard': '4096', 'vendor': 'QEMU'}, 'created': '2022-10-20T01:07:32.604710Z', 'lvs': [], 'human_readable_type': 'hdd', 'device_id': 'QEMU_QEMU_HARDDISK_15bbXXXX-XXXX-40e8-XXXX-946a21dXXXXXX', 'lsm_data': {}}} 
-------------------------------------------------
bj: {'/dev/sdX': {'ceph_device': None, 'rejected_reasons': [], 'available': True, 'path': '/dev/sdX', 'sys_api': {'human_readable_size': '10.00 GB', 'locked': 0, 'model': 'QEMU HARDDISK', 'nr_requests': '256', 'partitions': {}, 'path': '/dev/sdX', 'removable': '0', 'rev': '2.5+', 'ro': '0', 'rotational': '1', 'sas_address': '', 'sas_device_handle': '', 'scheduler_mode': 'mq-deadline', 'sectors': 0, 'sectorsize': '512', 'size': 10737418240.0, 'support_discard': '4096', 'vendor': 'QEMU'}, 'created': '2022-10-20T01:38:30.355023Z', 'lvs': [], 'human_readable_type': 'hdd', 'device_id': 'QEMU_QEMU_HARDDISK_15bbXXXX-XXXX-40e8-XXXX-946a21dXXXXX', 'lsm_data': {}}}
~~~


Related issues

Copied to Orchestrator - Backport #58174: quincy: cephadm: cephadm always reports new or changed devices even if devices are the same In Progress
Copied to Orchestrator - Backport #58175: pacific: cephadm: cephadm always reports new or changed devices even if devices are the same In Progress

History

#1 Updated by Adam King about 2 months ago

  • Pull request ID set to 48817

#2 Updated by Adam King about 2 months ago

  • Status changed from In Progress to Pending Backport

#3 Updated by Backport Bot about 2 months ago

  • Copied to Backport #58174: quincy: cephadm: cephadm always reports new or changed devices even if devices are the same added

#4 Updated by Backport Bot about 2 months ago

  • Copied to Backport #58175: pacific: cephadm: cephadm always reports new or changed devices even if devices are the same added

#5 Updated by Backport Bot about 2 months ago

  • Tags set to backport_processed

Also available in: Atom PDF