Auto-Provisioning Discovered Bare-metal Host via PXE Issue

Foreman 1.14.3
TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, and SSH

I currently have Foreman setup for discovery with host groups and discovery
rules in place. I'm able to successfully auto-provision bare-metal hosts
with two network interfaces via PXEBoot.

I am, however, having issue auto-provisioning a SuperMicro, bare-metal host
with 4 network interfaces and an IPMI interface.
The host is "discovered" and if I select "Auto Provision" from the
drop-down, Foreman carries on using the appropriate host group based on the
correct discovery rules and reboots the host.

However, the corresponding tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx file
is never created and the host boots back into discovery.
The issue is that the "domain", of the primary/provisioning interface, is
never getting set automatically. If I manually provision the host via the
"Provision" drop-down, rather than "Auto Provision",
everything thereafter goes smoothly.

Any insight into why the domain isn't getting set when the host is
discovered/auto-provisioned would be greatly appreciated!

Thanks
Chad

Related: https://groups.google.com/forum/#!topic/foreman-users/4qBQC9Y-zmg

··· On Tuesday, April 4, 2017 at 1:42:16 PM UTC-5, Chad Schroeder wrote: > > Foreman 1.14.3 > TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, and SSH > > I currently have Foreman setup for discovery with host groups and > discovery rules in place. I'm able to successfully auto-provision > bare-metal hosts with two network interfaces via PXEBoot. > > I am, however, having issue auto-provisioning a SuperMicro, bare-metal > host with 4 network interfaces and an IPMI interface. > The host is "discovered" and if I select "Auto Provision" from the > drop-down, Foreman carries on using the appropriate host group based on the > correct discovery rules and reboots the host. > > However, the corresponding tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx file > is never created and the host boots back into discovery. > The issue is that the "domain", of the primary/provisioning interface, is > never getting set automatically. If I manually provision the host via the > "Provision" drop-down, rather than "Auto Provision", > everything thereafter goes smoothly. > > Any insight into why the domain isn't getting set when the host is > discovered/auto-provisioned would be greatly appreciated! > > Thanks > Chad >

Is the host getting "converted" into ordinary host? if so can you edit
it and then submit save without changing any value, is there any
error?

··· On Tue, Apr 4, 2017 at 8:48 PM, Chad Schroeder wrote: > Related: https://groups.google.com/forum/#!topic/foreman-users/4qBQC9Y-zmg > > > On Tuesday, April 4, 2017 at 1:42:16 PM UTC-5, Chad Schroeder wrote: >> >> Foreman 1.14.3 >> TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, and SSH >> >> I currently have Foreman setup for discovery with host groups and >> discovery rules in place. I'm able to successfully auto-provision >> bare-metal hosts with two network interfaces via PXEBoot. >> >> I am, however, having issue auto-provisioning a SuperMicro, bare-metal >> host with 4 network interfaces and an IPMI interface. >> The host is "discovered" and if I select "Auto Provision" from the >> drop-down, Foreman carries on using the appropriate host group based on the >> correct discovery rules and reboots the host. >> >> However, the corresponding tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx >> file is never created and the host boots back into discovery. >> The issue is that the "domain", of the primary/provisioning interface, is >> never getting set automatically. If I manually provision the host via the >> "Provision" drop-down, rather than "Auto Provision", >> everything thereafter goes smoothly. >> >> Any insight into why the domain isn't getting set when the host is >> discovered/auto-provisioned would be greatly appreciated! >> >> Thanks >> Chad > > -- > 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 https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,
Lukas @lzap Zapletal

Yes, it is converted into a regular host after selecting "Auto provision".
Yes, I can select edit on the host and then submit without error. When
done that way, the domain for the primary/provisioning interface is the
updated.
However, tftp orchestration remains unconfigured so the host will reboot
back into discovery. "Rebuild config" must be selected and executed in
order for the host to boot into the actually OS provisioning kickstart.

··· On Wednesday, April 5, 2017 at 5:47:33 AM UTC-5, Lukas Zapletal wrote: > > Is the host getting "converted" into ordinary host? if so can you edit > it and then submit save without changing any value, is there any > error? > > On Tue, Apr 4, 2017 at 8:48 PM, Chad Schroeder > <chads.finis...@gmail.com > wrote: > > Related: > https://groups.google.com/forum/#!topic/foreman-users/4qBQC9Y-zmg > > > > > > On Tuesday, April 4, 2017 at 1:42:16 PM UTC-5, Chad Schroeder wrote: > >> > >> Foreman 1.14.3 > >> TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, and > SSH > >> > >> I currently have Foreman setup for discovery with host groups and > >> discovery rules in place. I'm able to successfully auto-provision > >> bare-metal hosts with two network interfaces via PXEBoot. > >> > >> I am, however, having issue auto-provisioning a SuperMicro, bare-metal > >> host with 4 network interfaces and an IPMI interface. > >> The host is "discovered" and if I select "Auto Provision" from the > >> drop-down, Foreman carries on using the appropriate host group based on > the > >> correct discovery rules and reboots the host. > >> > >> However, the corresponding tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx > >> file is never created and the host boots back into discovery. > >> The issue is that the "domain", of the primary/provisioning interface, > is > >> never getting set automatically. If I manually provision the host via > the > >> "Provision" drop-down, rather than "Auto Provision", > >> everything thereafter goes smoothly. > >> > >> Any insight into why the domain isn't getting set when the host is > >> discovered/auto-provisioned would be greatly appreciated! > >> > >> Thanks > >> Chad > > > > -- > > 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-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at https://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Later, > Lukas @lzap Zapletal >

Chad,

