Revision 7b4a61dc

b/snf-cyclades-app/synnefo/logic/callbacks.py
187 187
            return
188 188
        # Remove extra fields
189 189
        [job_fields.pop(f) for f in ("OP_ID", "reason")]
190
        # Remove 'pnode' and 'snode' if they were set by Ganeti iallocator.
191
        # Ganeti will fail if both allocator and nodes are specified.
192
        allocator = job_fields.pop("iallocator")
193
        if allocator is not None:
194
            [job_fields.pop(f) for f in ("pnode", "snode")]
190 195
        name = job_fields.pop("name", job_fields.pop("instance_name"))
191 196
        # Turn off opportunistic locking before retrying the job
192 197
        job_fields["opportunistic_locking"] = False

Also available in: Unified diff