Because bp https://blueprints.launchpad.net/ironic/+spec/add-node-instance-info
has been completed,
add the deploy_kernel_id and deploy_ramdisk_id to ironic node's driver_info
in stead of to flavor.
Change-Id: I90ffae49212e68749b8331edc278228419317453
| ... | ... |
@@ -564,10 +564,8 @@ function enroll_nodes {
|
| 564 | 564 |
# we create the bare metal flavor with minimum value |
| 565 | 565 |
local node_options="-i ipmi_address=$ipmi_address -i ipmi_password=$ironic_ipmi_passwd\ |
| 566 | 566 |
-i ipmi_username=$ironic_ipmi_username" |
| 567 |
- if is_deployed_by_agent; then |
|
| 568 |
- node_options+=" -i $_IRONIC_DEPLOY_KERNEL_KEY=$IRONIC_DEPLOY_KERNEL_ID" |
|
| 569 |
- node_options+=" -i $_IRONIC_DEPLOY_RAMDISK_KEY=$IRONIC_DEPLOY_RAMDISK_ID" |
|
| 570 |
- fi |
|
| 567 |
+ node_options+=" -i $_IRONIC_DEPLOY_KERNEL_KEY=$IRONIC_DEPLOY_KERNEL_ID" |
|
| 568 |
+ node_options+=" -i $_IRONIC_DEPLOY_RAMDISK_KEY=$IRONIC_DEPLOY_RAMDISK_ID" |
|
| 571 | 569 |
fi |
| 572 | 570 |
|
| 573 | 571 |
local node_id=$(ironic node-create --chassis_uuid $chassis_id \ |
| ... | ... |
@@ -591,11 +589,7 @@ function enroll_nodes {
|
| 591 | 591 |
local adjusted_disk=$(($ironic_node_disk - $ironic_ephemeral_disk)) |
| 592 | 592 |
nova flavor-create --ephemeral $ironic_ephemeral_disk baremetal 551 $ironic_node_ram $adjusted_disk $ironic_node_cpu |
| 593 | 593 |
|
| 594 |
- # TODO(lucasagomes): Remove the 'baremetal:deploy_kernel_id' |
|
| 595 |
- # and 'baremetal:deploy_ramdisk_id' parameters |
|
| 596 |
- # from the flavor after the completion of |
|
| 597 |
- # https://blueprints.launchpad.net/ironic/+spec/add-node-instance-info |
|
| 598 |
- 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" |
|
| 594 |
+ nova flavor-key baremetal set "cpu_arch"="x86_64" |
|
| 599 | 595 |
|
| 600 | 596 |
if [ "$VIRT_DRIVER" == "ironic" ]; then |
| 601 | 597 |
wait_for_nova_resources $total_nodes |