Error while Provisioning via API

I am try initiate a provisioning request via API but I am getting the error
below

{"errors":{"base":["Failed to reboot: ERF12-1772
[ProxyAPI::ProxyException]: Unable to perform power BMC operation
([Errno::EHOSTUNREACH]: No route to host - connect(2)) for proxy
http://192.168.1.61:8443/bmc"]}}

Though when I reboot the server it goes into the provisioning mode

Please let me know if I am missing something

Thanks & Regards,

Rakesh K.

Hello,

> I am try initiate a provisioning request via API but I am getting the error
> below
>
> {"errors":{"base":["Failed to reboot: ERF12-1772
> [ProxyAPI::ProxyException]: Unable to perform power BMC operation

is this discovered node, or provisioned node?

> ([Errno::EHOSTUNREACH]: No route to host - connect(2)) for proxy
> http://192.168.1.61:8443/bmc"]}}

The error message says it all - no route to host. Can Foreman reach out
the node directly? Note foreman-proxy is not yet involved, we are
actively working on a feature to use foreman-proxy for this kind of
communication (about to land in Foreman 1.8).

··· -- Later, Lukas #lzap Zapletal

Dear Lukas,

This is a discovered physical host.

But I am deleting and re adding the same host multiple times for testing
purposes.

Also when I try to provision from UI I am not receiving any errors but this
is happening only in cases when I try to provision via API.

The pxe files is getting written to pxelinux.cfg and all other setting are
in place but I have manually reboot the server and put it into pxe
environment for it to start provisioning.

One other error that I have come across after deleting and readding the
host is

"error": {"id":39,"errors":{"conflict":["DHCP records -78:2b:cb:32:94:16/
192.168.1.76 already exists"]},"full_messages":["Conflict DHCP records
-78:2b:cb:32:94:16/192.168.1.76 already exists"]}

In this case I have manually delete the lease entry for the given man from
dhcpd.leases file.

Please let me know if I am missing something …

··· On Fri, Nov 28, 2014 at 8:27 PM, Lukas Zapletal wrote:

Hello,

I am try initiate a provisioning request via API but I am getting the
error
below

{“errors”:{“base”:["Failed to reboot: ERF12-1772
[ProxyAPI::ProxyException]: Unable to perform power BMC operation

is this discovered node, or provisioned node?

([Errno::EHOSTUNREACH]: No route to host - connect(2)) for proxy
http://192.168.1.61:8443/bmc"]}}

The error message says it all - no route to host. Can Foreman reach out
the node directly? Note foreman-proxy is not yet involved, we are
actively working on a feature to use foreman-proxy for this kind of
communication (about to land in Foreman 1.8).


Later,
Lukas #lzap Zapletal


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.

> Also when I try to provision from UI I am not receiving any errors but this
> is happening only in cases when I try to provision via API.
>
> The pxe files is getting written to pxelinux.cfg and all other setting are
> in place but I have manually reboot the server and put it into pxe
> environment for it to start provisioning.

Do I understand you right that the connection error is now solved?

> One other error that I have come across after deleting and readding the
> host is
>
> "error": {"id":39,"errors":{"conflict":["DHCP records -78:2b:cb:32:94:16/
> 192.168.1.76 already exists"]},"full_messages":["Conflict DHCP records
> -78:2b:cb:32:94:16/192.168.1.76 already exists"]}

We have a known bug in proxy code that does not handle expired leases
properly. We have an opened PR for that, but you should be able to
override the conflict in the Foreman UI, unless you are using Staypuft.

··· -- Later, Lukas #lzap Zapletal

The connection error has not been solved as yet.

I am still unable to boot the server via API. I even tried to trigger the
API from the foreman server itself… but still get the no route error.

No… I am not using UI for now… I am trying to provision via the API.

··· On Thu, Dec 4, 2014 at 2:53 PM, Lukas Zapletal wrote:

Also when I try to provision from UI I am not receiving any errors but
this
is happening only in cases when I try to provision via API.

The pxe files is getting written to pxelinux.cfg and all other setting
are
in place but I have manually reboot the server and put it into pxe
environment for it to start provisioning.

Do I understand you right that the connection error is now solved?

One other error that I have come across after deleting and readding the
host is

“error”: {“id”:39,“errors”:{“conflict”:[“DHCP records -78:2b:cb:32:94:16/
192.168.1.76 already exists”]},“full_messages”:[“Conflict DHCP records
-78:2b:cb:32:94:16/192.168.1.76 already exists”]}

We have a known bug in proxy code that does not handle expired leases
properly. We have an opened PR for that, but you should be able to
override the conflict in the Foreman UI, unless you are using Staypuft.


Later,
Lukas #lzap Zapletal


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.

> I am still unable to boot the server via API. I even tried to trigger the
> API from the foreman server itself… but still get the no route error.
>
> No… I am not using UI for now… I am trying to provision via the API.

I'd like to help, but I am not sure where you are now. Describe me what
you are trying to do exactly, what your configuration is (kernel command
line), your network info (address, routers) and stuff.

··· -- Later, Lukas #lzap Zapletal

I really appreciate your help.

The issue seems be fixed for me.

I am really sorry but cannot update what fixed the issue as I have randomly
done so many tweaks that I am not sure what fixed the issue.

But I will soon setup a new foreman and update.

Thanks Lukas.

Regards,

Rakesh K.

··· On Thu, Dec 4, 2014 at 7:25 PM, Lukas Zapletal wrote:

I am still unable to boot the server via API. I even tried to trigger the
API from the foreman server itself… but still get the no route error.

No… I am not using UI for now… I am trying to provision via the API.

I’d like to help, but I am not sure where you are now. Describe me what
you are trying to do exactly, what your configuration is (kernel command
line), your network info (address, routers) and stuff.


Later,
Lukas #lzap Zapletal


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.

Now… the boot when provisioning works… but the power settings still fail
to work

[root@dev ~]# curl -k -u admin:changeme -H "Content-Type: application/json"
-X PUT -d '{"power_action":"status", "hosts":{}}'
http://foreman.url/api/v2/hosts/62/power
{
"error": {"message":"ERF42-9958 [Foreman::Exception]: Unknown power
management support - can't continue"}

··· On Thu, Dec 4, 2014 at 10:28 PM, Rakesh Kathpal wrote:

I really appreciate your help.

The issue seems be fixed for me.

I am really sorry but cannot update what fixed the issue as I have
randomly done so many tweaks that I am not sure what fixed the issue.

But I will soon setup a new foreman and update.

Thanks Lukas.

Regards,

Rakesh K.

On Thu, Dec 4, 2014 at 7:25 PM, Lukas Zapletal lzap@redhat.com wrote:

I am still unable to boot the server via API. I even tried to trigger
the
API from the foreman server itself… but still get the no route error.

No… I am not using UI for now… I am trying to provision via the API.

I’d like to help, but I am not sure where you are now. Describe me what
you are trying to do exactly, what your configuration is (kernel command
line), your network info (address, routers) and stuff.


Later,
Lukas #lzap Zapletal


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.