dellcloudedge/barclamp-provisioner — pull request #86 by VictorLowther (2012-12-11 21:45:53+00:00)
Title: Remove hardcoded dependency on /dev/sda for OS installs [1/1]

Instead of hoping that /dev/sda will always be the device that the
system will boot to (which is just not true for several reasons, chief
among them that SCSI device enumeration is just not stable in any
system that has more than one disk controller), we now allow the
barclamps to pick a disk that the system should boot from and ensure
that the OS (including the bootloader) will be installed on this disk.

compute.ks.erb, net_seed.ks.erb, and autoyast.xml.erb have been
modified to let the provisioner feed a boot device into them. By
default, this disk will be the one under /dev/disks/by-id
that corresponds to the first disk listed in /dev/disks/by-path. In
the normal course of things, this will ensure that we always get a
stable pointer to the first bootable device on the system no matter
what order modules are loaded in or what order PCI devices are
enumerated in.

See the bootdisk.rb recipe in the provisioner cookbook for more
information.

The bootdisk recipe has been designed so that it will not do anything
if node[:crowbar_wall][:boot_device] is already set. This will allow
for future enhancements to the RAID and BIOS barclamps to pick the
boot device of their choosing.

It is strongly advised that node[:crowbar_wall][:boot_device] be a
device in the /dev/disk/by-id directory, as these names are based on
the unique ATA, SCSI, SATA, or SAS identifiers for the drive, and not
based on the vagaries of SCSI numbering or device naming.

chef/cookbooks/provisioner/recipes/bootdisk.rb | 39 ++++++++++++++++++++
chef/cookbooks/provisioner/recipes/update_nodes.rb | 3 ++
.../provisioner/templates/default/autoyast.xml.erb | 1 +
.../provisioner/templates/default/compute.ks.erb | 18 ++++-----
.../provisioner/templates/default/net_seed.erb | 2 +-
.../data_bags/crowbar/bc-template-provisioner.json | 2 +
chef/roles/provisioner-bootdisk-finder.rb | 7 ++++
.../app/models/provisioner_service.rb | 5 +++
8 files changed, 67 insertions(+), 10 deletions(-)

Crowbar-Pull-ID: 84a41fa87ce7b88a960f9c1906235cd5a26c91ab

Crowbar-Release: fred