SUSE / DeepSea

A collection of Salt files for deploying, managing and automating Ceph.
GNU General Public License v3.0
160 stars 75 forks source link

Ignore disks with GPT headers or unavailable #1839

Closed swiftgist closed 4 years ago

swiftgist commented 4 years ago

Since the blkid_api is not available, use blkid() directly. Add a separate command currently rather than changing disks.report.

Signed-off-by: Eric Jackson ejackson@suse.com bsc: 1171002, 1171887


Checklist:

swiftgist commented 4 years ago

@jschmid1 Let me know your thoughts on simply extending disks.report over creating a new command disks.inventory. This pulled in the https://github.com/SUSE/DeepSea/compare/SES6...wip-available change as well.

The output from a contrived setup is

# salt-run disks.inventory target=data5*
Found DriveGroup <default>
Calling dg.report on compound target data5*
Found DriveGroup <default>
Calling dg.ignored on compound target data5*
|_
  ----------
  data5.ceph:
      |_
        - 0
        - 
          Total OSDs: 2

          Solid State VG:
            Targets:   block.db                  Total size: 5.00 GB                  
            Total LVs: 2                         Size per LV: 2.50 GB                  
            Devices:   /dev/vdi

            Type            Path                                                    LV Size         % of device
          ----------------------------------------------------------------------------------------------------
            [data]          /dev/vdc                                                19.00 GB        100.0%
            [block.db]      vg: vg/lv                                               2.50 GB         50%
          ----------------------------------------------------------------------------------------------------
            [data]          /dev/vdg                                                19.00 GB        100.0%
            [block.db]      vg: vg/lv                                               2.50 GB         50%
|_
  ----------
  data5.ceph:
      Device                                          Reason
      --------------------------------------------------------------------------------
      /dev/vdb                      Ignoring disk /dev/vdb. Disk is not available
      /dev/vdd                      Ignoring disk /dev/vdd. Disk is not available
      /dev/vde                      Ignoring disk /dev/vde. GPT headers present
      /dev/vdf                      Ignoring disk /dev/vdf. Disk is not available
      /dev/vdh                      Ignoring disk /dev/vdh. Disk is not available
      /dev/vdi                      Ignoring disk /dev/vdi. Filter did not match
jschmid1 commented 4 years ago

@susebot run teuthology

susebot commented 4 years ago

Commit 8199a3220f53e46e907a844321ae1c86475f9acb is OK for suite deepsea:tier2. Check tests results in the Jenkins job: https://storage-ci.suse.de/job/pr-deepsea/461/