New maas check disk_utilisation assumes wrong disk layout

Bug #1399418 reported by Ian Cordasco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Medium
Matt Thompson

Bug Description

Opened by BjoernT on 2014-10-28 21:46:01+00:00 at https://github.com/rcbops/ansible-lxc-rpc/issues/430

------------------------------------------------------------

New maas "check disk_utilisation" assumes wrong disk layout, that sda though sdc are existing.
I fact most of the deployments would probably use one SCSI device carved up via LVM and the remaining checks for sdb and sdc are failing. Please add a loop around lsblk | grep 'sd[a-z] ' | sort -u | awk '{print $1}' or similar logic to get the available SCSI devices. Also the name should be corrected to disk_utilization

Tags: doc, enhancement, in progress, needs review, prio:1

====================== COMMENTS ============================

Comment created by mattt416 on 2014-10-29 10:32:56+00:00

Hi @BjoernT,

It's probably not safe to even assume sd[a-z]. Would you have an objection to making a user variable for the partitions to check? I'd envisage this being an array which we'd loop over to create the necessary alarms.

Let me know what you think.

--Matt

------------------------------------------------------------

Comment created by BjoernT on 2014-10-29 14:43:29+00:00

Yes that's right, especially iscsi presented cinder volumes need to be excluded on compute nodes

------------------------------------------------------------

Comment created by cloudnull on 2014-10-29 23:06:42+00:00

This may be an issue that we can solve using ansible facts. Within the facts ansible creates a dictionary of all available drives and partitioning.

Example:
``` json
        "ansible_devices": {
            "sda": {
                "holders": [],
                "host": "RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 01)",
                "model": "PERC H710",
                "partitions": {
                    "sda1": {
                        "sectors": "1998848",
                        "sectorsize": 512,
                        "size": "976.00 MB",
                        "start": "2048"
                    },
                    "sda2": {
                        "sectors": "4681986048",
                        "sectorsize": 512,
                        "size": "2.18 TB",
                        "start": "2000896"
                    }
                },
                "removable": "0",
                "rotational": "1",
                "scheduler_mode": "deadline",
                "sectors": "4683988992",
                "sectorsize": "512",
                "size": "2.18 TB",
                "support_discard": "0",
                "vendor": "DELL"
            }
        }
```

With that data we should be able to create a correct drive layout by looping over the devices and building the machines disk "utilisation" check based on the hash of partitions. This should allow us to easily build an accurate drive layout without guessing or creating some overly complicated regex. Just a thought and may be worth investigating.

------------------------------------------------------------

Comment created by mattt416 on 2014-10-30 09:47:20+00:00

:+1:

That sounds good @cloudnull. Perhaps what we then do is have a user variable for exclusions should the operator not care about specific partitions filling up.

------------------------------------------------------------

Comment created by mattt416 on 2014-11-14 14:00:07+00:00

Doc team, we introduced a new user variable here, which will result in doc changes. Please ping me if you need any clarification.

------------------------------------------------------------

Comment created by klevenstein on 2014-11-17 19:23:02+00:00

Doc update: https://github.com/rcbops/privatecloud-docs/pull/744
Please review!

Revision history for this message
Kevin Carter (kevin-carter) wrote :

This fix was released prior to the stackforge migration.

Changed in openstack-ansible:
status: New → Fix Released
milestone: none → 9.0.4
assignee: nobody → Kevin Carter (kevin-carter)
importance: Undecided → Medium
assignee: Kevin Carter (kevin-carter) → Matt Thompson (mattt416)
Changed in openstack-ansible:
status: Fix Released → Fix Committed
Changed in openstack-ansible:
milestone: 9.0.4 → 10.1.0
Changed in openstack-ansible:
status: Fix Committed → Fix Released
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.