I'm facing the same issue and apparently there is no way to disable that
behavior. As a workaround, I've removed the ':nextServer' key in the
Orchestration::DHCP::dhcp_attrs() method [1].
HTH,
Simon
[1]
···
On Monday, February 24, 2014 11:49:26 AM UTC+1, Александр Костырев wrote:
>
> Hello!
>
> I've got two subnet definitions in my /etc/dhcp/dhcpd.conf
>
> #################################
> # example.org
> #################################
> subnet 10.0.1.0 netmask 255.255.255.0 {
>
> range 10.0.1.93 10.0.1.131;
> option subnet-mask 255.255.255.0;
> option routers 10.0.1.254;
> option domain-name "example.org";
> next-server 10.0.1.92;
> option domain-name-servers 10.0.1.1, 10.0.1.2;
> }
> #################################
> # anothernet.com
> #################################
>
> subnet 192.168.5.0 netmask 255.255.255.0 {
>
> range 192.168.5.162 192.168.5.199;
> option subnet-mask 255.255.255.0;
> option routers 192.168.5.4;
> option domain-name "anothernet.com";
> next-server 192.168.5.45;
> option domain-name-servers 192.168.5.14, 192.168.5.15;
> }
>
> and this in /etc/foreman-proxy/settings.yml
>
> # Enable TFTP management
> :tftp: true
> :tftproot: /var/lib/tftpboot/
> # Defines the TFTP Servername to use, overrides the name in the subnet
> declaration
> #:tftp_servername: tftp.domain.com
>
>
> BUT
> when I create new host in domain anothernet.com Foreman puts this in
> dhcpd.leases
>
> host test1.anothernet.com {
> dynamic;
> hardware ethernet 00:0c:29:1b:50:5e;
> fixed-address 192.168.5.162;
> supersede server.filename = "pxelinux.0";
> supersede server.next-server = *0a:00:01:5c*;
> supersede host-name = "test1.anothernet.com";
> }
>
>
> 0x0A:00:01:5C 10.0.1.92
> 0xC0:A8:05:2D 192.168.5.45
>
> so it says that next-server for this host is one from subnet 10.0.1.0 and
> it is quite a big problem for my installation.
>
> How can I achieve what I want?
>
> Thanks in advance
>
>
>
> RELEASE: CentOS release 6.5 (Final)
> FOREMAN: 1.4.0
> RUBY: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
> PUPPET: 3.4.3
>
>
>
Is there any update to this issue? I'm working on upgrading to 1.15.3 and
this problem still exists. I have about 20 DHCP servers with smart proxies
and many of them are multi-homed because we do a lot of building on
non-routable admin networks.
In 1.15.3 I just commented out line 120 of
/usr/share/foreman/app/models/concerns/orchestration/dhcp.rb to do the same
workaround I did way back in 1.3, but this is obviously not ideal.
Thanks
Bill
···
On Monday, February 24, 2014 at 5:49:26 AM UTC-5, Александр Костырев wrote:
>
> Hello!
>
> I've got two subnet definitions in my /etc/dhcp/dhcpd.conf
>
> #################################
> # example.org
> #################################
> subnet 10.0.1.0 netmask 255.255.255.0 {
>
> range 10.0.1.93 10.0.1.131;
> option subnet-mask 255.255.255.0;
> option routers 10.0.1.254;
> option domain-name "example.org";
> next-server 10.0.1.92;
> option domain-name-servers 10.0.1.1, 10.0.1.2;
> }
> #################################
> # anothernet.com
> #################################
>
> subnet 192.168.5.0 netmask 255.255.255.0 {
>
> range 192.168.5.162 192.168.5.199;
> option subnet-mask 255.255.255.0;
> option routers 192.168.5.4;
> option domain-name "anothernet.com";
> next-server 192.168.5.45;
> option domain-name-servers 192.168.5.14, 192.168.5.15;
> }
>
> and this in /etc/foreman-proxy/settings.yml
>
> # Enable TFTP management
> :tftp: true
> :tftproot: /var/lib/tftpboot/
> # Defines the TFTP Servername to use, overrides the name in the subnet
> declaration
> #:tftp_servername: tftp.domain.com
>
>
> BUT
> when I create new host in domain anothernet.com Foreman puts this in
> dhcpd.leases
>
> host test1.anothernet.com {
> dynamic;
> hardware ethernet 00:0c:29:1b:50:5e;
> fixed-address 192.168.5.162;
> supersede server.filename = "pxelinux.0";
> supersede server.next-server = *0a:00:01:5c*;
> supersede host-name = "test1.anothernet.com";
> }
>
>
> 0x0A:00:01:5C 10.0.1.92
> 0xC0:A8:05:2D 192.168.5.45
>
> so it says that next-server for this host is one from subnet 10.0.1.0 and
> it is quite a big problem for my installation.
>
> How can I achieve what I want?
>
> Thanks in advance
>
>
>
> RELEASE: CentOS release 6.5 (Final)
> FOREMAN: 1.4.0
> RUBY: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
> PUPPET: 3.4.3
>
>
>
This same issue is biting me too. The workaround you posted did the trick.
Hopefully there is an easy permament fix for this (though this seems like
as good of one as any)
Thanks
Bill
···
On Friday, February 28, 2014 9:56:22 AM UTC-5, Simon Pasquier wrote:
>
> Hello,
>
> I'm facing the same issue and apparently there is no way to disable that
> behavior. As a workaround, I've removed the ':nextServer' key in the
> Orchestration::DHCP::dhcp_attrs() method [1].
>
> HTH,
>
> Simon
>
> [1]
> https://github.com/theforeman/foreman/blob/dc45768149de1393f5b81f8d1ab8bb4583817791/app/models/concerns/orchestration/dhcp.rb#L61
>
> On Monday, February 24, 2014 11:49:26 AM UTC+1, Александр Костырев wrote:
>>
>> Hello!
>>
>> I've got two subnet definitions in my /etc/dhcp/dhcpd.conf
>>
>> #################################
>> # example.org
>> #################################
>> subnet 10.0.1.0 netmask 255.255.255.0 {
>>
>> range 10.0.1.93 10.0.1.131;
>> option subnet-mask 255.255.255.0;
>> option routers 10.0.1.254;
>> option domain-name "example.org";
>> next-server 10.0.1.92;
>> option domain-name-servers 10.0.1.1, 10.0.1.2;
>> }
>> #################################
>> # anothernet.com
>> #################################
>>
>> subnet 192.168.5.0 netmask 255.255.255.0 {
>>
>> range 192.168.5.162 192.168.5.199;
>> option subnet-mask 255.255.255.0;
>> option routers 192.168.5.4;
>> option domain-name "anothernet.com";
>> next-server 192.168.5.45;
>> option domain-name-servers 192.168.5.14, 192.168.5.15;
>> }
>>
>> and this in /etc/foreman-proxy/settings.yml
>>
>> # Enable TFTP management
>> :tftp: true
>> :tftproot: /var/lib/tftpboot/
>> # Defines the TFTP Servername to use, overrides the name in the subnet
>> declaration
>> #:tftp_servername: tftp.domain.com
>>
>>
>> BUT
>> when I create new host in domain anothernet.com Foreman puts this in
>> dhcpd.leases
>>
>> host test1.anothernet.com {
>> dynamic;
>> hardware ethernet 00:0c:29:1b:50:5e;
>> fixed-address 192.168.5.162;
>> supersede server.filename = "pxelinux.0";
>> supersede server.next-server = *0a:00:01:5c*;
>> supersede host-name = "test1.anothernet.com";
>> }
>>
>>
>> 0x0A:00:01:5C 10.0.1.92
>> 0xC0:A8:05:2D 192.168.5.45
>>
>> so it says that next-server for this host is one from subnet 10.0.1.0 and
>> it is quite a big problem for my installation.
>>
>> How can I achieve what I want?
>>
>> Thanks in advance
>>
>>
>>
>> RELEASE: CentOS release 6.5 (Final)
>> FOREMAN: 1.4.0
>> RUBY: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
>> PUPPET: 3.4.3
>>
>>
>>
> Is there any update to this issue? I'm working on upgrading to 1.15.3
> and this problem still exists. I have about 20 DHCP servers with
> smart proxies and many of them are multi-homed because we do a lot of
> building on non-routable admin networks.
>
> I see Bug #1221Bug #1221: Bug with server.next-server in DHCP - Smart Proxy - Foreman that was
> "Ready For Testing" but got moved back to "New" (!)
I'm not sure you meant 1221, that bug appears to have been closed 5
years ago…
I think this is the bug you meant. To be clear, Ready For Testing means
a patch has been written and can be reviewed. If the patch is not
merged, or the approach needs to be changed, then the PR will be closed
and the state reverted to New (or Assigned if someone is still owrking
on it).
In this case, as far as I can see, the person who proposed the change
abandoned the patch before it got merged (see https://github.com/thefor
eman/foreman/pull/3360#issuecomment-200659805), so it's correct that it
was set back to New. I still think such a feature (a checkbox on the
Subnet to not set next-server) is a welcome one, if anyone else wants
to pick it up.
Greg
···
On Tue, 2017-08-15 at 09:48 -0700, Bill Sirinek wrote: