Bin Qian
08f7066bab
Adjust partition sysinv data from template
Use partition template to adjust partition setting for new upgraded nodes. During upgrade, default partitions which are created on root disk can be changed from release to release. As there could be additional user partition on root disk follow the default partition, the user partitions need to be recreated in new locations. The adjustment happens on controller and compute nodes only. For controller nodes, the new default partition template is captured automatically at runtime from controller-1 after N+1 installed. For compute nodes and storage nodes, the template is composed in code, and changes are needed if the default partition layout changes. This change abstracts the default partition on the new load and applies needed shift of user partitions on root disk, to recreate new partition layout on sysinv database for the nodes with same personality. This change works in the following conditions: 1. default partitions are created (by kickstart) on root disk only 2. default partitions are identical for all nodes with the same personality This change also marks the PVs and LVGs that associated with a user partitions to be recreated on unlock. With this partition migration change, a new sysinv invprovision state (upgrading) is introduced for the host upgrade period. The "upgrading" starts when a host upgrade starts, and changes to "provisioned" after the first successuful host unlock. During this period, partition, PV and LVG inventory reports are ignored to prevent overwriting the migrated setting in sysinv db. Test plan: complete upgrade AIO-DX with the following configurations: 1. addition cgts-vg on rootdisk 2. nova-local on separated disk complete upgrade Standard DX with the compute nodes in below config: 1. multiple disks configured as nova-local pv 2. 1 cgts-vg and 1 nova-local pv on root disk, combine with separated disk as nova-local pv 3. 2 cgts-vg and 1 nova-local pv on root disk, combine with separated disk as nova-local pv 4. 1 cgts-vg pv on rootdisk and separated disk as nova-local pv complete 22.12 installation and observe invprovision state transitions form unprovisioned to provisioning to provisioned. Observed host's invprovision state changed to "upgrading" after host-upgrade command successfully issued. The state changed to "provisioned" after the first host-unlock completed successfully. Story: 2009303 Task: 46728 Signed-off-by: Bin Qian <bin.qian@windriver.com> Change-Id: Ib46d54663def09f74fe6e771251e8c87a0374fcb Signed-off-by: Bin Qian <bin.qian@windriver.com>
stx-config
StarlingX Configuration Management
Description
Languages
Python
97.2%
Shell
2.4%
CSS
0.2%