Revision 727fb2f9 snf-cyclades-gtools/synnefo/ganeti/eventd.py

b/snf-cyclades-gtools/synnefo/ganeti/eventd.py
247 247
                    nics = get_instance_nics(msg["instance"], self.logger)
248 248
                    msg["nics"] = nics
249 249

  
250
            if op_id == "OP_INSTANCE_CREATE" and op.status == "error":
251
                # In case an instance creation fails send the job input
252
                # so that the job can be retried if needed.
253
                msg["job_fields"] = op.Serialize()["input"]
254

  
250 255
            msg = json.dumps(msg)
256

  
251 257
            self.logger.debug("Delivering msg: %s (key=%s)", msg, routekey)
252 258

  
253 259
            # Send the message to RabbitMQ

Also available in: Unified diff