when you discover the host, do you see discovery_subnet fact? What's set?

Also can you send hammer CLI output of the discovered host or
screenshot of UI? How interfaces were detected?

I just installed stable version and trying to reproduce without any luck.

LZ

··· On Wed, Apr 5, 2017 at 2:17 PM, Chad Schroeder wrote: > Yes, it is converted into a regular host after selecting "Auto provision". > Yes, I can select edit on the host and then submit without error. When done > that way, the domain for the primary/provisioning interface is the updated. > However, tftp orchestration remains unconfigured so the host will reboot > back into discovery. "Rebuild config" must be selected and executed in > order for the host to boot into the actually OS provisioning kickstart. > > On Wednesday, April 5, 2017 at 5:47:33 AM UTC-5, Lukas Zapletal wrote: >> >> Is the host getting "converted" into ordinary host? if so can you edit >> it and then submit save without changing any value, is there any >> error? >> >> On Tue, Apr 4, 2017 at 8:48 PM, Chad Schroeder >> wrote: >> > Related: >> > https://groups.google.com/forum/#!topic/foreman-users/4qBQC9Y-zmg >> > >> > >> > On Tuesday, April 4, 2017 at 1:42:16 PM UTC-5, Chad Schroeder wrote: >> >> >> >> Foreman 1.14.3 >> >> TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, and >> >> SSH >> >> >> >> I currently have Foreman setup for discovery with host groups and >> >> discovery rules in place. I'm able to successfully auto-provision >> >> bare-metal hosts with two network interfaces via PXEBoot. >> >> >> >> I am, however, having issue auto-provisioning a SuperMicro, bare-metal >> >> host with 4 network interfaces and an IPMI interface. >> >> The host is "discovered" and if I select "Auto Provision" from the >> >> drop-down, Foreman carries on using the appropriate host group based on >> >> the >> >> correct discovery rules and reboots the host. >> >> >> >> However, the corresponding tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx >> >> file is never created and the host boots back into discovery. >> >> The issue is that the "domain", of the primary/provisioning interface, >> >> is >> >> never getting set automatically. If I manually provision the host via >> >> the >> >> "Provision" drop-down, rather than "Auto Provision", >> >> everything thereafter goes smoothly. >> >> >> >> Any insight into why the domain isn't getting set when the host is >> >> discovered/auto-provisioned would be greatly appreciated! >> >> >> >> Thanks >> >> Chad >> > >> > -- >> > 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-user...@googlegroups.com. >> > To post to this group, send email to forema...@googlegroups.com. >> > Visit this group at https://groups.google.com/group/foreman-users. >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> Later, >> Lukas @lzap Zapletal


Later,
Lukas @lzap Zapletal

Lukas,

I'll work on getting that info to you. Note, I was able to successfully
auto-provision other bare-metal hosts. This particular host, has 4 network
interfaces and IPMI and it doesn't auto-provision.
Also note, the IPMI interface is acquiring an IP from the subnet (via
foreman proxy dhcp) too. My initial thought is that IPMI is the culprit.

··· On Thursday, April 6, 2017 at 9:57:52 AM UTC-5, Lukas Zapletal wrote: > > Chad, > > when you discover the host, do you see discovery_subnet fact? What's set? > > Also can you send hammer CLI output of the discovered host or > screenshot of UI? How interfaces were detected? > > I just installed stable version and trying to reproduce without any luck. > > LZ > > On Wed, Apr 5, 2017 at 2:17 PM, Chad Schroeder > <chads.finis...@gmail.com > wrote: > > Yes, it is converted into a regular host after selecting "Auto > provision". > > Yes, I can select edit on the host and then submit without error. When > done > > that way, the domain for the primary/provisioning interface is the > updated. > > However, tftp orchestration remains unconfigured so the host will reboot > > back into discovery. "Rebuild config" must be selected and executed in > > order for the host to boot into the actually OS provisioning kickstart. > > > > On Wednesday, April 5, 2017 at 5:47:33 AM UTC-5, Lukas Zapletal wrote: > >> > >> Is the host getting "converted" into ordinary host? if so can you edit > >> it and then submit save without changing any value, is there any > >> error? > >> > >> On Tue, Apr 4, 2017 at 8:48 PM, Chad Schroeder > >> wrote: > >> > Related: > >> > https://groups.google.com/forum/#!topic/foreman-users/4qBQC9Y-zmg > >> > > >> > > >> > On Tuesday, April 4, 2017 at 1:42:16 PM UTC-5, Chad Schroeder wrote: > >> >> > >> >> Foreman 1.14.3 > >> >> TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, > and > >> >> SSH > >> >> > >> >> I currently have Foreman setup for discovery with host groups and > >> >> discovery rules in place. I'm able to successfully auto-provision > >> >> bare-metal hosts with two network interfaces via PXEBoot. > >> >> > >> >> I am, however, having issue auto-provisioning a SuperMicro, > bare-metal > >> >> host with 4 network interfaces and an IPMI interface. > >> >> The host is "discovered" and if I select "Auto Provision" from the > >> >> drop-down, Foreman carries on using the appropriate host group based > on > >> >> the > >> >> correct discovery rules and reboots the host. > >> >> > >> >> However, the corresponding > tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx > >> >> file is never created and the host boots back into discovery. > >> >> The issue is that the "domain", of the primary/provisioning > interface, > >> >> is > >> >> never getting set automatically. If I manually provision the host > via > >> >> the > >> >> "Provision" drop-down, rather than "Auto Provision", > >> >> everything thereafter goes smoothly. > >> >> > >> >> Any insight into why the domain isn't getting set when the host is > >> >> discovered/auto-provisioned would be greatly appreciated! > >> >> > >> >> Thanks > >> >> Chad > >> > > >> > -- > >> > 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-user...@googlegroups.com. > >> > To post to this group, send email to forema...@googlegroups.com. > >> > Visit this group at https://groups.google.com/group/foreman-users. > >> > For more options, visit https://groups.google.com/d/optout. > >> > >> > >> > >> -- > >> Later, > >> Lukas @lzap Zapletal > > > > -- > Later, > Lukas @lzap Zapletal >

