Project

General

Profile

Bug #13575

Don't fail due to missing PXEClient DHCP opt on 2008R2

Added by Guido Günther almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
DHCP
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Due to #2870 the dhcp_native_ms provider always tries to set the
PXEClient opt to empty. However this does not exist in all DHCP servers
(tested on 2008R2) and in this case we currently fail with:

INFO -- : Added DHCP reservation for foo.example.com(10.0.2.20 / 52:54:00:84:64:03)
DEBUG -- : key: "PXEClient"
DEBUG -- : executing: c:\windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe c dhcp server 127.0.0.1 scope 10.0.0.0 set reservedoptionvalue 10.0.2.20 60 String ""
INFO -
: Vendor class not found
ERROR -- : Netsh failed:
Changed the current scope context to 10.0.0.0 scope.
The specified option does not exist.
ERROR -- : Unknown error while processing ''
DEBUG -- : Unknown error while processing '' (Proxy::DHCP::Error)
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:246:in `rescue in report'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:223:in `report'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:218:in `execute'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:59:in `block in add_record'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:46:in `each'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:46:in `add_record'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp/dhcp_api.rb:97:in `block in <class:DhcpApi>'
C:/Users/Administrator/Downloads/smart-proxy/vendor/ruby/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `call'

so ignore errors to set that option.


Related issues

Related to Smart Proxy - Bug #5995: Windows AD DHCP reservation creation fails with "The specified option does not exist"Duplicate2014-05-30
Related to Smart Proxy - Bug #15789: In MS DHCP provider general/Vendor options must exist before assigning values to themResolved2016-07-22
Related to Smart Proxy - Bug #15791: Intermittent DHCPServerMicrosoftTest failures on ruby 1.8.7Closed2016-07-22
Related to Smart Proxy - Bug #16056: Non-english locale casuses "Vendor Class not found" errors when using windows dhcp providerResolved2016-08-11

Associated revisions

Revision e5aa2344 (diff)
Added by Guido Günther over 4 years ago

fixes #13575 - Don't fail on missing PXEClient dhcp opt

Due to #2870 the dhcp_native_ms provider always tries to set the
PXEClient opt to empty. However this does not exist in all DHCP servers
(tested on 2008R2) and in this case we currently fail with:

INFO -- : Added DHCP reservation for foo.example.com(10.0.2.20 / 52:54:00:84:64:03)
DEBUG -- : key: "PXEClient"
DEBUG -- : executing: c:\windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe c dhcp server 127.0.0.1 scope 10.0.0.0 set reservedoptionvalue 10.0.2.20 60 String ""
INFO -
: Vendor class not found
ERROR -- : Netsh failed:
Changed the current scope context to 10.0.0.0 scope.
The specified option does not exist.
ERROR -- : Unknown error while processing ''
DEBUG -- : Unknown error while processing '' (Proxy::DHCP::Error)
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:246:in `rescue in report'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:223:in `report'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:218:in `execute'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:59:in `block in add_record'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:46:in `each'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp_native_ms/dhcp_native_ms_main.rb:46:in `add_record'
C:/Users/Administrator/Downloads/smart-proxy/modules/dhcp/dhcp_api.rb:97:in `block in <class:DhcpApi>'
C:/Users/Administrator/Downloads/smart-proxy/vendor/ruby/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `call'

so ignore errors to set that option.

Also add a test that verifies adding dhcp records and one that checks
that we still correctly raise errors when we fail to set dhcp options
(execpt for PXEClient).

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Guido Günther

#2 Updated by Dmitri Dolguikh almost 5 years ago

  • Related to Bug #5995: Windows AD DHCP reservation creation fails with "The specified option does not exist" added

#3 Updated by Guido Günther over 4 years ago

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

#4 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 161

#5 Updated by Dmitri Dolguikh over 4 years ago

  • Related to Bug #15789: In MS DHCP provider general/Vendor options must exist before assigning values to them added

#6 Updated by Dmitri Dolguikh over 4 years ago

  • Related to Bug #15791: Intermittent DHCPServerMicrosoftTest failures on ruby 1.8.7 added

#7 Updated by Dominic Cleal over 4 years ago

  • Has duplicate Bug #16056: Non-english locale casuses "Vendor Class not found" errors when using windows dhcp provider added

#8 Updated by Dominic Cleal over 4 years ago

  • Has duplicate deleted (Bug #16056: Non-english locale casuses "Vendor Class not found" errors when using windows dhcp provider)

#9 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #16056: Non-english locale casuses "Vendor Class not found" errors when using windows dhcp provider added

Also available in: Atom PDF