summaryrefslogtreecommitdiff
path: root/ironic_python_agent/hardware.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Delete_configuration, consider removed raid members as well"Zuul2019-09-241-2/+64
|\
| * Delete_configuration, consider removed raid members as wellRaphael Glon2019-09-161-2/+64
| | | | | | | | | | | | Change-Id: Ie4f62d8855d3f30a55f7032918dfed1f1d8b5b31 Story: #2006535 Task: #36591
* | Revert "Software raid: mbr/gpt partition table alternative"raphael.glon2019-09-231-15/+3
|/ | | | | | | | | | | | | | | This reverts commit 258d963e406c512bb90295c700ee22e4609abcd0. Remove the mbr/gpt choice from softraid features for now, as it cannot be directly used without additional commits, to be pushed soon. Furthermore, it could even lead to instance spawn misconfiguration, if the disk label specified in instance_info cannot fit with the boot mode + partitioning layout (example: you build softraid over gpt, then you lose the mbr gap. Thus you need an additional bios boot partition, in BIOS boot mode, or an esp, in UEFI boot mode, outside the raid, for grub to install itself inthere, to be able to assemble raid and find root device correctly). Change-Id: I3a0a704ea99a40eb3fc8e879270dfbd356951488
* Merge "Handle floppy disk controllers"Zuul2019-08-271-1/+11
|\
| * Handle floppy disk controllersJulia Kreger2019-08-221-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | Cleaning presently fails on floopy disk controllers. While they may be uncommon in server hardware, they can exist in virtual machines, and even as virtual devices on some hardware chassises. Change-Id: I8ba07bfd5ca1e503f46c1bac4fffb5f509186939 Story: 2006419 Task: 36309
* | Merge "Softraid: partitioning fixes"Zuul2019-08-211-14/+66
|\ \ | |/ |/|
| * Softraid: partitioning fixesRaphael Glon2019-08-151-14/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: - Softraid creation: size_gb unit conversion to default parted unit. - Softraid creation issue when we specify several logical disks with more than one having its size specified (not 'MAX'). - Softraid creation issue when a logical disk with size_gb 'MAX' is not last in the list. Change-Id: I13e087611354a35acc2925037f1b10047477d972 Story: 2006352 Task: 36118
* | Merge "Software RAID: Ignore missing component devices or holder disks"Zuul2019-08-191-8/+18
|\ \ | |/ |/|
| * Software RAID: Ignore missing component devices or holder disksArne Wiebalck2019-08-161-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | With the addition of devices with type 'MD' during list_all_block_devices (for "empty" devices), partitions on top of md devices are now returned as well. These don't need deletion, so skip these during software RAID cleanup. Story: #2006355 Task: #36121 Change-Id: Idff9b9b0cbe42b57aa315ae07c0b51c35c9ade1e
* | Merge "Fixes get_holder disks with nvme drives"Zuul2019-08-141-2/+13
|\ \
| * | Fixes get_holder disks with nvme drivesRaphael Glon2019-08-131-2/+13
| | | | | | | | | | | | Change-Id: I195ffdeeb3c13bdec5fc1735b82efa53c8d9d3de
* | | Merge "Software RAID: Handle empty target_raid_config"Zuul2019-08-131-0/+3
|\ \ \
| * | | Software RAID: Handle empty target_raid_configArne Wiebalck2019-08-121-0/+3
| | |/ | |/| | | | | | | | | | | | | | | | If the target_raid_config is empty, we should not try to create software RAID devices. Change-Id: I5a29dc34a07903be0cc1b19594f160ac63c6ed2d
* | | Merge "Fixes physical memory fetching for aarch64"Zuul2019-08-121-0/+5
|\ \ \
| * | | Fixes physical memory fetching for aarch64liyingjun2019-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output for aarch64[1] `lshw -quiet -json` is a bit different from x86_64, this will lead to 0 physical memory calculated currently. This patch aims to make it compatible for aarch64 when getting physical memory [1]: http://paste.openstack.org/show/754789/ Change-Id: Ib7b4ee857d8550e3d75ac8a53c61f0ecab45feff
* | | | Ignore /dev/ramX devices for any purposesDmitry Tantsur2019-08-121-4/+5
| |/ / |/| | | | | | | | | | | | | | | | | | | | While most modern Linux distributions do not create RAM disks, newer TinyCoreLinux actually does. Ignore them since we don't want to deploy to RAM. Change-Id: Ia810c7fb47f7098b8173d765ff9c33b48a223ff1
* | | Software RAID: try to assemble RAID on start-upDmitry Tantsur2019-08-091-0/+12
| |/ |/| | | | | | | | | | | | | TinyIPA does not do it, which prevents deployment on RAID devices. Story: #2004581 Task: #36196 Change-Id: I6c1d90b4669102ab59588ab15f7166626c4d72be
* | Software raid: mbr/gpt partition table alternativeRaphael Glon2019-08-081-3/+15
| | | | | | | | | | | | GPT/MBR partition table type alternative on softraid creation. Change-Id: Ib3d00034fe687328a1ea3e038f6f86d2746e63a0
* | Do not try to use zRAM devices for anythingDmitry Tantsur2019-08-071-0/+6
| | | | | | | | | | | | | | These devices are mapped into memory, but nonetheless can appear in lsblk output. Ignore them explicitly. Change-Id: I2bb595ef29abdc98bd887bdf41c3c7f64cc3a7e6
* | Adds software raid creation support on nvme drives.Raphael Glon2019-08-061-2/+17
|/ | | | | | Change-Id: Ia725fcaee6018255af3dd7ff0eb2fb1cfbd2b322 Story: #2006341 Task: #36091
* Merge "Trivial: Add missing quote when detecting raid devices"Zuul2019-07-161-1/+1
|\
| * Trivial: Add missing quote when detecting raid devicesArne Wiebalck2019-07-161-1/+1
| | | | | | | | Change-Id: I26008295c62abaeb31a32682abd1de21c20d15a9
* | Merge "Software RAID: Detect component & holder disks in broken RAIDs"Zuul2019-07-161-6/+4
|\ \ | |/ |/|
| * Software RAID: Detect component & holder disks in broken RAIDsArne Wiebalck2019-07-121-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch amends the component and holder disk detection code to be able to also extract information from inactive/broken md devices. This may be required in case of broken RAID-0 (which will show up as an empty inactive device after a reboot which none the less keeps its spare devices 'in-use' and prevents RAID re-creation). Story: #2006215 Task: #35808 Change-Id: I4ce41b335843e18c67668192d2fccff1c6cdfb92
* | Merge "Include empty devices when listing block devices"Zuul2019-07-151-5/+7
|\ \
| * | Include empty devices when listing block devicesArne Wiebalck2019-07-151-5/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | When listing block devices, empty devices are not listed by default. In order to clean up broken software RAID devices, however, we need to list these as well. This patch adds the corresponding option to 'lsblk', makes sure the device type filtering handles the additional device type ('md' instead of 'raid*' when an md device has only spares), and takes care of lsblk reporting size '' for empty devices. Story: #2006215 Task: #35807 Change-Id: I523e2ed90f3a477b5f5f27054b65fcfd26239ba2
* | Using from_device_file from DevicesRiccardo Pittau2019-07-091-3/+2
|/ | | | | | | | | | | The from_device_file method in pyudev.Device is deprecated since version 0.18 Using the same method from pyudev.Devices is now recommended. Increasing minimum version of pyudev to 0.18 and correctly handling exception raised by from_device_file. Change-Id: I0637585241c81a36f69aef8017f1134f5c526eb1
* Correct formatting of a warning when lshw cannot be runDmitry Tantsur2019-06-261-1/+1
| | | | Change-Id: I7c55aee4b3b52cb414a595cf548e1f22e954f619
* Stop logging lshw output, collect it with other logs insteadDmitry Tantsur2019-06-171-1/+1
| | | | | | | | | The lshw output is huge even on virtual machines, and it pollutes the debug logging. This change silences it. Instead, the lshw output is collected as part of the ramdisk logs. Depends-On: https://review.opendev.org/#/c/665635/ Change-Id: I6a3015b2d8d09f6f48b5cbd39dc84bd75b72f909
* Merge "Software RAID: Protect RAID metadata upon cleaning"3.7.0Zuul2019-06-131-3/+29
|\
| * Software RAID: Protect RAID metadata upon cleaningArne Wiebalck2019-06-121-3/+29
| | | | | | | | | | | | | | | | | | | | | | During automatic cleaning, the generic hardware manager erases the data and the metadata on all block devices. If this is done on RAID members, the RAID device is destroyed. This patch proposes to exclude RAID members from (meta)data cleaning. Change-Id: I9ec7674925d981062c311cf34eadfe4cb891f077 Story: #2004581 Task: #33640
* | Merge "Get the hostname of the introspected host"Zuul2019-06-121-0/+1
|\ \ | |/ |/|
| * Get the hostname of the introspected hostBrad P. Crochet2019-06-121-0/+1
| | | | | | | | | | | | | | | | | | This will retrieve the hostname of the host being introspected, and return it as part of the introspection data. Change-Id: I54084251e1b0f3a40fe5ac760b2a7e45199c9fdb Story: #2005867 Task: #33674
* | Software RAID: Don't preformat log stringsArne Wiebalck2019-06-071-28/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the preformatting of log messages to avoid any formatting is done when the corresponding log level not enabled. Additional nits addressed: - make the supported RAID levels a top-level frozenset - remove unused return value from validate_configuration Follow-up to Id20302537f7994982c7584af546a7e7520e9612b Change-Id: If6484847a16f938c80523f0b7ec6ae52ea9cf598
* | Merge "Software RAID: Fix shell commands"Zuul2019-06-071-13/+11
|\ \ | |/ |/|
| * Software RAID: Fix shell commandsArne Wiebalck2019-06-061-13/+11
| | | | | | | | | | | | | | | | | | Pass an array to utils.execute() or enforce string usage via 'shell=True', but don't mix. Follow-up to Id20302537f7994982c7584af546a7e7520e9612b Change-Id: I2e6c628360aecf81039089af78b19fe6a956e564
* | Merge "Software RAID: Add IPA deploy support"Zuul2019-06-051-6/+6
|\ \ | |/ |/|
| * Software RAID: Add IPA deploy supportArne Wiebalck2019-06-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | This patch proposes to extend the IPA to be able to deploy on software RAID devices. The IPA needs to be able to detect an md device, find the underlying holder disks and configure grub on them. Change-Id: Ieb2c95ff130b5cc1e643fcde500066d9458ddbec Story: #2004581 Task: #29102
* | Merge "Software RAID: Create/delete configurations"Zuul2019-06-051-0/+374
|\ \ | |/
| * Software RAID: Create/delete configurationsArne Wiebalck2019-06-041-0/+375
| | | | | | | | | | | | | | | | | | | | This patch proposes to extend the IPA to be able to configure software RAID devices. For this, the {create,delete}_configuration methods of the GenericHardwareManager are implemented. Change-Id: Id20302537f7994982c7584af546a7e7520e9612b Story: #2004581 Task: #29101
* | Add more channel number for detecting BMC IPv6 addressDongcan Ye2019-05-201-3/+4
| | | | | | | | | | | | | | | | | | | | This is a missing fix for patch.[1] [1] https://review.opendev.org/#/c/656275/ Change-Id: I8443ae0c08487afea383e111b6c2b6d5941d4024 Task: 30654 Story: 2005528
* | Add more channel number for detecting BMC IP addressDongcan Ye2019-05-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPMI SPEC[1] assignment channel number 1-11 for vendors implementation(We an search "Channel Numbers" in section 6.3). We met an baremetal product, like H3C, use number 8 as LAN channel. Current code limit channel number to 1~7, I think this can increase to 1~11. [1] https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf Change-Id: I63a6ff91d702b990ef09da13e6e2e269e7274cce Task: 30654 Story: 2005528
* | Merge "Ironic python agent does not extract correct available memory"Zuul2019-04-161-6/+8
|\ \
| * | Ironic python agent does not extract correct available memoryUros Orozel2019-04-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes parsing of memory class output of lshw output. Task: 30201 Story: 2005308 Change-Id: I0e7ff9f86a266d2f798457136fed0100c78569e2
* | | Merge "Discover IPv6 BMC address"Zuul2019-04-101-0/+76
|\ \ \
| * | | Discover IPv6 BMC addressNikolay Fedotov2019-04-081-4/+80
| | |/ | |/| | | | | | | | | | | | | Change-Id: Ia7f24c1df782de4809a5195876bbf0309b481fd7 Story: #2005133 Task: #29817
* | | Fix docs job failure due to malformated docstringKaifeng Wang2019-04-091-4/+4
| |/ |/| | | | | Change-Id: Ic3532e51481fd07e2f816aeacb07ded2d56791ee
* | Add 'interface' to get_clean_steps docstringMark Goddard2019-03-211-0/+2
|/ | | | Change-Id: Ice547f5eec849650828e1bd1aac48e7f041eeb34
* Allow erasing metadata from disk partitionsCorey Wright2018-11-131-4/+19
| | | | | | | | | | | | | Modify the metadata erasing call chain to retrieve a list of devices that includes partitions in addition to disks so it can erase metadata from all of them, otherwise incidentally recreating disk partitions causes the Linux kernel to discover and automatically recreate some types of storage entities (eg LVM PVs, VGs, & LVs, RAID members & devices). Change-Id: If8f47a083966051856439e3291a6872929b93e3b Story: #2003673 Task: #26192
* Merge "Fix multi-device behavior"Zuul2018-11-121-9/+38
|\