Skip to content

Add AMLFS update preview command - #10383

Open
Wolfgang De Salvador (wolfgang-desalvador) wants to merge 4 commits into
Azure:mainfrom
wolfgang-desalvador:feature/aks-managed-lustre-extension
Open

Wolfgang De Salvador (wolfgang-desalvador) wants to merge 4 commits into
Azure:mainfrom
wolfgang-desalvador:feature/aks-managed-lustre-extension

Conversation

@wolfgang-desalvador

@wolfgang-desalvador Wolfgang De Salvador (wolfgang-desalvador) commented Sep 22, 2026 •

Copy link
Copy Markdown

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter enable_azure_managed_lustre
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter disable_azure_managed_lustre
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter enable_azure_managed_lustre

Related command

  • az aks create --enable-azure-managed-lustre
  • az aks update --enable-azure-managed-lustre
  • az aks update --disable-azure-managed-lustre

General Guidelines

  • Have you run azdev style aks-preview locally?
    • Passed both pylint and flake8.
  • Have you run python scripts/ci/test_index.py -q locally?
    • Passed: 9 tests, with 2 CI-only tests skipped locally.
  • My extension version conforms to the Extension version schema.
    • Current version: 22.0.0b8, with preview metadata enabled.

For new extensions:

  • N/A — this PR updates the existing aks-preview extension.

Validation

Live testing completed exclusively using the dev release train:

  • Cluster creation with --enable-azure-managed-lustre succeeded.
  • Disabling through az aks update removed the extension and driver resources.
  • Re-enabling through az aks update succeeded.
  • Verified extension version 0.6.0, cluster scope, and automatic upgrades disabled.
  • Verified all four Lustre driver pods were ready and the CSI driver was registered on AKS 1.35.7.
  • Restored the source release train to stable.
  • Deleted the temporary cluster and verified both test resource groups were removed.

Filesystem mounting and I/O were not tested.

About Extension Publish

  • src/index.json was not modified.
  • The release note is included under Pending in HISTORY.rst.
  • No extension version bump was made.

Copilot AI lite review requested due to automatic review settings September 22, 2026 16:36
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Wolfgang De Salvador (@wolfgang-desalvador),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Fix the missing test import and the create-flow early return that can skip Managed Lustre installation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Adds Azure Managed Lustre lifecycle support to AKS create and update commands.

Changes:

  • Adds enable/disable flags, validation, helpers, and lifecycle operations.
  • Documents the feature and adds unit coverage.
  • Integrates extension installation and removal into AKS workflows.
File Summary
src/​aks-preview/​README.rst Documents Managed Lustre usage.
src/​aks-preview/​HISTORY.rst Adds release notes.
src/​aks-preview/​azext_aks_preview/​tests/​latest/​test_azure_managed_lustre.py Adds unit coverage. Critical: call is not imported, causing a NameError.
src/​aks-preview/​azext_aks_preview/​managed_cluster_decorator.py Integrates lifecycle operations. Moderate: an earlier return can skip installation when combined with Azure Container Storage.
src/​aks-preview/​azext_aks_preview/​custom.py Adds command parameters.
src/​aks-preview/​azext_aks_preview/​azuremanagedlustre/​aml_ops.py Implements extension installation and removal.
src/​aks-preview/​azext_aks_preview/​azuremanagedlustre/​_validators.py Validates feature flags.
src/​aks-preview/​azext_aks_preview/​azuremanagedlustre/​_helpers.py Provides extension discovery helpers.
src/​aks-preview/​azext_aks_preview/​azuremanagedlustre/​_consts.py Defines extension settings.
src/​aks-preview/​azext_aks_preview/​azuremanagedlustre/​__init__.py Initializes the package.
src/​aks-preview/​azext_aks_preview/​_params.py Registers CLI arguments.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

import inspect
import unittest
from types import SimpleNamespace
from unittest.mock import Mock, patch
@yonzhan

Copy link
Copy Markdown
Collaborator

Please fix CI issues


def perform_enable_azure_managed_lustre(cmd, resource_group, cluster_name):
client, custom_module = get_azure_managed_lustre_extension_client(cmd)
result = custom_module.create_k8s_extension(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Preserve configuration when re-enabling. An already-installed extension still receives a PUT with empty configuration dictionaries. This can erase custom node tolerations and break driver scheduling. Please skip/reject already-enabled installations, or preserve their settings when updating.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up on e7e9763: skipping existing installations now preserves their configuration, addressing the original overwrite concern. However, the new skip-existing branch introduces a related recovery issue: the lookup checks only name/type, so an extension in Failed or Canceled provisioning state is also treated as already enabled. Retrying az aks update --enable-azure-managed-lustre then clears the enable request and skips installation instead of recovering or reporting the failure.

Please only treat a successfully provisioned extension as an already-enabled no-op; otherwise retry while preserving configuration or return an actionable error. Offline regression tests reproduced the skipped installation for both states. Keeping this distinct failure mode here as follow-up to the configuration-preservation fix rather than in a separate thread.


def set_up_azure_managed_lustre(self, mc: ManagedCluster) -> ManagedCluster:
self._ensure_mc(mc)
if self.context.raw_param.get("enable_azure_managed_lustre"):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Validate node compatibility before enabling. Both create and update accept Flatcar, Ubuntu2604, and AzureLinux3 ARM64, but chart 0.6.0 has no matching node DaemonSet for these profiles. Installation can succeed without a usable node driver. Please fail clearly when no pool supports the pinned driver.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up on e7e9763: the added validation addresses the original cases above, but two unsupported profiles still pass the compatibility check:

  • Ubuntu2204 on Standard_D2ps_v5: the published 0.6.0 chart's Ubuntu 22.04 node driver is amd64-only.
  • AzureLinux on ARM64 with AKS 1.32+: this resolves to Azure Linux 3 but bypasses the architecture check because only the explicit AzureLinux3 SKU is checked.

Installation can therefore still proceed without a usable CSI node driver. Please resolve OS aliases and validate the supported OS/architecture combinations before accepting a pool. Both remaining cases were reproduced with offline regression tests and verified against the published 0.6.0 chart. Consolidating this follow-up here rather than keeping a separate thread.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved with last push theoretically

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants