From b3f43d1bc938a093f5fa7c395a438cd39d435094 Mon Sep 17 00:00:00 2001 From: InduSridhar Date: Thu, 26 Mar 2026 22:41:22 +0000 Subject: [PATCH] Show accurate rollback warning when only nodeOSUpgradeChannel is active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the rollback warning treated upgradeChannel and nodeOSUpgradeChannel the same, telling users rollback 'will not succeed' when either was enabled. This is misleading when only nodeOSUpgradeChannel is active — the orchestrator version rollback will succeed fine since nodeOSUpgradeChannel only manages node OS images. Split the warning into two cases: - upgradeChannel enabled: keep the existing hard warning - Only nodeOSUpgradeChannel enabled: inform users the orchestrator rollback will proceed but node image rollback will not succeed unless nodeOSUpgradeChannel is disabled --- src/aks-preview/azext_aks_preview/custom.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index acc7311ccdf..73701ebb442 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -2298,7 +2298,7 @@ def aks_agentpool_rollback(cmd, # pylint: disable=unused-argument "unmanaged", ] - if upgrade_channel_enabled or node_os_channel_enabled: + if upgrade_channel_enabled: logger.warning( "Auto-upgrade is enabled on cluster '%s' (upgradeChannel=%s, nodeOSUpgradeChannel=%s). " "Rollback will not succeed until auto-upgrade is disabled. Please disable auto-upgrade to roll back the node pool.", @@ -2306,6 +2306,14 @@ def aks_agentpool_rollback(cmd, # pylint: disable=unused-argument upgrade_channel or "none", node_os_upgrade_channel or "Unmanaged", ) + if node_os_channel_enabled: + logger.warning( + "nodeOSUpgradeChannel is enabled on cluster '%s' (nodeOSUpgradeChannel=%s). " + "The orchestrator version rollback will proceed, but the node image rollback " + "will not succeed. Please disable nodeOSUpgradeChannel if you want to roll back the node image.", + cluster_name, + node_os_upgrade_channel, + ) except Exception as ex: # pylint: disable=broad-except logger.debug("Unable to retrieve auto-upgrade configuration before rollback: %s", ex)