ironic/ironic
Pavlo Shchelokovskyy 35cfc4a147 Fix take over for ACTIVE nodes in PXEBoot
when taking over an ACTIVE netboot-ed node with driver based on PXEBoot,
the `PXEBoot.prepare_instance` method fails as our current logic of
generating a 'service' mode PXE config relies on editing PXE env files
that must already exist on disk but are missing from the new conductor host
in this case.

This patch forces this method to first re-create the PXE env from scratch
for ACTIVE nodes when PXE config file is missing before attempting
to change it.
It does not try to re-download the deploy ramdisk and generate options for it
though.
It also does not try to re-set boot device for ACTIVE nodes as that
should have already have been set earlier before actual transition to
ACTIVE.

In order to make the logic cleaner, this patch also refactors private methods
for building pxe options to be deploy-vs-instance oriented instead of
pxe-vs-ipxe oriented.

Change-Id: I264d5477523f57552aadf2809021a9a63fee2730
Partial-Bug: #1646038
Closes-Bug: #1516816
(cherry picked from commit 035ad6a60b)
2017-01-25 11:00:45 +00:00
..
api Remove service argument from tempest plugin client manager 2017-01-18 15:26:54 +00:00
cmd Separate WSGIService from RPCService 2016-09-15 11:14:20 -04:00
common Trivial: fix warning message formatting 2017-01-16 16:09:54 +00:00
conductor Refresh fsm in task when a shared lock is upgraded 2016-09-01 14:10:12 +00:00
conf Merge "Grub2 by default for PXE + UEFI" 2016-09-20 11:20:22 +00:00
db Add standalone_ports_supported to portgroup - DB 2016-08-31 11:30:46 +03:00
dhcp Merge imports in code 2016-08-24 01:34:03 +00:00
drivers Fix take over for ACTIVE nodes in PXEBoot 2017-01-25 11:00:45 +00:00
locale Imported Translations from Zanata 2016-06-11 07:09:11 +00:00
nova Deprecate ClusteredComputeManager 2016-08-10 07:33:49 -04:00
objects Merge "Remove NotificationEventTypeError as not needed" 2016-09-19 11:57:50 +00:00
tests Fix take over for ACTIVE nodes in PXEBoot 2017-01-25 11:00:45 +00:00
__init__.py Move eventlent monkeypatch out of cmd/ 2014-02-08 00:11:56 -08:00
version.py Correct version.py and update current version string 2014-03-21 13:50:05 -07:00