Merge "Exclude patching ops from major release deploy"

This commit is contained in:
Zuul 2024-10-10 17:15:45 +00:00 committed by Gerrit Code Review
commit d180e97d98

View File

@ -3752,6 +3752,7 @@ class PatchController(PatchService):
if not self.hosts[ip].is_alive:
raise HostAgentUnreachable(hostname)
is_major_release = self.check_upgrade_in_progress()
deploy_host = self.db_api_instance.get_deploy_host_by_hostname(hostname)
if deploy_host is None:
raise HostNotFound(hostname)
@ -3760,7 +3761,7 @@ class PatchController(PatchService):
if not self.install_local:
deploy_host_validations(
hostname,
is_major_release=self.check_upgrade_in_progress(),
is_major_release=is_major_release,
rollback=rollback
)
deploy_state = DeployState.get_instance()
@ -3780,7 +3781,7 @@ class PatchController(PatchService):
LOG.info(msg)
audit_log_info(msg)
if self.allow_insvc_patching:
if not is_major_release and self.allow_insvc_patching:
LOG.info("Allowing in-service patching")
force = True
self.copy_install_scripts()
@ -3788,7 +3789,7 @@ class PatchController(PatchService):
# Check if there is a major release deployment in progress
# and set agent request parameters accordingly
major_release = None
if self.check_upgrade_in_progress():
if is_major_release:
upgrade_release = self.get_software_upgrade()
major_release = upgrade_release["to_release"]
force = False