Project

General

Profile

Actions

Bug #4148

closed

Unable to delete DHCP reservations on MS DCHP servers

Added by Oscar Vidakovic over 10 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have an smart proxy running under windows 7 in English for MS DHCP integration. Everything looks OK except host deletion. For example, when trying to create a new host, if DNSs creation fails for any reason, Foreman tries to rollback DHCP reservation but is unable to do it. in smartproxy logs appears:

D, [2014-01-17T15:31:16.631383 #3360] DEBUG -- : Lazy loaded 192.168.48.0/255.255.252.0 records
E, [2014-01-17T15:31:16.631383 #3360] ERROR -- : 192.168.50.7 / 00:11:22:33:44:55 is static - unable to delete
D, [2014-01-17T15:31:16.631383 #3360] DEBUG -- : C:/foreman-proxy/bin/../lib/proxy/dhcp/server/native_ms.rb:18:in `delRecord'
C:/foreman-proxy/bin/../lib/dhcp_api.rb:106:in `DELETE /dhcp/:network/:record'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1032:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1032:in `compile!'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:620:in `instance_eval'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:620:in `route_eval'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:604:in `route!'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:656:in `process_route'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:653:in `catch'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:653:in `process_route'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:603:in `route!'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:602:in `each'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:602:in `route!'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:741:in `dispatch!'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:530:in `call!'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `instance_eval'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `invoke'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `catch'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `invoke'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:530:in `call!'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:516:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/methodoverride.rb:24:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/showexceptions.rb:24:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/commonlogger.rb:18:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1168:in `synchronize'
c:/Ruby193/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/content_length.rb:13:in `call'
c:/Ruby193/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/handler/webrick.rb:52:in `service'
c:/Ruby193/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/Ruby193/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/Ruby193/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/Ruby193/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/handler/webrick.rb:13:in `run'
C:/foreman-proxy/bin/../lib/sinatra-patch.rb:43:in `run!'
C:/foreman-proxy/bin/smart-proxy:27:in `service_main'
C:/foreman-proxy/bin/smart-proxy:38:in `mainloop'
C:/foreman-proxy/bin/smart-proxy:38
192.168.50.122 - - [17/Jan/2014 15:31:16] "DELETE /dhcp/192.168.48.0/00:11:22:33:44:55 HTTP/1.1" 400 61 116.8586
foremanmaster.latinia.test - - [17/Jan/2014:15:29:19 Romance Standard Time] "DELETE /dhcp/192.168.48.0/00:11:22:33:44:55 HTTP/1.1" 400 61
- -> /dhcp/192.168.48.0/00:11:22:33:44:55

Aditionally, if the host is created correctly and I tryied to delete it, I get the same behaviour


Related issues 3 (0 open3 closed)

Related to Smart Proxy - Feature #1172: MS dhcp proxy does not know about leasesClosedPaul Kelly09/18/2011Actions
Related to Smart Proxy - Bug #13129: Intermittent failures in native MS test_records_should_have_options testsClosed01/12/2016Actions
Related to Smart Proxy - Bug #5481: Foreman Proxy unable to remove DHCP reservation: "IP / mac - is static - unable to delete"Resolved04/28/2014Actions
Actions #1

Updated by Dominic Cleal over 10 years ago

  • Project changed from Foreman to Smart Proxy
  • Category changed from DHCP to DHCP
  • translation missing: en.field_release deleted (3)
Actions #2

Updated by Oscar Vidakovic about 10 years ago

This issue is solved after applying the patches from issue #1172. Maybe is something related the huge delay (between 120 - 150 secs.) when creating or deleting MS DHCP records.

Actions #3

Updated by Thomas Black about 10 years ago

This problem exists in the the current stable reelease (1.4.1) as well as the develop release.

The problem is because DHCP option 12 is incorrectly interpreted. Depending on the option set (Standard or SUNW) option 12 is either "hostname" or "install_path". In this configuration it is meant to be hostname but it is incorrectly parsed to be "install_path" as indicated in the logs:

<---
D, [2014-03-05T17:10:49.043924 #356] DEBUG -- : found option nextServer
D, [2014-03-05T17:10:49.043924 #356] DEBUG -- : found option filename
D, [2014-03-05T17:10:49.043924 #356] DEBUG -- : found option install_path
<---

With install_path being detected instead of hostname, the deleteable flag is not set when subnet data is loaded in native_ms.rb. This prevents deletion of the record.

Commenting out option 12 - install_path under SUNW options in dhcp.rb fixes this problem as a work around.

Actions #4

Updated by Thomas Black about 10 years ago

The patches from #1172 change the way the hostname is detected and would appear to correct this issue.

Actions #5

Updated by Dominic Cleal about 10 years ago

  • Related to Feature #1172: MS dhcp proxy does not know about leases added
Actions #6

Updated by Anonymous over 8 years ago

  • Related to Bug #13129: Intermittent failures in native MS test_records_should_have_options tests added
Actions #7

Updated by Anonymous over 8 years ago

  • Related to Bug #5481: Foreman Proxy unable to remove DHCP reservation: "IP / mac - is static - unable to delete" added
Actions #8

Updated by Dominic Cleal over 8 years ago

  • Status changed from New to Feedback

A possible fix for the options issue has been merged to the develop branch and should be in 1.10.2 as well when that's released. I'll mark this as feedback as it may resolve the issue along with the earlier ticket - please let us know either way if you're able to test it.

Actions #9

Updated by Anonymous almost 7 years ago

  • Status changed from Feedback to Resolved

no reaction, closing

Actions

Also available in: Atom PDF