From f8b4b6a78fec0f388f3224c6faa06637878530b4 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Mon, 17 Jun 2013 21:35:39 -0400 Subject: Add err_msg param to baremetal_deploy_helper. Updates the baremetal-deploy-helper so that we look for an option 'e' POST parameter which contains an optional error message string from the agent. This works with the associated DIB branch here: http://review.openstack.org/#/c/33341/ And is also fully backwards compatible with existing agent scripts which do not send the 'e' parameter. Change-Id: I9a5914e719c2db6d2ae6d002cd386a0e48fda18d --- nova/cmd/baremetal_deploy_helper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nova/cmd/baremetal_deploy_helper.py b/nova/cmd/baremetal_deploy_helper.py index 8586e6e59..e099b639b 100644 --- a/nova/cmd/baremetal_deploy_helper.py +++ b/nova/cmd/baremetal_deploy_helper.py @@ -287,10 +287,14 @@ class BareMetalDeploy(object): port = q.get('p', '3260') iqn = q['n'] lun = q.get('l', '1') + err_msg = q.get('e') except KeyError as e: start_response('400 Bad Request', [('Content-type', 'text/plain')]) return "parameter '%s' is not defined" % e + if err_msg: + LOG.error('Deploy agent error message: ' + err_msg) + context = nova_context.get_admin_context() d = db.bm_node_get(context, node_id) -- cgit