summarylogtreecommitdiffstats
path: root/ceph-18.2.2-backport-ceph-volume-unbound-var.patch
blob: 4efef9eca561117a068701ec4937ec8d35fd50af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 0e95b27402e46c34586f460d2140af48d03fa305 Mon Sep 17 00:00:00 2001
From: Zack Cerza <zack@redhat.com>
Date: Thu, 7 Sep 2023 11:58:22 -0700
Subject: [PATCH] ceph-volume: Fix unbound var in disk.get_devices()

00ba00fdfab8 looks to have regressed.

Signed-off-by: Zack Cerza <zack@redhat.com>
---
 src/ceph-volume/ceph_volume/util/disk.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py
index a96b0f0a7f84a..0a59cb0ba1cfb 100644
--- a/src/ceph-volume/ceph_volume/util/disk.py
+++ b/src/ceph-volume/ceph_volume/util/disk.py
@@ -878,6 +878,7 @@ def get_devices(_sys_block_path='/sys/block', device=''):
         for key, file_ in facts:
             metadata[key] = get_file_contents(os.path.join(sysdir, file_))
 
+        device_slaves = []
         if block[2] != 'part':
             device_slaves = os.listdir(os.path.join(sysdir, 'slaves'))
             metadata['partitions'] = get_partitions_facts(sysdir)