def _log_and_raise_deployment_error(self, task, msg):
        LOG.error(msg)
        deploy_utils.set_failed_state(task, msg)
        raise exception.InstanceDeployFailure(msg)
Helper method to log the error and raise exception.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/agent_base_vendor.py/BaseAgentVendor._log_and_raise_deployment_error