Unable to delete DHCP entry

Hi,

After playing around with deployment a bit, I have a host that I'm
unable to remove for some reason. The DHCP entry has vanished and
Foreman 1.5 won't let me remove it:

Remove DHCP Settings for host2.xxxx.yyy task failed with the following
error: ERF12-0635 [ProxyAPI::ProxyException]: Unable to delete DHCP
entry for xx:xx:xx:xx:xx:xx ([RestClient::BadRequest]: 400 Bad Request)
for proxy https://xxx.xxxx.xxx:8443/dhcp

How do I get rid of this host?

Kind regards,

Jorick Astrego
Netbulae B.V.

> Hi,
>
> After playing around with deployment a bit, I have a host that I'm unable
> to remove for some reason. The DHCP entry has vanished and Foreman 1.5
> won't let me remove it:
>
> Remove DHCP Settings for host2.xxxx.yyy task failed with the following
> error: ERF12-0635 [ProxyAPI::ProxyException]: Unable to delete DHCP entry
> for xx:xx:xx:xx:xx:xx ([RestClient::BadRequest]: 400 Bad Request) for proxy
> https://xxx.xxxx.xxx:8443/dhcp <https://foreman01.netbulae.mgmt:8443/dhcp>
>
>
you probably will find the root cause in your dhcp proxy logs.

> How do I get rid of this host?
>
you can move it to non managed and then delete it, but note it would
probably leave a stale dns entry etc.

Ohad

··· On Mon, May 19, 2014 at 11:25 AM, Jorick Astrego wrote:

Kind regards,

Jorick Astrego
Netbulae B.V.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Hello,

So was this issue with missing with DHCP reservations fixed by these
patches?

I run Foreman 1.5.1 + MS DHCP proxy and noticed that it's impossible to
cancel build/delete host if someone manually deleted Foreman DHCP
reservation.

I think host deletion in Foreman MUST be done even Foreman proxies are
failed to delete DNC/DHCP records. 0

Otherwise we are getting "ghost" hosts in Foreman database.

Thank you!
Evgeny

··· On Monday, May 19, 2014 1:25:30 AM UTC-7, Jorick Astrego wrote: > > Hi, > > After playing around with deployment a bit, I have a host that I'm unable > to remove for some reason. The DHCP entry has vanished and Foreman 1.5 > won't let me remove it: > > Remove DHCP Settings for host2.xxxx.yyy task failed with the following > error: ERF12-0635 [ProxyAPI::ProxyException]: Unable to delete DHCP entry > for xx:xx:xx:xx:xx:xx ([RestClient::BadRequest]: 400 Bad Request) for proxy > https://xxx.xxxx.xxx:8443/dhcp > > How do I get rid of this host? > > Kind regards, > > Jorick Astrego > Netbulae B.V. >

I found a handy plugin: foreman_dhcp_browser
<https://github.com/theforeman/foreman_dhcp_browser>.

This plugin will add a DHCP button per Subnet, where you can browse and
edit DHCP leases in the Foreman web UI. The changes will be sent to the
respective smart proxy.

··· On Monday, May 19, 2014 1:25:30 AM UTC-7, Jorick Astrego wrote: > > Hi, > > After playing around with deployment a bit, I have a host that I'm unable > to remove for some reason. The DHCP entry has vanished and Foreman 1.5 > won't let me remove it: > > Remove DHCP Settings for host2.xxxx.yyy task failed with the following > error: ERF12-0635 [ProxyAPI::ProxyException]: Unable to delete DHCP entry > for xx:xx:xx:xx:xx:xx ([RestClient::BadRequest]: 400 Bad Request) for proxy > https://xxx.xxxx.xxx:8443/dhcp > > How do I get rid of this host? > > Kind regards, > > Jorick Astrego > Netbulae B.V. >

