Merge "Update prestaging support for N-1 subcloud"

This commit is contained in:
Zuul 2025-01-23 15:44:16 +00:00 committed by Gerrit Code Review
commit 3c6fa9262c

View File

@ -1,6 +1,6 @@
---
#
# Copyright (c) 2023-2024 Wind River Systems, Inc.
# Copyright (c) 2023-2025 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -61,24 +61,19 @@
set_fact:
usm_enabled_on_subcloud: "{{ software_bin_result.stat.exists }}"
# The subcloud_is_previous_release flag determines whether the subcloud release
# corresponds to an N-1 release.
- name: Set flag to indicate if subcloud prestage is for N-1 scenario
set_fact:
subcloud_is_previous_release: "{{ 'true' if (prestage_source == 'remote' and
host_software_version is version('22.12', '='))
else 'false' }}"
# The force_ostree_dir_sync flag determines whether the entire N release ostree
# directory should be copied to the subcloud or not. This flag is only relevant
# if the subcloud is running N-1 release.
# The condition for it to be true must meet:
# - The release of the subcloud must be an N-1 release (subcloud_is_previous_release)
# - The prestage source must be 'remote' to determine that the subcloud has
# a different release than the System ontroller.
# - The N release ostree directory does not already exist on the N-1 subcloud.
# - The subcloud sw version must be lower than the sw version to be prestaged.
- name: Set flag to indicate if the ostree directory should be copied to the subcloud
set_fact:
force_ostree_dir_sync: "{{ 'true' if (subcloud_is_previous_release and
not host_ostree_dir_exist) else 'false' }}"
force_ostree_dir_sync: "{{ 'true' if (prestage_source == 'remote' and
not host_ostree_dir_exist and
host_software_version < software_version) else 'false' }}"
- debug:
msg: |
@ -86,7 +81,6 @@
Prestaging reason: {{ prestage_reason }}
Prestaging source: {{ prestage_source }}
Prestaging os type: {{ prestage_os_type }}
Prestaging for N-1 subcloud: {{ subcloud_is_previous_release }}
Force ostree dir sync for N-1 subcloud: {{ force_ostree_dir_sync }}
USM enabled on subcloud: {{ usm_enabled_on_subcloud }}
Release feed directory (on target): {{ release_feed|default('N/A') }}