Feature #944
closed
Provide a mechanism to clear a host's network conflicts
Added by Paul Kelly almost 14 years ago.
Updated about 13 years ago.
Description
If a host fails to build because there are network conflicts, e.g. there is already a DNS entry for this host, then provide a way to resolve the problem.
- Status changed from New to Ready For Testing
- Assignee set to Paul Kelly
I have pushed the branch to my github as I added your requests as a separate commit, for easy viewing.
Another complete rewrite but this time I think you will like it
I have not extensively tested it but see if the code is suitable before I expend all that time
- Category set to Orchestration
- Assignee changed from Paul Kelly to Ohad Levy
A new implementation is on the way. A couple of point might make this code more easy to understand.
1 I had to reorder the DNS and DHCP operations so that DNS went first. This is because conflict in DNS validations would cause the queue to never get run and DHCP conflicts would never be tested for. If DNS conflicts are detected then a DHCP collision test is performed. This is only done when there are DNS collisions or if we are forcing foreman to overwrite the network data as this is a slooooow operation for native MS.
2) When overwriting the network data we do not consider collisions as fatal errors
One other point; I cannot think of any suitable name for this operation
overwrite? ? errors.are_all_conflicts? : errors.empty?
If you can, then please refactor the damn thing.
Added support for conflicting DHCP leases and for displaying conflict errors in the GUI
- Target version set to 1.0
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Status changed from Closed to Assigned
- Assignee changed from Ohad Levy to Paul Kelly
sadly i've reverted this patch as well, it seems like it breaks the orchestation code, and I had little time to dig in.
in general, I think we need to break down the methods that decided if a task needs to be triggered or not, I've seen some examples (with the patch applied) where some tasks / rollback tasks are still performed even if there are errors etc.
I would suggest something like:
def in_rollback?
queue.tasks.select{|t| t.type == "rolebacked"}.any?
end
def allowed_to_add_new_tasks?
..
end
etc
- Status changed from Assigned to Closed
- Status changed from Closed to New
as this was reverted, the ticket is reopened
- Status changed from New to Closed
Also available in: Atom
PDF