Lukas,

Yes, I see the discovery_subnet fact. It's set to the provision network,
i.e. "discovery_subnet Provisioning Network (192.168.1.0)"

There are four interfaces detected plus ipmi.

I've attached the facts.

x11ssh-ln4f.facts (8.66 KB)

··· On Thursday, April 6, 2017 at 9:57:52 AM UTC-5, Lukas Zapletal wrote: > > Chad, > > when you discover the host, do you see discovery_subnet fact? What's set? > > Also can you send hammer CLI output of the discovered host or > screenshot of UI? How interfaces were detected? > > I just installed stable version and trying to reproduce without any luck. > > LZ > > On Wed, Apr 5, 2017 at 2:17 PM, Chad Schroeder > <chads.finis...@gmail.com > wrote: > > Yes, it is converted into a regular host after selecting "Auto > provision". > > Yes, I can select edit on the host and then submit without error. When > done > > that way, the domain for the primary/provisioning interface is the > updated. > > However, tftp orchestration remains unconfigured so the host will reboot > > back into discovery. "Rebuild config" must be selected and executed in > > order for the host to boot into the actually OS provisioning kickstart. > > > > On Wednesday, April 5, 2017 at 5:47:33 AM UTC-5, Lukas Zapletal wrote: > >> > >> Is the host getting "converted" into ordinary host? if so can you edit > >> it and then submit save without changing any value, is there any > >> error? > >> > >> On Tue, Apr 4, 2017 at 8:48 PM, Chad Schroeder > >> wrote: > >> > Related: > >> > https://groups.google.com/forum/#!topic/foreman-users/4qBQC9Y-zmg > >> > > >> > > >> > On Tuesday, April 4, 2017 at 1:42:16 PM UTC-5, Chad Schroeder wrote: > >> >> > >> >> Foreman 1.14.3 > >> >> TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, > and > >> >> SSH > >> >> > >> >> I currently have Foreman setup for discovery with host groups and > >> >> discovery rules in place. I'm able to successfully auto-provision > >> >> bare-metal hosts with two network interfaces via PXEBoot. > >> >> > >> >> I am, however, having issue auto-provisioning a SuperMicro, > bare-metal > >> >> host with 4 network interfaces and an IPMI interface. > >> >> The host is "discovered" and if I select "Auto Provision" from the > >> >> drop-down, Foreman carries on using the appropriate host group based > on > >> >> the > >> >> correct discovery rules and reboots the host. > >> >> > >> >> However, the corresponding > tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx > >> >> file is never created and the host boots back into discovery. > >> >> The issue is that the "domain", of the primary/provisioning > interface, > >> >> is > >> >> never getting set automatically. If I manually provision the host > via > >> >> the > >> >> "Provision" drop-down, rather than "Auto Provision", > >> >> everything thereafter goes smoothly. > >> >> > >> >> Any insight into why the domain isn't getting set when the host is > >> >> discovered/auto-provisioned would be greatly appreciated! > >> >> > >> >> Thanks > >> >> Chad > >> > > >> > -- > >> > 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-user...@googlegroups.com. > >> > To post to this group, send email to forema...@googlegroups.com. > >> > Visit this group at https://groups.google.com/group/foreman-users. > >> > For more options, visit https://groups.google.com/d/optout. > >> > >> > >> > >> -- > >> Later, > >> Lukas @lzap Zapletal > > > > -- > Later, > Lukas @lzap Zapletal >

You describe two issues. First, Grub2 file is not deplyed. Verify that
PXEGrub2 template is associated with the hostgroup and doublecheck the
discovery rule which is triggering.

Second, missing domain - it is possible to provision system without
domain set, it should not block provisioning. Missing domain will only
cause that DNS orchestration will not trigger and hostname will not
get domain suffix, but it should work.

Now, I can try to reproduce but I'd need facter output from the FDI
image or I think you can get JSON output via hammer CLI for a
discovered host. Can you get me the facts in this format please?

LZ

