Due to a limitation in config uuid functionality, on first unlock
of controller-0, node remains in config-out-of-date as we loose
the reboot flag.
Example output after unlock:
$ system host-show controller-0 | grep config
| config_applied | 62228cc1-e5da-4f2e-a3c3-c468e9a46fb5 |
| config_status | Config out-of-date |
| config_target | e2228cc1-e5da-4f2e-a3c3-c468e9a46fb5 |
The reboot flag is:
CONFIG_REBOOT_REQUIRED = (1 << 127)
We set config_target through sysinv and config_applied
through puppet once manifests have applied. If there the reboot
flag in config_target is set but not in config_applied we are
"Config-out-of-date".
On host-unlock or runtime manifest apply we set config_uuid in
hieradata to e.g.:
platform::config::params::config_uuid: \ 62228cc1-e5da-4f2e-a3c3-c468e9a46fb5
Then, after runtime manifest apply or after reboot, sysinv-agent
takes this value and updates config_applied.
A config uuid with the reboot flag is passed to puppet ONLY when
host is unlocked (which makes sense as this is when we do the
reboot). Runtime manifests don't pass the reboot flag to puppet
(it is a runtime, reboot flag has to remain).
So, in our case, at unlock it is correctly set but then sysinv
does a runtime manifest apply and resets it to a value w/o
the reboot flag. Therefore, the reboot flag is no longer set,
that's why even after unlock we still have Config-out-of-date.
To fix the issue we generate a new config_uuid with the reboot
flag set and we properly send it to puppet as the last operation
we attempt before reboot.
Reviewed: https:/ /review. opendev. org/658391 /git.openstack. org/cgit/ starlingx/ config/ commit/ ?id=9720932899b 69287871a419422 880f04d618286f
Committed: https:/
Submitter: Zuul
Branch: master
commit 9720932899b6928 7871a419422880f 04d618286f
Author: Ovidiu Poncea <email address hidden>
Date: Fri May 10 17:46:27 2019 +0300
Fix missing reboot flag for config uuid on unlock
Due to a limitation in config uuid functionality, on first unlock
of controller-0, node remains in config-out-of-date as we loose
the reboot flag.
Example output after unlock: e5da-4f2e- a3c3-c468e9a46f b5 | e5da-4f2e- a3c3-c468e9a46f b5 |
$ system host-show controller-0 | grep config
| config_applied | 62228cc1-
| config_status | Config out-of-date |
| config_target | e2228cc1-
The reboot flag is: REBOOT_ REQUIRED = (1 << 127)
CONFIG_
We set config_target through sysinv and config_applied out-of- date".
through puppet once manifests have applied. If there the reboot
flag in config_target is set but not in config_applied we are
"Config-
On host-unlock or runtime manifest apply we set config_uuid in :config: :params: :config_ uuid: \
62228cc1- e5da-4f2e- a3c3-c468e9a46f b5
hieradata to e.g.:
platform:
Then, after runtime manifest apply or after reboot, sysinv-agent
takes this value and updates config_applied.
A config uuid with the reboot flag is passed to puppet ONLY when
host is unlocked (which makes sense as this is when we do the
reboot). Runtime manifests don't pass the reboot flag to puppet
(it is a runtime, reboot flag has to remain).
So, in our case, at unlock it is correctly set but then sysinv
does a runtime manifest apply and resets it to a value w/o
the reboot flag. Therefore, the reboot flag is no longer set,
that's why even after unlock we still have Config-out-of-date.
To fix the issue we generate a new config_uuid with the reboot
flag set and we properly send it to puppet as the last operation
we attempt before reboot.
Change-Id: I12865d45f4456d e81d72689f79944 1531a444bea
Closes-Bug: #1828271
Closes-Bug: #1829004
Closes-Bug: #1829260
Signed-off-by: Ovidiu Poncea <email address hidden>