Skip to content

Commit

Permalink
Add support for blade centers
Browse files Browse the repository at this point in the history
assuming the naming convention is followed as :

  rack-uloc-blade-type.domain

where "blade" would be 000 for single system chassis systems,
while for bladecenters such as the fx2 chassis from Dell would
use values of "b01", "b02", etc.  This patch will extend the
idrac_interfaces lookups to differentiate between each blade
and will require a distinct entry for each for the "foreman"
and "director" types.  For example, if you have hosts with these
names:

  f01-h20-b01-fc640.example.com
  f01-h20-b02-fc640.example.com

Then you will also likely want to have the following entries
in your idrac_interfaces.yml file:

director_fc640_b01_interfaces: NIC.ChassisSlot.8-1-1,HardDisk.List.1-1,NIC.Integrated.1-1-1
director_fc640_b02_interfaces: NIC.ChassisSlot.4-1-1,HardDisk.List.1-1,NIC.Integrated.1-1-1
foreman_fc640_b01_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.ChassisSlot.8-1-1
foreman_fc640_b02_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.ChassisSlot.4-1-1

the reason is that the shared IO modules map interfaces to different
PCI slots from the host perspective, and as such the boot devices
will be different depending on which blade you're working with.

If the hostname contains the 000 instead, then we don't alter the
director and foreman entries (i.e. no suffix is added).

Fixes: #319
Change-Id: I84821bcdc8e768c6e1eb1c2c58c10f2e8a10e57e
  • Loading branch information
kambiz-aghaiepour committed Mar 11, 2020
1 parent 92b0ff1 commit fd3195e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions conf/idrac_interfaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
#
# Also see /opt/quads/quads/config.py SUPPORTED list if adding system types.
#
director_fc640_b01_interfaces: NIC.ChassisSlot.8-1-1,HardDisk.List.1-1,NIC.Integrated.1-1-1
director_fc640_b02_interfaces: NIC.ChassisSlot.4-1-1,HardDisk.List.1-1,NIC.Integrated.1-1-1
director_fc640_b03_interfaces: NIC.ChassisSlot.6-1-1,HardDisk.List.1-1,NIC.Integrated.1-1-1
director_fc640_b04_interfaces: NIC.ChassisSlot.2-1-1,HardDisk.List.1-1,NIC.Integrated.1-1-1
director_r620_interfaces: NIC.Slot.2-4,HardDisk.List.1-1,NIC.Slot.2-1,NIC.Slot.2-2,NIC.Slot.2-3,NIC.Integrated.1-3-1
director_r630_interfaces: NIC.Integrated.1-2-1,HardDisk.List.1-1,NIC.Slot.2-1-1
director_r640_interfaces: NIC.Slot.3-1,HardDisk.List.1-1,NIC.Slot.3-2,NIC.Integrated.1-1-1
director_r720xd_interfaces: NIC.Slot.4-2-1,HardDisk.List.1-1,NIC.Integrated.1-3-1
director_r730xd_interfaces: NIC.Integrated.1-2-1,HardDisk.List.1-1,NIC.Integrated.1-3-1
director_r740xd_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.Integrated.1-3-1
director_r930_interfaces: NIC.Integrated.1-2-1,HardDisk.List.1-1,NIC.Integrated.1-3-1
foreman_fc640_b01_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.ChassisSlot.8-1-1
foreman_fc640_b02_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.ChassisSlot.4-1-1
foreman_fc640_b03_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.ChassisSlot.6-1-1
foreman_fc640_b04_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.ChassisSlot.2-1-1
foreman_r620_interfaces: NIC.Integrated.1-3-1,HardDisk.List.1-1,NIC.Slot.2-4,NIC.Slot.2-1,NIC.Slot.2-2,NIC.Slot.2-3
foreman_r630_interfaces: NIC.Slot.2-1-1,HardDisk.List.1-1,NIC.Integrated.1-2-1
foreman_r640_interfaces: NIC.Integrated.1-1-1,HardDisk.List.1-1,NIC.Slot.3-1,NIC.Slot.3-2
Expand Down
2 changes: 1 addition & 1 deletion quads/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def quads_load_config(quads_config):

QUADSVERSION = "1.1.2"
QUADSCODENAME = "gaúcho"
SUPPORTED = ["r620", "r630", "r640", "r720", "r730xd", "r930", "r730", "r740xd", "r720xd"]
SUPPORTED = ["fc640", "r620", "r630", "r640", "r720", "r730xd", "r930", "r730", "r740xd", "r720xd"]
SUPERMICRO = ["1029p", "1029u", "1028r", "6029p", "6018r", "6048r", "5039ms", "6049p"]
OFFSETS = {"em1": 0, "em2": 1, "em3": 2, "em4": 3}
TEMPLATES_PATH = os.path.join(os.path.dirname(__file__), "templates")
Expand Down
9 changes: 9 additions & 0 deletions quads/tools/badfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ async def get_host_type(self, _interfaces_path):
raise BadfishException

host_model = self.host.split(".")[0].split("-")[-1]
host_blade = self.host.split(".")[0].split("-")[-2]
if host_blade != "000":
host_model = "%s_%s" % (host_model, host_blade)
interfaces = {}
for _host in ["foreman", "director"]:
match = True
Expand Down Expand Up @@ -386,6 +389,9 @@ async def change_boot_order(self, _interfaces_path, _host_type):
raise BadfishException

host_model = self.host.split(".")[0].split("-")[-1]
host_blade = self.host.split(".")[0].split("-")[-2]
if host_blade != "000":
host_model = "%s_%s" % (host_model, host_blade)
interfaces = definitions["%s_%s_interfaces" % (_host_type, host_model)].split(",")

boot_devices = await self.get_boot_devices()
Expand Down Expand Up @@ -784,5 +790,8 @@ def get_host_type_boot_device(self, host_type, _interfaces_path):
raise BadfishException

host_model = self.host.split(".")[0].split("-")[-1]
host_blade = self.host.split(".")[0].split("-")[-2]
if host_blade != "000":
host_model = "%s_%s" % (host_model, host_blade)
return definitions["%s_%s_interfaces" % (host_type, host_model)].split(",")[0]
return None

0 comments on commit fd3195e

Please sign in to comment.