Closed BjoernT closed 9 years ago
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
Yes that's right, especially iscsi presented cinder volumes need to be excluded on compute nodes
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:
"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.
:+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.
Doc team, we introduced a new user variable here, which will result in doc changes. Please ping me if you need any clarification.
Doc update: https://github.com/rcbops/privatecloud-docs/pull/744 Please review!
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