··· On Thu, Apr 6, 2017 at 7:52 PM, Chad Schroeder wrote: > Lukas, > > Yes, I see the discovery_subnet fact. It's set to the provision network, > i.e. "discovery_subnet Provisioning Network (192.168.1.0)" > > There are four interfaces detected plus ipmi. > > I've attached the facts. > > On Thursday, April 6, 2017 at 9:57:52 AM UTC-5, Lukas Zapletal wrote: >> >> Chad, >> >> when you discover the host, do you see discovery_subnet fact? What's set? >> >> Also can you send hammer CLI output of the discovered host or >> screenshot of UI? How interfaces were detected? >> >> I just installed stable version and trying to reproduce without any luck. >> >> LZ >> >> On Wed, Apr 5, 2017 at 2:17 PM, Chad Schroeder >> wrote: >> > Yes, it is converted into a regular host after selecting "Auto >> > provision". >> > Yes, I can select edit on the host and then submit without error. When >> > done >> > that way, the domain for the primary/provisioning interface is the >> > updated. >> > However, tftp orchestration remains unconfigured so the host will reboot >> > back into discovery. "Rebuild config" must be selected and executed in >> > order for the host to boot into the actually OS provisioning kickstart. >> > >> > On Wednesday, April 5, 2017 at 5:47:33 AM UTC-5, Lukas Zapletal wrote: >> >> >> >> Is the host getting "converted" into ordinary host? if so can you edit >> >> it and then submit save without changing any value, is there any >> >> error? >> >> >> >> On Tue, Apr 4, 2017 at 8:48 PM, Chad Schroeder >> >> wrote: >> >> > Related: >> >> > https://groups.google.com/forum/#!topic/foreman-users/4qBQC9Y-zmg >> >> > >> >> > >> >> > On Tuesday, April 4, 2017 at 1:42:16 PM UTC-5, Chad Schroeder wrote: >> >> >> >> >> >> Foreman 1.14.3 >> >> >> TFTP, DNS, DHCP, Puppet, Puppet CA, BMC, Logs, Discovery, Dynflow, >> >> >> and >> >> >> SSH >> >> >> >> >> >> I currently have Foreman setup for discovery with host groups and >> >> >> discovery rules in place. I'm able to successfully auto-provision >> >> >> bare-metal hosts with two network interfaces via PXEBoot. >> >> >> >> >> >> I am, however, having issue auto-provisioning a SuperMicro, >> >> >> bare-metal >> >> >> host with 4 network interfaces and an IPMI interface. >> >> >> The host is "discovered" and if I select "Auto Provision" from the >> >> >> drop-down, Foreman carries on using the appropriate host group based >> >> >> on >> >> >> the >> >> >> correct discovery rules and reboots the host. >> >> >> >> >> >> However, the corresponding >> >> >> tftpboot/grub2/grub.cfg-xx-xx-xx-xx-xx-xx-xx >> >> >> file is never created and the host boots back into discovery. >> >> >> The issue is that the "domain", of the primary/provisioning >> >> >> interface, >> >> >> is >> >> >> never getting set automatically. If I manually provision the host >> >> >> via >> >> >> the >> >> >> "Provision" drop-down, rather than "Auto Provision", >> >> >> everything thereafter goes smoothly. >> >> >> >> >> >> Any insight into why the domain isn't getting set when the host is >> >> >> discovered/auto-provisioned would be greatly appreciated! >> >> >> >> >> >> Thanks >> >> >> Chad >> >> > >> >> > -- >> >> > 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-user...@googlegroups.com. >> >> > To post to this group, send email to forema...@googlegroups.com. >> >> > Visit this group at https://groups.google.com/group/foreman-users. >> >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> >> >> >> -- >> >> Later, >> >> Lukas @lzap Zapletal >> >> >> >> -- >> 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 https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,
Lukas @lzap Zapletal

Lukas,

Yes, the PXEGrbu2 template is associated with the hostgroup and the
discovery rule is triggered. This has been verified multiple times and
works on other servers.
Yes, the domain is missing. On servers that do auto-provision correctly,
this is always set. It is not set when trying to auto-provision the server
I described (4 nics + ipmi).

JSON-formatted facts attached.

C

x11ssh-ln4f.facts (17.4 KB)

Oh no this is not the output, this is not facter-compatible JSON, can
you get me output of facter from that host? I need verbose copy so I
can send it to my instance and discover the very same entry.

One idea - can you check organization and location of discovered host
and your hostgroup, rule and domain? Is it possible it gets discovered
into different organization with domain not belonging into?

LZ

··· On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder wrote: > Lukas, > > Yes, the PXEGrbu2 template is associated with the hostgroup and the > discovery rule is triggered. This has been verified multiple times and > works on other servers. > Yes, the domain is missing. On servers that do auto-provision correctly, > this is always set. It is not set when trying to auto-provision the server > I described (4 nics + ipmi). > > JSON-formatted facts attached. > > C


Later,
Lukas @lzap Zapletal

I guess I'm not sure on what you're asking for. Please describe how I can
extract the information you need.

Verified. I only have one organization and location. The domain,
hostgroup, and discovery rule are assigned to the org and location.
As I've mentioned, this setup works when auto-provisioning other bare-metal
hosts.

··· On Friday, April 7, 2017 at 7:33:12 AM UTC-5, Lukas Zapletal wrote: > > Oh no this is not the output, this is not facter-compatible JSON, can > you get me output of facter from that host? I need verbose copy so I > can send it to my instance and discover the very same entry. > > One idea - can you check organization and location of discovered host > and your hostgroup, rule and domain? Is it possible it gets discovered > into different organization with domain not belonging into? > > LZ > > On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder > <chads.finis...@gmail.com > wrote: > > Lukas, > > > > Yes, the PXEGrbu2 template is associated with the hostgroup and the > > discovery rule is triggered. This has been verified multiple times and > > works on other servers. > > Yes, the domain is missing. On servers that do auto-provision > correctly, > > this is always set. It is not set when trying to auto-provision the > server > > I described (4 nics + ipmi). > > > > JSON-formatted facts attached. > > > > C > > > > -- > Later, > Lukas @lzap Zapletal >

Lukas,

Attached: discovered host facts

facts.json (8.42 KB)

