Howto: 'one line patch' in deployed cluster?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a 'Howto' or 'workflow' to implement a one-line patch in a running cluster?  With full understanding it will be gone on the next upgrade?

Hopefully without having to set up an entire packaging/development environment?

Thanks!


To implement:

 * /Subject/: Re: Permanent KeyError: 'TYPE' ->17.2.7: return
   self.blkid_api['TYPE'] == 'part'
 * /From/: Sascha Lucas <ceph-users@xxxxxxxxx>

Problem found: in my case this is caused by DRBD secondary block devices, which can not be read until promoted to primary.

ceph_volume/util/disk.py runs in blkid():

$ blkid -c /dev/null -p /dev/drbd4
blkid: error: /dev/drbd4: Wrong medium type

but does not care about its return code.

A quick fix is to use the get() method to automatically fall back to None for non existing keys:

--- a/ceph_volume/util/device.py 2023-11-10 07:00:01.552497107 +0000
+++ b/ceph_volume/util/device.py 2023-11-10 08:54:40.320718690 +0000

@@ -476,13 +476,13 @@
     @property
     def is_partition(self):
         self.load_blkid_api()
         if self.disk_api:
             return self.disk_api['TYPE'] == 'part'
         elif self.blkid_api:
-            return self.blkid_api['TYPE'] == 'part'
+            return self.blkid_api.get('TYPE') == 'part'
         return False

Don't know why this is triggered in 17.2.7.

_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux