Project

General

Profile

Feature #944

Provide a mechanism to clear a host's network conflicts

Added by Paul Kelly about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Orchestration
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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.


Related issues

Related to Foreman - Feature #786: Add the option to use existing DHCP reservations Closed2011-03-24
Related to Foreman - Bug #1101: DHCP complains about conflict when machine already has a leaseClosed2011-08-09
Related to Smart Proxy - Bug #1270: Deleting Host or Updating IP address Gives Error 400Closed2011-10-27
Blocked by Smart Proxy - Feature #1023: Handle DNS and DHCP collissions as a special case and return a different HTTP codeClosed2011-07-03
Blocked by Foreman - Refactor #1120: convert dhcp handling to real network objectsClosed2011-08-18
Blocked by Foreman - Refactor #1121: convert dns handling to real network objects Closed2011-08-18

Associated revisions

Revision 117ba92a (diff)
Added by Paul Kelly over 7 years ago

Fixes #944 - clear network conflicts

When a network conflict is detected (such as conflicting ip/name dns or
dhcp records), foreman would try to suggest a resolution.

Signed-off-by: Paul Kelly <>

Revision 0355a1c1 (diff)
Added by Ohad Levy over 7 years ago

fixes typo - refs #944

Revision a21f5e98 (diff)
Added by Ohad Levy over 7 years ago

Revert "fixes typo - refs #944"

This reverts commit 0355a1c1326779dbb21ab91f1b93b0405816f12a.

Revision ac36e7ce (diff)
Added by Ohad Levy over 7 years ago

Revert "Fixes #944 - clear network conflicts"

This reverts commit 117ba92a758e4589ef5fdf1f1b9083402b2d317b.

Revision 30ae12bf (diff)
Added by Ohad Levy over 7 years ago

Fixes #944 - clear network conflicts

When a network conflict is detected (such as conflicting ip/name dns or
dhcp records), foreman would try to suggest a resolution.

Signed-off-by: Paul Kelly <>

History

#1 Updated by Paul Kelly about 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Paul Kelly

#2 Updated by Paul Kelly about 8 years ago

rebased and tested

#3 Updated by Paul Kelly about 8 years ago

I have pushed the branch to my github as I added your requests as a separate commit, for easy viewing.

#4 Updated by Paul Kelly almost 8 years ago

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

#5 Updated by Paul Kelly almost 8 years ago

  • Category set to Orchestration
  • Assignee changed from Paul Kelly to Ohad Levy

#6 Updated by Paul Kelly over 7 years ago

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.

#7 Updated by Paul Kelly over 7 years ago

Added support for conflicting DHCP leases and for displaying conflict errors in the GUI

#8 Updated by Ohad Levy over 7 years ago

  • Target version set to 1.0

#9 Updated by Paul Kelly over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#10 Updated by Ohad Levy over 7 years ago

  • 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

#11 Updated by Ohad Levy over 7 years ago

  • Status changed from Assigned to Closed

#12 Updated by Ohad Levy over 7 years ago

  • Status changed from Closed to New

as this was reverted, the ticket is reopened

#13 Updated by Ohad Levy over 7 years ago

  • Status changed from New to Closed

Also available in: Atom PDF