··· On Friday, April 7, 2017 at 7:45:37 AM UTC-5, Chad Schroeder wrote: > > I guess I'm not sure on what you're asking for. Please describe how I can > extract the information you need. > > Verified. I only have one organization and location. The domain, > hostgroup, and discovery rule are assigned to the org and location. > As I've mentioned, this setup works when auto-provisioning other > bare-metal hosts. > > On Friday, April 7, 2017 at 7:33:12 AM UTC-5, Lukas Zapletal wrote: >> >> Oh no this is not the output, this is not facter-compatible JSON, can >> you get me output of facter from that host? I need verbose copy so I >> can send it to my instance and discover the very same entry. >> >> One idea - can you check organization and location of discovered host >> and your hostgroup, rule and domain? Is it possible it gets discovered >> into different organization with domain not belonging into? >> >> LZ >> >> On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder >> wrote: >> > Lukas, >> > >> > Yes, the PXEGrbu2 template is associated with the hostgroup and the >> > discovery rule is triggered. This has been verified multiple times and >> > works on other servers. >> > Yes, the domain is missing. On servers that do auto-provision >> correctly, >> > this is always set. It is not set when trying to auto-provision the >> server >> > I described (4 nics + ipmi). >> > >> > JSON-formatted facts attached. >> > >> > C >> >> >> >> -- >> Later, >> Lukas @lzap Zapletal >> >

I can't reproduce, please enable SQL and DEBUG log levels:

http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging

Make sure you enable SQL logging endpoint so all SQL messages are
present, this is needed in order to catch the error. Restart foreman.

Then autoprovision with foreman-tail command running and pastebin the
output. I hope to get an error there.

LZ

··· On Fri, Apr 7, 2017 at 3:17 PM, Chad Schroeder wrote: > Lukas, > > Attached: discovered host facts > > On Friday, April 7, 2017 at 7:45:37 AM UTC-5, Chad Schroeder wrote: >> >> I guess I'm not sure on what you're asking for. Please describe how I can >> extract the information you need. >> >> Verified. I only have one organization and location. The domain, >> hostgroup, and discovery rule are assigned to the org and location. >> As I've mentioned, this setup works when auto-provisioning other >> bare-metal hosts. >> >> On Friday, April 7, 2017 at 7:33:12 AM UTC-5, Lukas Zapletal wrote: >>> >>> Oh no this is not the output, this is not facter-compatible JSON, can >>> you get me output of facter from that host? I need verbose copy so I >>> can send it to my instance and discover the very same entry. >>> >>> One idea - can you check organization and location of discovered host >>> and your hostgroup, rule and domain? Is it possible it gets discovered >>> into different organization with domain not belonging into? >>> >>> LZ >>> >>> On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder >>> wrote: >>> > Lukas, >>> > >>> > Yes, the PXEGrbu2 template is associated with the hostgroup and the >>> > discovery rule is triggered. This has been verified multiple times and >>> > works on other servers. >>> > Yes, the domain is missing. On servers that do auto-provision >>> > correctly, >>> > this is always set. It is not set when trying to auto-provision the >>> > server >>> > I described (4 nics + ipmi). >>> > >>> > JSON-formatted facts attached. >>> > >>> > C >>> >>> >>> >>> -- >>> Later, >>> Lukas @lzap Zapletal


Later,
Lukas @lzap Zapletal

Debug log attached

foreman-debug.txt (11 KB)

··· On Monday, April 10, 2017 at 2:31:43 AM UTC-5, Lukas Zapletal wrote: > > I can't reproduce, please enable SQL and DEBUG log levels: > > > http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging > > Make sure you enable SQL logging endpoint so all SQL messages are > present, this is needed in order to catch the error. Restart foreman. > > Then autoprovision with foreman-tail command running and pastebin the > output. I hope to get an error there. > > LZ > > On Fri, Apr 7, 2017 at 3:17 PM, Chad Schroeder > <chads.finis...@gmail.com > wrote: > > Lukas, > > > > Attached: discovered host facts > > > > On Friday, April 7, 2017 at 7:45:37 AM UTC-5, Chad Schroeder wrote: > >> > >> I guess I'm not sure on what you're asking for. Please describe how I > can > >> extract the information you need. > >> > >> Verified. I only have one organization and location. The domain, > >> hostgroup, and discovery rule are assigned to the org and location. > >> As I've mentioned, this setup works when auto-provisioning other > >> bare-metal hosts. > >> > >> On Friday, April 7, 2017 at 7:33:12 AM UTC-5, Lukas Zapletal wrote: > >>> > >>> Oh no this is not the output, this is not facter-compatible JSON, can > >>> you get me output of facter from that host? I need verbose copy so I > >>> can send it to my instance and discover the very same entry. > >>> > >>> One idea - can you check organization and location of discovered host > >>> and your hostgroup, rule and domain? Is it possible it gets discovered > >>> into different organization with domain not belonging into? > >>> > >>> LZ > >>> > >>> On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder > >>> wrote: > >>> > Lukas, > >>> > > >>> > Yes, the PXEGrbu2 template is associated with the hostgroup and the > >>> > discovery rule is triggered. This has been verified multiple times > and > >>> > works on other servers. > >>> > Yes, the domain is missing. On servers that do auto-provision > >>> > correctly, > >>> > this is always set. It is not set when trying to auto-provision the > >>> > server > >>> > I described (4 nics + ipmi). > >>> > > >>> > JSON-formatted facts attached. > >>> > > >>> > C > >>> > >>> > >>> > >>> -- > >>> Later, > >>> Lukas @lzap Zapletal > > > > -- > Later, > Lukas @lzap Zapletal >

TFTP orchestration is not being triggered. It can be only performed
when all of these conditions are met:

  • host is managed
  • provision method is "build" and not "image"
  • host has operating system set
  • host has pxe loader flag present (not set to blank or None)
  • host has one provisioning NIC with valid MAC address
  • a subnet is associated with the provisioning NIC
  • the subnet has TFTP feature turned on

Visit a host which failed provisioning and do this checklist please.

LZ

