These changes ensure that a standalone node is in the correct state
for reconfiguration (for DC enrollment) after a successful factory-install.
This is achieved by ensuring:
- Factory install services are cleaned up.
- Cloud-init services remain enabled and active.
To facilitate enrollment initialization, two new scripts
are being introduced in the platform-util package:
1. enroll-init-cleanup: Removes the cloud-init preset set by factory-install
and sets service disabled flag.
2. enroll-init-reconfigure: A newly introduced script that allows OAM
and password reconfiguration, ensuring:
- The password change is done after system services are active.
- OAM reconfiguration is done via system commands.
This is required as outlined in
https://review.opendev.org/c/starlingx/distcloud/+/921719
These scripts must be independent of the factory-install services
and available on the platform for DCManager operations. Hence, they
are not part of factory-install services but are included
in the platform-util package.
Additionally, a minor restructuring of factory-install services is done as part of these changes:
- Moved the host config folder to the parent folder.
This is more appropriate as the top-level folder already holds
the cloud-init configurable files. The factory-install folder
is meant for the static service files.
- Introduced a utils folder/scripts for the factory-install services.
Test plan:
- PASS: Validate factory-install services:
- config files copied correctly to home dir
- factory install utils copied to
/var/lib/factory-install dir
- cloud-init preset after successful install
- factory install services cleaned up
- PASS: Validate full factory install
- PASS: Build iso and install load to ensure
platform-util package is installed
with enroll-init-cleanup and enroll-init-reconfigure
scripts in /usr/local/bin
- PASS: Validate enroll-init-cleanup and enroll-init-reconfigure scripts:
- Password persisted and OAM reconfiguration verified with
system oam-show + endpoints updated
- cloud-init services disabled (not restarted on reboot)
Story: 2011100
Task: 50164
Change-Id: I9a99c53c6fe6590716ad3d5d59663c8e6c475db5
Signed-off-by: Salman Rana <salman.rana@windriver.com>