Browse code

Ironic: Add deploy kernel and deploy ramdisk to driver_info

Pass deploy kernel and deploy ramdisk as parameters to the driver
to enable Ironic to support different deploy provisioning
methods using the same flavor. This patch is part of the
https://blueprints.launchpad.net/ironic/+spec/add-node-instance-info
work which is separating the instance-level data from the driver-leval
data in the Node's resource of Ironic, once it's finished another patch
will be submitted to DevStack to remove the part of the code which is
adding the deploy kernel and deploy ramdisk parameters to the flavor,
for now a TODO was left inline as a reminder.

Change-Id: Id7cfb17cc6f6133964be139bfedbca1dc644b9cd
Implements: blueprint add-node-instance-info

Lucas Alvares Gomes authored on 2014/05/26 22:58:37
Showing 1 changed files
... ...
@@ -357,6 +357,8 @@ function enroll_vms {
357 357
     while read MAC; do
358 358
 
359 359
         NODE_ID=$(ironic node-create --chassis_uuid $CHASSIS_ID --driver pxe_ssh \
360
+            -i pxe_deploy_kernel=$IRONIC_DEPLOY_KERNEL_ID \
361
+            -i pxe_deploy_ramdisk=$IRONIC_DEPLOY_RAMDISK_ID \
360 362
             -i ssh_virt_type=$IRONIC_SSH_VIRT_TYPE \
361 363
             -i ssh_address=$IRONIC_VM_SSH_ADDRESS \
362 364
             -i ssh_port=$IRONIC_VM_SSH_PORT \
... ...
@@ -377,6 +379,10 @@ function enroll_vms {
377 377
     # create the nova flavor
378 378
     adjusted_disk=$(($IRONIC_VM_SPECS_DISK - $IRONIC_VM_EPHEMERAL_DISK))
379 379
     nova flavor-create --ephemeral $IRONIC_VM_EPHEMERAL_DISK baremetal auto $IRONIC_VM_SPECS_RAM $adjusted_disk $IRONIC_VM_SPECS_CPU
380
+    # TODO(lucasagomes): Remove the 'baremetal:deploy_kernel_id'
381
+    # and 'baremetal:deploy_ramdisk_id' parameters
382
+    # from the flavor after the completion of
383
+    # https://blueprints.launchpad.net/ironic/+spec/add-node-instance-info
380 384
     nova flavor-key baremetal set "cpu_arch"="x86_64" "baremetal:deploy_kernel_id"="$IRONIC_DEPLOY_KERNEL_ID" "baremetal:deploy_ramdisk_id"="$IRONIC_DEPLOY_RAMDISK_ID"
381 385
 
382 386
     # intentional sleep to make sure the tag has been set to port