Skip to content

Commit

Permalink
Merge pull request crowbar#1300 from dirkmueller/bootdev_detection
Browse files Browse the repository at this point in the history
Bootdisk detection: Skip cciss, prefer wwn's
  • Loading branch information
toabctl committed Aug 18, 2017
2 parents 7dc718b + 71d1fa9 commit 6394f2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion chef/cookbooks/barclamp/libraries/barclamp_library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ def unique_name
candidates.find { |b| b =~ /^scsi-[^1]/ } ||
candidates.find { |b| b =~ /^scsi-/ } ||
candidates.find { |b| b =~ /^ata-/ } ||
candidates.find { |b| b =~ /^cciss-/ } ||
candidates.first

unless match.empty?
Expand Down
10 changes: 5 additions & 5 deletions chef/cookbooks/provisioner/recipes/bootdisk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@
# reusable than the normal links.
# Note: this find construct should match the code in
# barclamp/libraries/barclamp_library.rb (from deployer)
bootdisk = bootdisks.find{ |b|b =~ /^scsi-[a-zA-Z]/ } ||
bootdisks.find{ |b|b =~ /^scsi-[^1]/ } ||
bootdisks.find{ |b|b =~ /^scsi-/ } ||
bootdisks.find{ |b|b =~ /^ata-/ } ||
bootdisks.find{ |b|b =~ /^cciss-/ } ||
bootdisk = bootdisks.find { |b| b =~ /^wwn-/ } ||
bootdisks.find { |b| b =~ /^scsi-[a-zA-Z]/ } ||
bootdisks.find { |b| b =~ /^scsi-[^1]/ } ||
bootdisks.find { |b| b =~ /^scsi-/ } ||
bootdisks.find { |b| b =~ /^ata-/ } ||
bootdisks.first
dev = "disk/by-id/#{bootdisk}"
end
Expand Down

0 comments on commit 6394f2f

Please sign in to comment.