Revision 73517357 snf-cyclades-app/synnefo/logic/callbacks.py

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

Also available in: Unified diff