Skip to content

Commit 823fd2f

Browse files
committed
Show accurate rollback warning when only nodeOSUpgradeChannel is active
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 the node image may be re-upgraded by the node OS auto-upgrade channel
1 parent fb5c19f commit 823fd2f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/aks-preview/azext_aks_preview/custom.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2298,14 +2298,22 @@ def aks_agentpool_rollback(cmd, # pylint: disable=unused-argument
22982298
"unmanaged",
22992299
]
23002300

2301-
if upgrade_channel_enabled or node_os_channel_enabled:
2301+
if upgrade_channel_enabled:
23022302
logger.warning(
23032303
"Auto-upgrade is enabled on cluster '%s' (upgradeChannel=%s, nodeOSUpgradeChannel=%s). "
23042304
"Rollback will not succeed until auto-upgrade is disabled. Please disable auto-upgrade to roll back the node pool.",
23052305
cluster_name,
23062306
upgrade_channel or "none",
23072307
node_os_upgrade_channel or "Unmanaged",
23082308
)
2309+
elif node_os_channel_enabled:
2310+
logger.warning(
2311+
"nodeOSUpgradeChannel is enabled on cluster '%s' (nodeOSUpgradeChannel=%s). "
2312+
"The orchestrator version rollback will proceed, but the node image may be "
2313+
"re-upgraded automatically by the node OS auto-upgrade channel.",
2314+
cluster_name,
2315+
node_os_upgrade_channel,
2316+
)
23092317
except Exception as ex: # pylint: disable=broad-except
23102318
logger.debug("Unable to retrieve auto-upgrade configuration before rollback: %s", ex)
23112319

0 commit comments

Comments
 (0)