From ff53ae183a64d6c52d66794f6224ff4ba725c41c Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 20 Jun 2013 10:49:49 -0400 Subject: [PATCH] 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: I9e6766560a8d8bf0d33059fc2547cbb8d2f861f6 --- ironic/cmd/ironic_deploy_helper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ironic/cmd/ironic_deploy_helper.py b/ironic/cmd/ironic_deploy_helper.py index 50778a9e59..ab3d505341 100644 --- a/ironic/cmd/ironic_deploy_helper.py +++ b/ironic/cmd/ironic_deploy_helper.py @@ -280,10 +280,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: %s'), err_msg) + context = ironic_context.get_admin_context() d = db.bm_node_get(context, node_id)