Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootloop #31

Closed
0003088 opened this issue Jun 2, 2016 · 8 comments
Closed

Bootloop #31

0003088 opened this issue Jun 2, 2016 · 8 comments

Comments

@0003088
Copy link

0003088 commented Jun 2, 2016

At first I would like to thank you for the work you have invested in this project.

I'm testing wimaging to deploy win7 ATM and wimaging_script_winpe_setup is finishing without errors but then a reboot occurs and, since we did not notify foreman that we have successfully installed the os, the machine is retrieving the images once again, resulting in a bootloop. So I moved the notify foreman part from the finishing scipt to the setup script, but then the finish script cannot run without error since its not allowed to download the provision script (error 405).Such a severe flaw cannot have been overlooked by you so I am wondering if I misconfigured anything?

Again thank you for your help..

@AutomationD
Copy link
Owner

AutomationD commented Jun 2, 2016

@0003088 hey, so in my case machine has HDD boot by default, so it boots into windows after it has an OS on it. If there is no OS PXEboot is attempted.

Probably not the best way, considering how default PXE template works now with foreman.

Please try it and let me know.

@0003088
Copy link
Author

0003088 commented Jun 3, 2016

Thank you for your answer!

Hmm, ok, thats a solution I would like to avoid since it would mean that I have to walk to each and every machine which needs a setup and with ~80-100 computers that's no fun. But I found a way: I moved the 'Tell foreman build has finished' part from finish template to setup template and changed wget.exe <%= foreman_url('provision') %> to wget.exe <%= foreman_url('provision') %>?spoof=<%= @host.ip %> in the finish template and now it's working fine (I do not know foreman well enough to assess if this change introduces any risks or bugs?).

@helge000
Copy link
Collaborator

helge000 commented Dec 6, 2016

Could you solve the issue?
Basically the 'tell foreman' part should be at the end of of the process. However, you can put it anywhere.

@0003088
Copy link
Author

0003088 commented Dec 7, 2016

Yes it's kind of solved. The only problem is that foreman_url('provision') is not working anymore after a host tells puppet its built, so the finish script does not run through because the :ntp_testip part is failing. I "solved" the problem by removing that part alltogether, which certainly is not very elegant but I didn't have any issues until this day.

@helge000
Copy link
Collaborator

helge000 commented Dec 9, 2016

This part fails when there is no puppet master set (the host is @host.puppetmaster).

Do you not use Puppet? However, I sometimes also had this problem as for some reason Puppet Master is not set correctly during host creation in Foreman; it seems like an issue relating to host group inheritance.

  • You could change the :testip part by setting a static hostname witch is reachable and acts a test to see whenever full tcp/ip stack is up. This test is quite important as time sync will fail and witch in turn might prevent domain join
  • We could also use something different; but I think @host.puppetmaster is a good choice (implying you use puppet at all)

@0003088
Copy link
Author

0003088 commented Dec 12, 2016

Oh, I'm using puppet alright.

Puppet Master is not set correctly during host creation in Foreman

I'm not quite sure that this is correct. AFAIK the urls, like foreman_url('provision'), lose their validity from the moment the host tells foreman that its built (which makes perfect sense but is inappropriate in this case here)

@helge000
Copy link
Collaborator

:testIP and provision URLs are a different context:
The network test only works when Puppet Master is set. However, it fails if you not use Puppet and there is no Puppet Master.

In more resent foreman versions, we could use @foreman_server_fqdn (foreman 1.12+). Using Puppet Master was more a laziness on my part, as one could use any provision URL to check/ping foreman (yet another URL regex, doh!).
This makes more sense and I will add it to the templates.

@helge000
Copy link
Collaborator

Closing because of inactivity - please reopen if you need more assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants