summaryrefslogtreecommitdiff
path: root/ironic/common/pxe_utils.py
diff options
context:
space:
mode:
authorArun S A G <sagarun@gmail.com>2021-10-14 17:29:22 -0700
committerArun S A G <sagarun@gmail.com>2021-10-27 10:42:25 -0700
commitdf99dea001772c1c6691150060d3ebbf496e5d25 (patch)
treea9221488c4d716c06874abb614c0c206237ae409 /ironic/common/pxe_utils.py
parent98896c515d5d6faead5aa4be18b31fb5e99e6c16 (diff)
downloadironic-df99dea001772c1c6691150060d3ebbf496e5d25.tar.gz
Fix various issues in the anaconda deploy interface
The kickstart template expects a dictionary with 'ks_options' as the key. Instead build_kickstart_config_options function returns a dict with keys 'liveimg_url', 'agent_token' and 'heartbeat_url'. This change fixes this problem by returning a dictionary of dict with 'ks_options' as key and the dictionary with keys 'liveimg_url', 'agent_token' and heartbeat_url' as value. Fix a bug where the deploy() method of anaconda deploy interface where it did not return states.DEPLOYWAIT instead it returned 'None' which caused the instance to go straight to 'active' instead of 'wait call-back'. Fix issues in the default kickstart template where heartbeat was missing 'callback_url' parameter and the HTTP method should be 'POST' not 'PUT'. Fix issues with automated cleaning when anaconda deploy interface is used. Anaconda deploy interface could not deploy tarballs as the disk image sent to the anaconda interface via liveimg --url kickstart command does not include any file extension. When no file extension is present the kickstart command liveimg --url assumes the disk is a mountable partiton image. We fix this problem by enabling the user to specify file extensions using a glance image property named 'disk_file_extension' on the OS image. Co-Authored-By: Ruby Loo <opensrloo@gmail.com> Change-Id: I556f8c9efbc5ab0941513c3ecaa2aa3ca7f346ae
Diffstat (limited to 'ironic/common/pxe_utils.py')
-rw-r--r--ironic/common/pxe_utils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py
index c886360d3..08d6d3f98 100644
--- a/ironic/common/pxe_utils.py
+++ b/ironic/common/pxe_utils.py
@@ -963,14 +963,14 @@ def build_kickstart_config_options(task):
:returns: A dictionary of kickstart options to be used in the kickstart
template.
"""
- ks_options = {}
+ params = {}
node = task.node
manager_utils.add_secret_token(node, pregenerated=True)
node.save()
- ks_options['liveimg_url'] = node.instance_info['image_url']
- ks_options['agent_token'] = node.driver_internal_info['agent_secret_token']
- ks_options['heartbeat_url'] = _build_heartbeat_url(node.uuid)
- return ks_options
+ params['liveimg_url'] = node.instance_info['image_url']
+ params['agent_token'] = node.driver_internal_info['agent_secret_token']
+ params['heartbeat_url'] = _build_heartbeat_url(node.uuid)
+ return {'ks_options': params}
def get_volume_pxe_options(task):