··· On Mon, Apr 10, 2017 at 2:33 PM, Chad Schroeder wrote: > Debug log attached > > On Monday, April 10, 2017 at 2:31:43 AM UTC-5, Lukas Zapletal wrote: >> >> I can't reproduce, please enable SQL and DEBUG log levels: >> >> >> http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging >> >> Make sure you enable SQL logging endpoint so all SQL messages are >> present, this is needed in order to catch the error. Restart foreman. >> >> Then autoprovision with foreman-tail command running and pastebin the >> output. I hope to get an error there. >> >> LZ >> >> On Fri, Apr 7, 2017 at 3:17 PM, Chad Schroeder >> wrote: >> > Lukas, >> > >> > Attached: discovered host facts >> > >> > On Friday, April 7, 2017 at 7:45:37 AM UTC-5, Chad Schroeder wrote: >> >> >> >> I guess I'm not sure on what you're asking for. Please describe how I >> >> can >> >> extract the information you need. >> >> >> >> Verified. I only have one organization and location. The domain, >> >> hostgroup, and discovery rule are assigned to the org and location. >> >> As I've mentioned, this setup works when auto-provisioning other >> >> bare-metal hosts. >> >> >> >> On Friday, April 7, 2017 at 7:33:12 AM UTC-5, Lukas Zapletal wrote: >> >>> >> >>> Oh no this is not the output, this is not facter-compatible JSON, can >> >>> you get me output of facter from that host? I need verbose copy so I >> >>> can send it to my instance and discover the very same entry. >> >>> >> >>> One idea - can you check organization and location of discovered host >> >>> and your hostgroup, rule and domain? Is it possible it gets discovered >> >>> into different organization with domain not belonging into? >> >>> >> >>> LZ >> >>> >> >>> On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder >> >>> wrote: >> >>> > Lukas, >> >>> > >> >>> > Yes, the PXEGrbu2 template is associated with the hostgroup and the >> >>> > discovery rule is triggered. This has been verified multiple times >> >>> > and >> >>> > works on other servers. >> >>> > Yes, the domain is missing. On servers that do auto-provision >> >>> > correctly, >> >>> > this is always set. It is not set when trying to auto-provision the >> >>> > server >> >>> > I described (4 nics + ipmi). >> >>> > >> >>> > JSON-formatted facts attached. >> >>> > >> >>> > C >> >>> >> >>> >> >>> >> >>> -- >> >>> Later, >> >>> Lukas @lzap Zapletal >> >> >> >> -- >> Later, >> Lukas @lzap Zapletal


Later,
Lukas @lzap Zapletal

I experience this issue.
After clicking 'auto-provisioning' on a discovered host, the host entry is
created, the host reboots - but only to enter Foreman Discovery Image PXE
loop.
My TFTP proxy is in healthy status as I can recreate PXE default no prob.

Now answering your checklist:

  • host is managed - yes - OK
  • provision method is "build" and not "image" - how to check this? I can't
    see the 'build mode' checkbox for the newly created host
  • host has operating system set - yes (inherited from host group) - OK
  • host has pxe loader flag present (not set to blank or None) - how to
    check this?
  • host has one provisioning NIC with valid MAC address - yes it does - OK
  • a subnet is associated with the provisioning NIC - it is, but it's a
    subnet different than the one declared in machine's host group
  • the subnet has TFTP feature turned on - it does, and it's the same TFTP
    proxy as in the subnet that I wanted

Also, the 'domain' is blank for the fresh created host.
The OS assigned to this host group has a valid PXElinux template selected.

Assume I'm not making any manual changes:

  • 'Build host' does nothing
  • 'Rebuild config' creates a PXE mac-template on TFTP immediatly

facter -j output attached

Thanks / Regards / Greetings

W dniu wtorek, 11 kwietnia 2017 10:28:17 UTC+2 użytkownik Lukas Zapletal
napisał:

facter.json (11.2 KB)

··· > > TFTP orchestration is not being triggered. It can be only performed > when all of these conditions are met: > > - host is managed > - provision method is "build" and not "image" > - host has operating system set > - host has pxe loader flag present (not set to blank or None) > - host has one provisioning NIC with valid MAC address > - a subnet is associated with the provisioning NIC > - the subnet has TFTP feature turned on > > Visit a host which failed provisioning and do this checklist please. > > LZ > > >

Chad, any updates?

LZ

··· On Tue, Apr 11, 2017 at 10:27 AM, Lukas Zapletal wrote: > TFTP orchestration is not being triggered. It can be only performed > when all of these conditions are met: > > - host is managed > - provision method is "build" and not "image" > - host has operating system set > - host has pxe loader flag present (not set to blank or None) > - host has one provisioning NIC with valid MAC address > - a subnet is associated with the provisioning NIC > - the subnet has TFTP feature turned on > > Visit a host which failed provisioning and do this checklist please. > > LZ > > > On Mon, Apr 10, 2017 at 2:33 PM, Chad Schroeder > wrote: >> Debug log attached >> >> On Monday, April 10, 2017 at 2:31:43 AM UTC-5, Lukas Zapletal wrote: >>> >>> I can't reproduce, please enable SQL and DEBUG log levels: >>> >>> >>> http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging >>> >>> Make sure you enable SQL logging endpoint so all SQL messages are >>> present, this is needed in order to catch the error. Restart foreman. >>> >>> Then autoprovision with foreman-tail command running and pastebin the >>> output. I hope to get an error there. >>> >>> LZ >>> >>> On Fri, Apr 7, 2017 at 3:17 PM, Chad Schroeder >>> wrote: >>> > Lukas, >>> > >>> > Attached: discovered host facts >>> > >>> > On Friday, April 7, 2017 at 7:45:37 AM UTC-5, Chad Schroeder wrote: >>> >> >>> >> I guess I'm not sure on what you're asking for. Please describe how I >>> >> can >>> >> extract the information you need. >>> >> >>> >> Verified. I only have one organization and location. The domain, >>> >> hostgroup, and discovery rule are assigned to the org and location. >>> >> As I've mentioned, this setup works when auto-provisioning other >>> >> bare-metal hosts. >>> >> >>> >> On Friday, April 7, 2017 at 7:33:12 AM UTC-5, Lukas Zapletal wrote: >>> >>> >>> >>> Oh no this is not the output, this is not facter-compatible JSON, can >>> >>> you get me output of facter from that host? I need verbose copy so I >>> >>> can send it to my instance and discover the very same entry. >>> >>> >>> >>> One idea - can you check organization and location of discovered host >>> >>> and your hostgroup, rule and domain? Is it possible it gets discovered >>> >>> into different organization with domain not belonging into? >>> >>> >>> >>> LZ >>> >>> >>> >>> On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder >>> >>> wrote: >>> >>> > Lukas, >>> >>> > >>> >>> > Yes, the PXEGrbu2 template is associated with the hostgroup and the >>> >>> > discovery rule is triggered. This has been verified multiple times >>> >>> > and >>> >>> > works on other servers. >>> >>> > Yes, the domain is missing. On servers that do auto-provision >>> >>> > correctly, >>> >>> > this is always set. It is not set when trying to auto-provision the >>> >>> > server >>> >>> > I described (4 nics + ipmi). >>> >>> > >>> >>> > JSON-formatted facts attached. >>> >>> > >>> >>> > C >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> Later, >>> >>> Lukas @lzap Zapletal >>> >>> >>> >>> -- >>> Later, >>> Lukas @lzap Zapletal > > > > -- > Later, > Lukas @lzap Zapletal


Later,
Lukas @lzap Zapletal

Lukas,

As I've mentioned, auto-provisioning works on other servers. So I took a
step back and started testing on a server with two interfaces and no IPMI.
What I've discovered is that dependent on the server's interface used for
provisioning, auto-provisioning will fail or succeed.

Thoughts?

··· On Thursday, April 13, 2017 at 8:09:23 AM UTC-5, Lukas Zapletal wrote: > > Chad, any updates? > > LZ > > On Tue, Apr 11, 2017 at 10:27 AM, Lukas Zapletal > wrote: > > TFTP orchestration is not being triggered. It can be only performed > > when all of these conditions are met: > > > > - host is managed > > - provision method is "build" and not "image" > > - host has operating system set > > - host has pxe loader flag present (not set to blank or None) > > - host has one provisioning NIC with valid MAC address > > - a subnet is associated with the provisioning NIC > > - the subnet has TFTP feature turned on > > > > Visit a host which failed provisioning and do this checklist please. > > > > LZ > > > > > > On Mon, Apr 10, 2017 at 2:33 PM, Chad Schroeder > > <chads.finis...@gmail.com > wrote: > >> Debug log attached > >> > >> On Monday, April 10, 2017 at 2:31:43 AM UTC-5, Lukas Zapletal wrote: > >>> > >>> I can't reproduce, please enable SQL and DEBUG log levels: > >>> > >>> > >>> > http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging > >>> > >>> Make sure you enable SQL logging endpoint so all SQL messages are > >>> present, this is needed in order to catch the error. Restart foreman. > >>> > >>> Then autoprovision with foreman-tail command running and pastebin the > >>> output. I hope to get an error there. > >>> > >>> LZ > >>> > >>> On Fri, Apr 7, 2017 at 3:17 PM, Chad Schroeder > >>> wrote: > >>> > Lukas, > >>> > > >>> > Attached: discovered host facts > >>> > > >>> > On Friday, April 7, 2017 at 7:45:37 AM UTC-5, Chad Schroeder wrote: > >>> >> > >>> >> I guess I'm not sure on what you're asking for. Please describe > how I > >>> >> can > >>> >> extract the information you need. > >>> >> > >>> >> Verified. I only have one organization and location. The domain, > >>> >> hostgroup, and discovery rule are assigned to the org and location. > >>> >> As I've mentioned, this setup works when auto-provisioning other > >>> >> bare-metal hosts. > >>> >> > >>> >> On Friday, April 7, 2017 at 7:33:12 AM UTC-5, Lukas Zapletal wrote: > >>> >>> > >>> >>> Oh no this is not the output, this is not facter-compatible JSON, > can > >>> >>> you get me output of facter from that host? I need verbose copy so > I > >>> >>> can send it to my instance and discover the very same entry. > >>> >>> > >>> >>> One idea - can you check organization and location of discovered > host > >>> >>> and your hostgroup, rule and domain? Is it possible it gets > discovered > >>> >>> into different organization with domain not belonging into? > >>> >>> > >>> >>> LZ > >>> >>> > >>> >>> On Fri, Apr 7, 2017 at 2:22 PM, Chad Schroeder > >>> >>> wrote: > >>> >>> > Lukas, > >>> >>> > > >>> >>> > Yes, the PXEGrbu2 template is associated with the hostgroup and > the > >>> >>> > discovery rule is triggered. This has been verified multiple > times > >>> >>> > and > >>> >>> > works on other servers. > >>> >>> > Yes, the domain is missing. On servers that do auto-provision > >>> >>> > correctly, > >>> >>> > this is always set. It is not set when trying to auto-provision > the > >>> >>> > server > >>> >>> > I described (4 nics + ipmi). > >>> >>> > > >>> >>> > JSON-formatted facts attached. > >>> >>> > > >>> >>> > C > >>> >>> > >>> >>> > >>> >>> > >>> >>> -- > >>> >>> Later, > >>> >>> Lukas @lzap Zapletal > >>> > >>> > >>> > >>> -- > >>> Later, > >>> Lukas @lzap Zapletal > > > > > > > > -- > > Later, > > Lukas @lzap Zapletal > > > > -- > Later, > Lukas @lzap Zapletal >