>
>
>
>
> Hi,
>
> After playing around with deployment a bit, I have a host that
> I'm unable to remove for some reason. The DHCP entry has
> vanished and Foreman 1.5 won't let me remove it:
>
> Remove DHCP Settings for host2.xxxx.yyy task failed with the
> following error: ERF12-0635 [ProxyAPI::ProxyException]: Unable
> to delete DHCP entry for xx:xx:xx:xx:xx:xx
> ([RestClient::BadRequest]: 400 Bad Request) for proxy
> https://xxx.xxxx.xxx:8443/dhcp
>
>
>
>
>
> you probably will find the root cause in your dhcp proxy logs.
>
>
> How do I get rid of this host?
>
>
> you can move it to non managed and then delete it, but note it would
> probably leave a stale dns entry etc.
>
>
> Ohad

From the proxy.log:

    E, [2014-05-19T10:21:54.063698 #30522] ERROR -- :
    xxx.xxx.xxx.xxx / xx:xx:xx:xx:xx:xx is static - unable to delete
    D, [2014-05-19T10:21:54.063777 #30522] DEBUG
    -- : /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:15:in `delRecord&#39;
    /usr/share/foreman-proxy/bin/../lib/dhcp_api.rb:109:in
    `DELETE /dhcp/:network/:record&#39;
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call&#39;

But I pressed delete again after waiting some time and now it does
remove, is there some task scheduled in the background?

    E, [2014-05-19T11:11:04.725830 #30522] ERROR -- : Record
    xx.xxx.xxx.0/xx:xx:xx:xx:xx:xx not found
    D, [2014-05-19T11:11:04.827046 #30522] DEBUG -- : TFTP: entry
    for xx:xx:xx:xx:xx:xx removed successfully

Kind regards,
Jorick Astrego

··· On Mon, 2014-05-19 at 11:56 +0300, Ohad Levy wrote: > On Mon, May 19, 2014 at 11:25 AM, Jorick Astrego > wrote:

> > Hi,
> >
> > After playing around with deployment a bit, I have a host
> > that I'm unable to remove for some reason. The DHCP entry
> > has vanished and Foreman 1.5 won't let me remove it:
> >
> > Remove DHCP Settings for host2.xxxx.yyy task failed with the
> > following error: ERF12-0635 [ProxyAPI::ProxyException]:
> > Unable to delete DHCP entry for xx:xx:xx:xx:xx:xx
> > ([RestClient::BadRequest]: 400 Bad Request) for proxy
> > https://xxx.xxxx.xxx:8443/dhcp
> >
> >
> >
> >
> >
> > you probably will find the root cause in your dhcp proxy logs.
> >
> >
> > How do I get rid of this host?
> >
> >
> > you can move it to non managed and then delete it, but note it would
> > probably leave a stale dns entry etc.
> >
> >
> > Ohad
>
>
> From the proxy.log:
>
>
> E, [2014-05-19T10:21:54.063698 #30522] ERROR – :
> xxx.xxx.xxx.xxx / xx:xx:xx:xx:xx:xx is static - unable to
> delete
> D, [2014-05-19T10:21:54.063777 #30522] DEBUG
> – : /usr/share/foreman-proxy/bin/…/lib/proxy/dhcp/server/isc.rb:15:in delRecord&#39; &gt; /usr/share/foreman-proxy/bin/../lib/dhcp_api.rb:109:in &gt;DELETE /dhcp/:network/:record'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
>
>
> But I pressed delete again after waiting some time and now it does
> remove, is there some task scheduled in the background?
>
>
> E, [2014-05-19T11:11:04.725830 #30522] ERROR – : Record
> xx.xxx.xxx.0/xx:xx:xx:xx:xx:xx not found
> D, [2014-05-19T11:11:04.827046 #30522] DEBUG – : TFTP: entry
> for xx:xx:xx:xx:xx:xx removed successfully
>
>
> Kind regards,
> Jorick Astrego

Hi again,

Now I have trouble with a stale dhcp lease:

    Warning!
    ERF12-4395 [ProxyAPI::ProxyException]: Unable to retrieve DHCP
    entry for xx:xx:xx:xx:xx:xx ([Net::LeaseConflict]:
    xx:xx:xx:xx:xx:xx/zz.zzz.zzz.zz) for proxy
    https://foreman.xxxx.xxxx:8443/dhcp

When I check the dhcp table of the proxy I see the lease is still
active, which is strange as the machine has been shut down and the lease
should have been expired:

    Leases

     IP 
     MAC 
    Lease
    Starts 
    Lease
    Ends 
    Lease
    State 
    xx.xxx.xxx.xx
    xx:xx:xx:xx:xx:xx
    Mon
    May 19
    09:26:16 UTC 2014
    Mon
    May 19
    09:36:16 UTC 2014
    active
    yy.yyy.yyy.yy
    yy:yy:yy:yy:yy:yy
    Mon
    May 19
    09:31:14 UTC 2014
    Mon
    May 19
    09:41:14 UTC 2014
    active

    
    [root@foreman] date
    Mon May 19 11:36:44 CEST 2014

The only way I can get things going again was removing the entry
from /var/lib/dhcpd/dhcpd.leases and restarting dhcpd…

Kind regards,

Jorick Astrego
Netbulae B.V.

Jorick,

we currently have one outstanding issue. Would you mind to verify it
this helps you too? There are two pull requests:

https://github.com/theforeman/smart-proxy/pull/155

and

https://github.com/theforeman/foreman/pull/1430

For me it helped to resolve the exact issue. I am currently re-testing
that.

LZ

··· On Mon, May 19, 2014 at 11:44:44AM +0200, Jorick Astrego wrote: > > > Hi, > > > > > > After playing around with deployment a bit, I have a host > > > that I'm unable to remove for some reason. The DHCP entry > > > has vanished and Foreman 1.5 won't let me remove it: > > > > > > Remove DHCP Settings for host2.xxxx.yyy task failed with the > > > following error: ERF12-0635 [ProxyAPI::ProxyException]: > > > Unable to delete DHCP entry for xx:xx:xx:xx:xx:xx > > > ([RestClient::BadRequest]: 400 Bad Request) for proxy > > > https://xxx.xxxx.xxx:8443/dhcp > > > > > > > > > > > > > > > > > > you probably will find the root cause in your dhcp proxy logs. > > > > > > > > > How do I get rid of this host? > > > > > > > > > you can move it to non managed and then delete it, but note it would > > > probably leave a stale dns entry etc. > > > > > > > > > Ohad > > > > > > From the proxy.log: > > > > > > E, [2014-05-19T10:21:54.063698 #30522] ERROR -- : > > xxx.xxx.xxx.xxx / xx:xx:xx:xx:xx:xx is static - unable to > > delete > > D, [2014-05-19T10:21:54.063777 #30522] DEBUG > > -- : /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:15:in `delRecord' > > /usr/share/foreman-proxy/bin/../lib/dhcp_api.rb:109:in > > `DELETE /dhcp/:network/:record' > > /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call' > > > > > > But I pressed delete again after waiting some time and now it does > > remove, is there some task scheduled in the background? > > > > > > E, [2014-05-19T11:11:04.725830 #30522] ERROR -- : Record > > xx.xxx.xxx.0/xx:xx:xx:xx:xx:xx not found > > D, [2014-05-19T11:11:04.827046 #30522] DEBUG -- : TFTP: entry > > for xx:xx:xx:xx:xx:xx removed successfully > > > > > > Kind regards, > > Jorick Astrego > > > Hi again, > > Now I have trouble with a stale dhcp lease: > > > Warning! > ERF12-4395 [ProxyAPI::ProxyException]: Unable to retrieve DHCP > entry for xx:xx:xx:xx:xx:xx ([Net::LeaseConflict]: > xx:xx:xx:xx:xx:xx/zz.zzz.zzz.zz) for proxy > https://foreman.xxxx.xxxx:8443/dhcp > > > When I check the dhcp table of the proxy I see the lease is still > active, which is strange as the machine has been shut down and the lease > should have been expired: > > > > Leases > > IP > MAC > Lease > Starts > Lease > Ends > Lease > State > xx.xxx.xxx.xx > xx:xx:xx:xx:xx:xx > Mon > May 19 > 09:26:16 UTC 2014 > Mon > May 19 > 09:36:16 UTC 2014 > active > yy.yyy.yyy.yy > yy:yy:yy:yy:yy:yy > Mon > May 19 > 09:31:14 UTC 2014 > Mon > May 19 > 09:41:14 UTC 2014 > active > > > [root@foreman] date > Mon May 19 11:36:44 CEST 2014 > > > The only way I can get things going again was removing the entry > from /var/lib/dhcpd/dhcpd.leases and restarting dhcpd.... > > Kind regards, > > Jorick Astrego > Netbulae B.V. > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hi,

It was fixed in 1.6 dev, but in our 1.5.1 environment I still have the
same issues.

Kind regards,

Jorick Astrego
Netbulae

··· On 07/21/2014 07:51 PM, Evgeny Vasilchenko wrote: > Hello, > > So was this issue with missing with DHCP reservations fixed by these > patches? > > I run Foreman 1.5.1 + MS DHCP proxy and noticed that it's impossible > to cancel build/delete host if someone manually deleted Foreman DHCP > reservation. > > I think host deletion in Foreman MUST be done even Foreman proxies are > failed to delete DNC/DHCP records. 0 > > Otherwise we are getting "ghost" hosts in Foreman database. > > Thank you! > Evgeny > > On Monday, May 19, 2014 1:25:30 AM UTC-7, Jorick Astrego wrote: > > Hi, > > After playing around with deployment a bit, I have a host that I'm > unable to remove for some reason. The DHCP entry has vanished and > Foreman 1.5 won't let me remove it: > > Remove DHCP Settings for host2.xxxx.yyy task failed with the > following error: ERF12-0635 [ProxyAPI::ProxyException]: Unable to > delete DHCP entry for xx:xx:xx:xx:xx:xx ([RestClient::BadRequest]: > 400 Bad Request) for proxy https://xxx.xxxx.xxx:8443/dhcp > > > How do I get rid of this host? > > Kind regards, > > Jorick Astrego > Netbulae B.V. > > -- > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-users+unsubscribe@googlegroups.com > . > To post to this group, send email to foreman-users@googlegroups.com > . > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.

Hi,

I can test it but I have to setup a build environment first… As an sys
admin I normally only try to do rpm packages ;->

Will give you an update when I have things setup.

Kind regards,
Jorick Astrego

··· On Mon, 2014-05-19 at 12:03 +0200, Lukas Zapletal wrote:

Jorick,

we currently have one outstanding issue. Would you mind to verify it
this helps you too? There are two pull requests:

https://github.com/theforeman/smart-proxy/pull/155

and

https://github.com/theforeman/foreman/pull/1430

For me it helped to resolve the exact issue. I am currently re-testing
that.

LZ

On Mon, May 19, 2014 at 11:44:44AM +0200, Jorick Astrego wrote:

    Hi,
    
    After playing around with deployment a bit, I have a host
    that I'm unable to remove for some reason. The DHCP entry
    has vanished and Foreman 1.5 won't let me remove it:
    
    Remove DHCP Settings for host2.xxxx.yyy task failed with the
    following error: ERF12-0635 [ProxyAPI::ProxyException]:
    Unable to delete DHCP entry for xx:xx:xx:xx:xx:xx
    ([RestClient::BadRequest]: 400 Bad Request) for proxy
    https://xxx.xxxx.xxx:8443/dhcp

you probably will find the root cause in your dhcp proxy logs.

    How do I get rid of this host?

you can move it to non managed and then delete it, but note it would
probably leave a stale dns entry etc.

Ohad

From the proxy.log:

    E, [2014-05-19T10:21:54.063698 #30522] ERROR -- :
    xxx.xxx.xxx.xxx / xx:xx:xx:xx:xx:xx is static - unable to
    delete
    D, [2014-05-19T10:21:54.063777 #30522] DEBUG
    -- : /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:15:in `delRecord'
    /usr/share/foreman-proxy/bin/../lib/dhcp_api.rb:109:in
    `DELETE /dhcp/:network/:record'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'

But I pressed delete again after waiting some time and now it does
remove, is there some task scheduled in the background?

    E, [2014-05-19T11:11:04.725830 #30522] ERROR -- : Record
    xx.xxx.xxx.0/xx:xx:xx:xx:xx:xx not found
    D, [2014-05-19T11:11:04.827046 #30522] DEBUG -- : TFTP: entry
    for xx:xx:xx:xx:xx:xx removed successfully

Kind regards,
Jorick Astrego

Hi again,

Now I have trouble with a stale dhcp lease:

    Warning!
    ERF12-4395 [ProxyAPI::ProxyException]: Unable to retrieve DHCP
    entry for xx:xx:xx:xx:xx:xx ([Net::LeaseConflict]:
    xx:xx:xx:xx:xx:xx/zz.zzz.zzz.zz) for proxy
    https://foreman.xxxx.xxxx:8443/dhcp

When I check the dhcp table of the proxy I see the lease is still
active, which is strange as the machine has been shut down and the lease
should have been expired:

    Leases

     IP 
     MAC 
    Lease
    Starts 
    Lease
    Ends 
    Lease
    State 
    xx.xxx.xxx.xx
    xx:xx:xx:xx:xx:xx
    Mon
    May 19
    09:26:16 UTC 2014
    Mon
    May 19
    09:36:16 UTC 2014
    active
    yy.yyy.yyy.yy
    yy:yy:yy:yy:yy:yy
    Mon
    May 19
    09:31:14 UTC 2014
    Mon
    May 19
    09:41:14 UTC 2014
    active

    
    [root@foreman] date
    Mon May 19 11:36:44 CEST 2014

The only way I can get things going again was removing the entry
from /var/lib/dhcpd/dhcpd.leases and restarting dhcpd…

Kind regards,

Jorick Astrego
Netbulae B.V.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

You can apply git pull requests as ordinary diffs with GNU patch on
production environments too. You only need two restarts.

LZ

··· On Mon, May 19, 2014 at 01:19:15PM +0200, Jorick Astrego wrote: > Hi, > > I can test it but I have to setup a build environment first.. As an sys > admin I normally only try to do rpm packages ;-> > > Will give you an update when I have things setup. > > Kind regards, > Jorick Astrego > > > On Mon, 2014-05-19 at 12:03 +0200, Lukas Zapletal wrote: > > > Jorick, > > > > we currently have one outstanding issue. Would you mind to verify it > > this helps you too? There are two pull requests: > > > > https://github.com/theforeman/smart-proxy/pull/155 > > > > and > > > > https://github.com/theforeman/foreman/pull/1430 > > > > For me it helped to resolve the exact issue. I am currently re-testing > > that. > > > > LZ > > > > On Mon, May 19, 2014 at 11:44:44AM +0200, Jorick Astrego wrote: > > > > > Hi, > > > > > > > > > > After playing around with deployment a bit, I have a host > > > > > that I'm unable to remove for some reason. The DHCP entry > > > > > has vanished and Foreman 1.5 won't let me remove it: > > > > > > > > > > Remove DHCP Settings for host2.xxxx.yyy task failed with the > > > > > following error: ERF12-0635 [ProxyAPI::ProxyException]: > > > > > Unable to delete DHCP entry for xx:xx:xx:xx:xx:xx > > > > > ([RestClient::BadRequest]: 400 Bad Request) for proxy > > > > > https://xxx.xxxx.xxx:8443/dhcp > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > you probably will find the root cause in your dhcp proxy logs. > > > > > > > > > > > > > > > How do I get rid of this host? > > > > > > > > > > > > > > > you can move it to non managed and then delete it, but note it would > > > > > probably leave a stale dns entry etc. > > > > > > > > > > > > > > > Ohad > > > > > > > > > > > > From the proxy.log: > > > > > > > > > > > > E, [2014-05-19T10:21:54.063698 #30522] ERROR -- : > > > > xxx.xxx.xxx.xxx / xx:xx:xx:xx:xx:xx is static - unable to > > > > delete > > > > D, [2014-05-19T10:21:54.063777 #30522] DEBUG > > > > -- : /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:15:in `delRecord' > > > > /usr/share/foreman-proxy/bin/../lib/dhcp_api.rb:109:in > > > > `DELETE /dhcp/:network/:record' > > > > /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call' > > > > > > > > > > > > But I pressed delete again after waiting some time and now it does > > > > remove, is there some task scheduled in the background? > > > > > > > > > > > > E, [2014-05-19T11:11:04.725830 #30522] ERROR -- : Record > > > > xx.xxx.xxx.0/xx:xx:xx:xx:xx:xx not found > > > > D, [2014-05-19T11:11:04.827046 #30522] DEBUG -- : TFTP: entry > > > > for xx:xx:xx:xx:xx:xx removed successfully > > > > > > > > > > > > Kind regards, > > > > Jorick Astrego > > > > > > > > > Hi again, > > > > > > Now I have trouble with a stale dhcp lease: > > > > > > > > > Warning! > > > ERF12-4395 [ProxyAPI::ProxyException]: Unable to retrieve DHCP > > > entry for xx:xx:xx:xx:xx:xx ([Net::LeaseConflict]: > > > xx:xx:xx:xx:xx:xx/zz.zzz.zzz.zz) for proxy > > > https://foreman.xxxx.xxxx:8443/dhcp > > > > > > > > > When I check the dhcp table of the proxy I see the lease is still > > > active, which is strange as the machine has been shut down and the lease > > > should have been expired: > > > > > > > > > > > > Leases > > > > > > IP > > > MAC > > > Lease > > > Starts > > > Lease > > > Ends > > > Lease > > > State > > > xx.xxx.xxx.xx > > > xx:xx:xx:xx:xx:xx > > > Mon > > > May 19 > > > 09:26:16 UTC 2014 > > > Mon > > > May 19 > > > 09:36:16 UTC 2014 > > > active > > > yy.yyy.yyy.yy > > > yy:yy:yy:yy:yy:yy > > > Mon > > > May 19 > > > 09:31:14 UTC 2014 > > > Mon > > > May 19 > > > 09:41:14 UTC 2014 > > > active > > > > > > > > > [root@foreman] date > > > Mon May 19 11:36:44 CEST 2014 > > > > > > > > > The only way I can get things going again was removing the entry > > > from /var/lib/dhcpd/dhcpd.leases and restarting dhcpd.... > > > > > > Kind regards, > > > > > > Jorick Astrego > > > Netbulae B.V. > > > > > > -- > > > You received this message because you are subscribed to the Google Groups "Foreman users" group. > > > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > > > To post to this group, send email to foreman-users@googlegroups.com. > > > Visit this group at http://groups.google.com/group/foreman-users. > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > > Later, > > > > Lukas "lzap" Zapletal > > irc: lzap #theforeman > > > > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hi,

Took a while to get some testing time. I'm trying to do it with gnu
patch but don't really know how to do this. Not a developer :wink:

I cloned the fork of GregSutcliffe but now don't know how to continue.

Kind regards,

Jorick Astrego

··· On 05/23/2014 01:23 PM, Lukas Zapletal wrote: > You can apply git pull requests as ordinary diffs with GNU patch on > production environments too. You only need two restarts. > > LZ > > On Mon, May 19, 2014 at 01:19:15PM +0200, Jorick Astrego wrote: >> Hi, >> >> I can test it but I have to setup a build environment first.. As an sys >> admin I normally only try to do rpm packages ;-> >> >> Will give you an update when I have things setup. >> >> Kind regards, >> Jorick Astrego >> >> >> On Mon, 2014-05-19 at 12:03 +0200, Lukas Zapletal wrote: >> >>> Jorick, >>> >>> we currently have one outstanding issue. Would you mind to verify it >>> this helps you too? There are two pull requests: >>> >>> https://github.com/theforeman/smart-proxy/pull/155 >>> >>> and >>> >>> https://github.com/theforeman/foreman/pull/1430 >>> >>> For me it helped to resolve the exact issue. I am currently re-testing >>> that. >>> >>> LZ >>> >>> On Mon, May 19, 2014 at 11:44:44AM +0200, Jorick Astrego wrote: >>>>>> Hi, >>>>>> >>>>>> After playing around with deployment a bit, I have a host >>>>>> that I'm unable to remove for some reason. The DHCP entry >>>>>> has vanished and Foreman 1.5 won't let me remove it: >>>>>> >>>>>> Remove DHCP Settings for host2.xxxx.yyy task failed with the >>>>>> following error: ERF12-0635 [ProxyAPI::ProxyException]: >>>>>> Unable to delete DHCP entry for xx:xx:xx:xx:xx:xx >>>>>> ([RestClient::BadRequest]: 400 Bad Request) for proxy >>>>>> https://xxx.xxxx.xxx:8443/dhcp >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> you probably will find the root cause in your dhcp proxy logs. >>>>>> >>>>>> >>>>>> How do I get rid of this host? >>>>>> >>>>>> >>>>>> you can move it to non managed and then delete it, but note it would >>>>>> probably leave a stale dns entry etc. >>>>>> >>>>>> >>>>>> Ohad >>>>> >>>>> From the proxy.log: >>>>> >>>>> >>>>> E, [2014-05-19T10:21:54.063698 #30522] ERROR -- : >>>>> xxx.xxx.xxx.xxx / xx:xx:xx:xx:xx:xx is static - unable to >>>>> delete >>>>> D, [2014-05-19T10:21:54.063777 #30522] DEBUG >>>>> -- : /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:15:in `delRecord' >>>>> /usr/share/foreman-proxy/bin/../lib/dhcp_api.rb:109:in >>>>> `DELETE /dhcp/:network/:record' >>>>> /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call' >>>>> >>>>> >>>>> But I pressed delete again after waiting some time and now it does >>>>> remove, is there some task scheduled in the background? >>>>> >>>>> >>>>> E, [2014-05-19T11:11:04.725830 #30522] ERROR -- : Record >>>>> xx.xxx.xxx.0/xx:xx:xx:xx:xx:xx not found >>>>> D, [2014-05-19T11:11:04.827046 #30522] DEBUG -- : TFTP: entry >>>>> for xx:xx:xx:xx:xx:xx removed successfully >>>>> >>>>> >>>>> Kind regards, >>>>> Jorick Astrego >>>> >>>> Hi again, >>>> >>>> Now I have trouble with a stale dhcp lease: >>>> >>>> >>>> Warning! >>>> ERF12-4395 [ProxyAPI::ProxyException]: Unable to retrieve DHCP >>>> entry for xx:xx:xx:xx:xx:xx ([Net::LeaseConflict]: >>>> xx:xx:xx:xx:xx:xx/zz.zzz.zzz.zz) for proxy >>>> https://foreman.xxxx.xxxx:8443/dhcp >>>> >>>> >>>> When I check the dhcp table of the proxy I see the lease is still >>>> active, which is strange as the machine has been shut down and the lease >>>> should have been expired: >>>> >>>> >>>> >>>> Leases >>>> >>>> IP >>>> MAC >>>> Lease >>>> Starts >>>> Lease >>>> Ends >>>> Lease >>>> State >>>> xx.xxx.xxx.xx >>>> xx:xx:xx:xx:xx:xx >>>> Mon >>>> May 19 >>>> 09:26:16 UTC 2014 >>>> Mon >>>> May 19 >>>> 09:36:16 UTC 2014 >>>> active >>>> yy.yyy.yyy.yy >>>> yy:yy:yy:yy:yy:yy >>>> Mon >>>> May 19 >>>> 09:31:14 UTC 2014 >>>> Mon >>>> May 19 >>>> 09:41:14 UTC 2014 >>>> active >>>> >>>> >>>> [root@foreman] date >>>> Mon May 19 11:36:44 CEST 2014 >>>> >>>> >>>> The only way I can get things going again was removing the entry >>>> from /var/lib/dhcpd/dhcpd.leases and restarting dhcpd.... >>>> >>>> Kind regards, >>>> >>>> Jorick Astrego >>>> Netbulae B.V. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups "Foreman users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. >>>> To post to this group, send email to foreman-users@googlegroups.com. >>>> Visit this group at http://groups.google.com/group/foreman-users. >>>> For more options, visit https://groups.google.com/d/optout. >>> -- >>> Later, >>> >>> Lukas "lzap" Zapletal >>> irc: lzap #theforeman >>> >> >> -- >> You received this message because you are subscribed to the Google Groups "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. >> To post to this group, send email to foreman-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout.

> Took a while to get some testing time. I'm trying to do it with gnu patch
> but don't really know how to do this. Not a developer :wink:

wget PR_URL.diff

patch -p1 < PRNUMBER.diff

Note the extension must be really "diff" and not "patch" (which is
git-formatted mail diff which does not work with GNU patch)

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman