Commit Graph

14 Commits

Author SHA1 Message Date
Lucas Alvares Gomes
5064026b73 deploy-ironic: Fix syntax error when checking for root device hints
This patch is fixing a syntax error in the 70-ironic-root-device init
script for the deploy-ironic element.

Change-Id: I767486ca5893605720fba41bee3af72725a26377
Closes-Bug: #1531835
2016-01-07 12:06:19 +00:00
Lucas Alvares Gomes
ff988ac45c Extend root device hints for different types of WWN
This patch is extending the root device hints to also look at
ID_WWN_WITH_EXTENSION and ID_WWN_VENDOR_EXTENSION from udev.

Prior to this patch the bash ramdisk only cared about ID_WWN but in some
systems in some platforms with a RAID controller, this ID can be same
even if they are different disks (see bug 1516641).

Related-Bug: #1516641
Change-Id: I45b3910d03d164d880b32169b91e94e88812e183
2015-11-17 22:42:44 +00:00
John L. Villalovos
0d92e2ffbb Fix variable misspelling error
'passthru' was spelled as 'passhru'.

Change-Id: I313b1a9393eccc6813b8e207ecc22db9fca93bb4
2015-09-17 16:52:26 -07:00
Ben Nemec
05764de6e7 Wait longer for root device to become available
On some systems, it can take longer than 10 seconds for the root
disk to be detected.  Because enterprise hardware.  Increase the
wait time to 60 seconds so we don't incorrectly fail due to a
missing root device.

Change-Id: I4f67ef0295af8f2ae783fe3aea347b41987c6a66
2015-06-17 11:53:57 -05:00
Yuriy Zveryanskyy
5de277fb54 Add Ironic API version to passthru URL for deploy-ironic
Add current version of Ironic API for consistensy with IPA and Ironic
API settings, and for compatibility in the future.

Change-Id: I13c7a26b6cfb47a14aa49ee78441a1d97d7b42d0
2015-05-29 09:12:21 +03:00
Ramakrishnan G
9fb2d14cf1 Report status of boot loader installation to Ironic
This commit changes the 80-deploy-ironic script of
deploy-ironic element to report back the status of
boot loader install (when boot_option == "local")
using a newly introduced vendorpassthru.

Closes-Bug: 1422723
Change-Id: I9c1d8643be7cb9e273d65ddd791715a5c271fd93
2015-03-31 16:41:24 +00:00
Lucas Alvares Gomes
b95cbb14b1 Ironic: Deploy ramdisk to find the right root device
As part of the blueprint root-device-hints Ironic will pass some to the
deploy ramdisk some hints about which disk device it should pick to be
root device (the one where the image will be deployed on).

Before the deploy ramdisk would pick the first device it finds, but as the
machine could have more than one SATA, SCSI or IDE disk controllers the
order in which their corresponding device nodes are added is arbitrary
causing devices like /dev/sda and /dev/sdb switching around on each
boot time.

Plus, as people are adding support to build RAID arrays in Ironic we need
a way to tell it to use the just created device to be the root device.

The list of hints that could be passed to the deploy ramdisk so it finds
the right disk is:

* wwn (STRING): unique storage identifier
* serial (STRING): disk serial number
* model (STRING): device identifier
* vendor (STRING): device vendor
* size (INT): The size of the disk in GB

If not hints are passed, the deploy ramdisk will continue to do what it
did before to find the disk.

Change-Id: I8425f593e1a610af5a3697988702603ff218f2de
2015-03-13 14:09:40 +00:00
Ramakrishnan G
13c906059b Ironic: uefi localboot support
This commit adds support for uefi localboot in
deploy-ironic element. The change is to mount the efi
system partition (created by Ironic) in /boot/efi.

The corresponding Ironic change is
I00ac31da325676ea4ea1ac4185f5ac3a52c5809a

Implements: blueprint local-boot-support-with-partition-images
Change-Id: Idf7ac5987e14e1d31311834196ca7283deec15c6
2015-03-12 10:11:18 +00:00
Lucas Alvares Gomes
9880d16d47 Ironic: Local boot
This patch extends the deploy-ironic element to make it install a
bootloader on the disk in case the boot_option parameter passed in the
kernel command line is set to "local".

This parameter is set by Ironic as part of the
blueprint local-boot-support-with-partition-images

Change-Id: I5ebe6f364ae0ac408939399e5f28728b41c4766e
2015-02-03 14:36:25 +00:00
Ben Nemec
eed30adc48 Enable dracut deploy ramdisks
The element builds dracut from source on Ubuntu because the
Ubuntu dracut package is broken and very old, so it can't be
installed properly and causes a number of other issues that
are fixed by using a newer version of Dracut.

This initial version should work in virtualized environments.
Further validation of its suitability for real baremetal
deployments will need to be done in the future, but this should
be sufficient to enable that work.

Regarding Dracut specifically, in order to limit the changes
needed in the existing scripts this element continues to use a
cut down version of the /init script that we were building for the
existing ramdisk.  However, instead of running it as pid 0 it is
run as a Dracut pre-mount hook.  This allows Dracut to set up all
of the hardware and system bits, while falling early enough in the
Dracut sequence to complete the deployment before Dracut would try
to boot off the hard disk.

bp tripleo-juno-dracut-ramdisks
Change-Id: I144c8993fe040169f440bd4f7a428fdbe3d745cf
2014-10-17 21:44:09 -05:00
Ramakrishnan G
10d72ddb22 Add vmedia boot support for deploy-ironic element
deploy-ironic element currently retrieves token over tftp and
expects BOOT_IP_ADDRESS to be set.  This commit adds support for
retrieving token file from virtual media if node booted from
virtual media. Also corrects the issue for BOOT_IP_ADDRESS not set
for virtual media boot.

Change-Id: I3d5f1779b9b17842360860c7778baa01db1e1a52
Closes-Bug: #1356339
2014-09-11 15:41:46 +05:30
Alexander Gordeev
7d50c04bf7 Remove hardcoded /tftpboot/ from token's tftp path
Since file to be fetched from the root tftp directory it shouldn't
contain any hardcoded path. Additionaly it eliminates bearing with
map-file containing regular expressions for tftp path replacement.

Change-Id: Iee1672834f735d7dfefce43000540522e1d053b9
Closes-Bug: #1291533
2014-03-14 18:59:26 +04:00
Lucas Alvares Gomes
af8eeebeb8 Fix the curl command in the ironic-deploy element
We need to use the eval command together with curl so that the
$TOKEN_HEADER variable is seems by curl as two arguments: "-H" and
"'X-Auth-Token: ...". Without the eval bash would interpret the variable
as only one argument "-H 'X-Auth-Token: ...'" making the curl command
to not understand that parameter and fail to pass the auth_token to the
Ironic API.

Change-Id: I4dcfc323d6ab9b7fa207328386ef65a146a93617
2014-01-16 13:16:47 +00:00
Yuriy Zveryanskyy
bf222fe7bc Add deploy ramdisk element for Ironic
Ironic requires callback from deploy ramdisk via API with json data.
Auth token also required if Keystone auth enabled for Ironic API.
This patch adds separate element 'deploy-ironic' for Ironic deploy
ramdisk creation.

Change-Id: I5ef96711763e50307cfa17c406a9e16bffb937bc
2013-12-04 17:57:44 +02:00