Updated checklist:

  • host is managed - yes - OK
  • provision method is "build" and not "image" - I can't see the 'build
    mode' checkbox for the newly created host
  • host has operating system set - yes (inherited from host group) - OK
  • host has pxe loader flag present (not set to blank or None) - yes - OK
  • host has one provisioning NIC with valid MAC address - yes - OK
  • a subnet is associated with the provisioning NIC - it is - OK
  • the subnet has TFTP feature turned on - it does - OK

Other issues with auto-provision:

  • hostname doesn't match discovery rule pattern (correct pattern being
    visible on host list, but then I click edit and see 'macXXXXXX')
  • discovery interface DNS name doesn't match discovery rule pattern
    (correct pattern being visible on host list, but then I click
    edit->interfaces->edit and see 'macXXXXXX')
  • no domain assigned to discovery interface, despite domain attached to
    discovery subnet

I have tried to use subnet without domain assigned (no effect).
PXE file for auto-provisioned host does NOT get created, no matter what I
do…
In this state, whole 'auto-provision' brings no value to the table :frowning:

W dniu czwartek, 13 kwietnia 2017 16:36:52 UTC+2 użytkownik Garreat napisał:

··· > > I experience this issue. > After clicking 'auto-provisioning' on a discovered host, the host entry is > created, the host reboots - but only to enter Foreman Discovery Image PXE > loop. > My TFTP proxy is in healthy status as I can recreate PXE default no prob. > > Now answering your checklist: > - host is managed *- yes - OK* > - provision method is "build" and not "image" *- how to check this? I > can't see the 'build mode' checkbox for the newly created host* > - host has operating system set - yes (inherited from host group) *- OK* > - host has pxe loader flag present (not set to blank or None) *- how to > check this?* > - host has one provisioning NIC with valid MAC address *- yes it does - > OK* > - a subnet is associated with the provisioning NIC *- it is, but it's a > subnet different than the one declared in machine's host group* > - the subnet has TFTP feature turned on *- it does, and it's the same > TFTP proxy as in the subnet that I wanted* > > Also, the 'domain' is blank for the fresh created host. > The OS assigned to this host group has a valid PXElinux template selected. > > Assume I'm not making any manual changes: > - 'Build host' does nothing > - 'Rebuild config' creates a PXE mac-template on TFTP immediatly > > facter -j output attached > > Thanks / Regards / Greetings > > W dniu wtorek, 11 kwietnia 2017 10:28:17 UTC+2 użytkownik Lukas Zapletal > napisał: >> >> TFTP orchestration is not being triggered. It can be only performed >> when all of these conditions are met: >> >> - host is managed >> - provision method is "build" and not "image" >> - host has operating system set >> - host has pxe loader flag present (not set to blank or None) >> - host has one provisioning NIC with valid MAC address >> - a subnet is associated with the provisioning NIC >> - the subnet has TFTP feature turned on >> >> Visit a host which failed provisioning and do this checklist please. >> >> LZ >> >> >>

Ok I finally reproduced.

When domain is blank, autoprovisioning fails for no apparent reason,
logs are empty, something fails during orchestration and hosts are
getting discovered again (which fails since managed host already
exists).

http://projects.theforeman.org/issues/19313

I will do my best to fix it this week, but I am on travel the week
after, crossing my fingers.

LZ

··· On Thu, Apr 13, 2017 at 4:28 PM, Garreat wrote: > I experience this issue. > After clicking 'auto-provisioning' on a discovered host, the host entry is > created, the host reboots - but only to enter Foreman Discovery Image PXE > loop. > My TFTP proxy is in healthy status as I can recreate PXE default no prob. > > Now answering your checklist: > - host is managed - yes - OK > - provision method is "build" and not "image" - how to check this? I can't > see the 'build mode' checkbox for the newly created host > - host has operating system set - yes (inherited from host group) - OK > - host has pxe loader flag present (not set to blank or None) - how to check > this? > - host has one provisioning NIC with valid MAC address - yes it does - OK > - a subnet is associated with the provisioning NIC - it is, but it's a > subnet different than the one declared in machine's host group > - the subnet has TFTP feature turned on - it does, and it's the same TFTP > proxy as in the subnet that I wanted > > Also, the 'domain' is blank for the fresh created host. > The OS assigned to this host group has a valid PXElinux template selected. > > Assume I'm not making any manual changes: > - 'Build host' does nothing > - 'Rebuild config' creates a PXE mac-template on TFTP immediatly > > facter -j output attached > > Thanks / Regards / Greetings > > W dniu wtorek, 11 kwietnia 2017 10:28:17 UTC+2 użytkownik Lukas Zapletal > napisał: >> >> TFTP orchestration is not being triggered. It can be only performed >> when all of these conditions are met: >> >> - host is managed >> - provision method is "build" and not "image" >> - host has operating system set >> - host has pxe loader flag present (not set to blank or None) >> - host has one provisioning NIC with valid MAC address >> - a subnet is associated with the provisioning NIC >> - the subnet has TFTP feature turned on >> >> Visit a host which failed provisioning and do this checklist please. >> >> LZ >> >> >


Later,
Lukas @lzap Zapletal