Skip to content

Conversation

@lixuemin2016
Copy link
Collaborator

@lixuemin2016 lixuemin2016 commented Feb 10, 2026

Enhancement:
Install the AZNFS mount helper package from the Microsoft Production repository with non-interactive installation mode enabled. The current latest package version is aznfs-3.0.13-1.x86_64.

For more information, see: https://github.com/Azure/AZNFS-mount

Reason:
Add AZNFS mount helper package

Result:
systemctl status aznfswatchdog
● aznfswatchdog.service - aznfs watchdog for NFSv3 mounts
Loaded: loaded (/usr/lib/systemd/system/aznfswatchdog.service; enabled; preset: disabled)
Active: active (running) since Tue 2026-02-10 05:19:29 UTC; 21min ago
Main PID: 1066 (aznfswatchdog)
Tasks: 2 (limit: 48648)
Memory: 80.5M
CPU: 7.025s
CGroup: /system.slice/aznfswatchdog.service
├─ 1066 /bin/bash /usr/sbin/aznfswatchdog
└─28600 sleep 5

systemd[1]: Started aznfs watchdog for NFSv3 mounts.
aznfswatchdog[1308]: conntrack v1.4.7 (conntrack-tools): 0 flow entries have been shown.
aznfswatchdog[7041]: AUTO_UPDATE_AZNFS is set to: 'true'
aznfswatchdog[7041]: Running auto-update...
aznfswatchdog[7041]: Retrieving distro info from /etc/os-release...
aznfswatchdog[7041]: Using 'dnf' instead of 'yum'
aznfswatchdog[7041]: aznfs is already up-to-date.

Issue Tracker Tickets (Jira or BZ if any):
JIRA: RHELOPC-111

Summary by Sourcery

Add optional installation of the Azure NFS (AZNFS) mount helper package to the HPC role, enabled by default and documented in role variables.

New Features:

  • Introduce the hpc_install_aznfs boolean variable to control installation of the Azure NFS (AZNFS) mount helper.
  • Install the AZNFS package from the configured repositories in non-interactive mode when hpc_install_aznfs is enabled.

Enhancements:

  • Document the AZNFS installation option and its behavior in the role README.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 10, 2026

Reviewer's Guide

Adds optional installation of the Azure NFS (AZNFS) mount helper via Ansible, including a new toggle variable, package list entry, and documentation.

Sequence diagram for conditional AZNFS mount helper installation

sequenceDiagram
    actor Admin
    participant AnsibleRole
    participant PackageManager
    participant MicrosoftRepo
    participant aznfswatchdog_service

    Admin->>AnsibleRole: Run_HPC_role_with_inventory_and_vars
    AnsibleRole->>AnsibleRole: Read_hpc_install_aznfs_default_true
    alt hpc_install_aznfs_is_true
        AnsibleRole->>AnsibleRole: Set_env_AZNFS_NONINTERACTIVE_INSTALL_1
        AnsibleRole->>PackageManager: Install_package_aznfs
        PackageManager->>MicrosoftRepo: Fetch_aznfs_from_MS_Prod_repo
        MicrosoftRepo-->>PackageManager: aznfs_rpm
        PackageManager-->>AnsibleRole: Installation_result_success
        AnsibleRole->>aznfswatchdog_service: Enable_and_start_via_systemd
        aznfswatchdog_service-->>Admin: Service_active_running
    else hpc_install_aznfs_is_false
        AnsibleRole-->>Admin: Skip_AZNFS_installation_task
    end
Loading

File-Level Changes

Change Details Files
Introduce configurable installation of the AZNFS mount helper package in the Ansible role.
  • Add hpc_install_aznfs boolean default variable to control whether AZNFS is installed
  • Define __hpc_aznfs_packages variable listing the aznfs package for installation
  • Add an Ansible task block to install AZNFS packages with AZNFS_NONINTERACTIVE_INSTALL enabled and retry until success, supporting rpm-ostree when applicable
  • Document the new hpc_install_aznfs variable, its purpose, default, and link to upstream AZNFS documentation
defaults/main.yml
vars/main.yml
tasks/main.yml
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The Install AZNFS packages task uses until: __hpc_aznfs_packages_install is success but does not define retries and delay, so the loop will run only once; consider adding explicit retries/delay values to make the retry behavior effective and predictable.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `Install AZNFS packages` task uses `until: __hpc_aznfs_packages_install is success` but does not define `retries` and `delay`, so the loop will run only once; consider adding explicit `retries`/`delay` values to make the retry behavior effective and predictable.

## Individual Comments

### Comment 1
<location> `tasks/main.yml:837-846` </location>
<code_context>
+- name: Install AZNFS mount helper
+  when: hpc_install_aznfs
+  block:
+    - name: Install AZNFS packages
+      environment:
+        AZNFS_NONINTERACTIVE_INSTALL: "1"
+      package:
+        name: "{{ __hpc_aznfs_packages }}"
+        state: present
+        use: "{{ (__hpc_server_is_ostree | d(false)) |
+          ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
+      register: __hpc_aznfs_packages_install
+      until: __hpc_aznfs_packages_install is success
+
 - name: Tune system for HPC
</code_context>

<issue_to_address>
**issue (bug_risk):** The `until` loop is missing `retries`/`delay`, which Ansible expects when using `until`.

Ansible will fail with `'retries' is required with 'until'` if you omit `retries` (and usually `delay`). Please add appropriate values (e.g. `retries: 5`, `delay: 10`) under this task to preserve the intended retry behavior.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Collaborator

@spetrosi spetrosi left a comment

Choose a reason for hiding this comment

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

Do we really need a separate variable and a separate step to install this package?
Maybe we can append it to some existing packages list and install it as a batch with other software?
There is a small issue with installing many packages with many package modules, each time Ansible generates a Python module and copies it to target node, which is just slower than installing with a single role.
And the other issue is a complexity for users with too many variables.
I understand that often we want to separate package installation into phases, just asking if here it may be appropriate to add it to some of the existing installation.
Also, how big is this package?

@lixuemin2016
Copy link
Collaborator Author

Do we really need a separate variable and a separate step to install this package? Maybe we can append it to some existing packages list and install it as a batch with other software? There is a small issue with installing many packages with many package modules, each time Ansible generates a Python module and copies it to target node, which is just slower than installing with a single role. And the other issue is a complexity for users with too many variables. I understand that often we want to separate package installation into phases, just asking if here it may be appropriate to add it to some of the existing installation. Also, how big is this package?

Hi @spetrosi
Thank you so much for your review, totally understand that.

I haven't found a good solution to install aznfs bundled with other packages yet. Given that aznfs is a standalone function with separate component and its size is 23.20 MB, so either keep it as separate step, or merging with hpc_tuning? The current 90-nfs-readahead.rules mentions "nfs" under the section of "hpc tuning," probably moving under hpc_tuning? But it still needs __hpc_aznfs_packages variable since no dnf package installation for hpc_tuning section.

Hi @dgchinner What are your thoughts on this question? Thank you so much.

@dgchinner
Copy link
Contributor

Do we really need a separate variable and a separate step to install this package? Maybe we can append it to some existing packages list and install it as a batch with other software? There is a small issue with installing many packages with many package modules, each time Ansible generates a Python module and copies it to target node, which is just slower than installing with a single role. And the other issue is a complexity for users with too many variables. I understand that often we want to separate package installation into phases, just asking if here it may be appropriate to add it to some of the existing installation. Also, how big is this package?

Hi @spetrosi Thank you so much for your review, totally understand that.

I haven't found a good solution to install aznfs bundled with other packages yet. Given that aznfs is a standalone function with separate component and its size is 23.20 MB, so either keep it as separate step, or merging with hpc_tuning? The current 90-nfs-readahead.rules mentions "nfs" under the section of "hpc tuning," probably moving under hpc_tuning? But it still needs __hpc_aznfs_packages variable since no dnf package installation for hpc_tuning section.

Hi @dgchinner What are your thoughts on this question? Thank you so much.

This is an azure-specific, microsoft provided package, similar to the WALinuxAgent package which is installed as part of the IB/rdma support packages. The WALinuxAgent package is not actually IB/rdma specific functionality (it is general azure VM management infrastructure) so perhaps we should define a set of "azure packages" that we always install. This would then give us a place to list (and install) all the azure specific management functionality like the WALinuxAgent and the AZNFS helpers.

As for having a separate install variable for this functionality, I don't think that is necessary here. It can be installed without causing problems for anything else and it doesn't take very long to install, so there's no real reason not to install it.

@lixuemin2016 lixuemin2016 force-pushed the addaznfs branch 2 times, most recently from 593b3cf to d51c4cf Compare February 11, 2026 04:00
@lixuemin2016
Copy link
Collaborator Author

Do we really need a separate variable and a separate step to install this package? Maybe we can append it to some existing packages list and install it as a batch with other software? There is a small issue with installing many packages with many package modules, each time Ansible generates a Python module and copies it to target node, which is just slower than installing with a single role. And the other issue is a complexity for users with too many variables. I understand that often we want to separate package installation into phases, just asking if here it may be appropriate to add it to some of the existing installation. Also, how big is this package?

Hi @spetrosi Thank you so much for your review, totally understand that.
I haven't found a good solution to install aznfs bundled with other packages yet. Given that aznfs is a standalone function with separate component and its size is 23.20 MB, so either keep it as separate step, or merging with hpc_tuning? The current 90-nfs-readahead.rules mentions "nfs" under the section of "hpc tuning," probably moving under hpc_tuning? But it still needs __hpc_aznfs_packages variable since no dnf package installation for hpc_tuning section.
Hi @dgchinner What are your thoughts on this question? Thank you so much.

This is an azure-specific, microsoft provided package, similar to the WALinuxAgent package which is installed as part of the IB/rdma support packages. The WALinuxAgent package is not actually IB/rdma specific functionality (it is general azure VM management infrastructure) so perhaps we should define a set of "azure packages" that we always install. This would then give us a place to list (and install) all the azure specific management functionality like the WALinuxAgent and the AZNFS helpers.

As for having a separate install variable for this functionality, I don't think that is necessary here. It can be installed without causing problems for anything else and it doesn't take very long to install, so there's no real reason not to install it.

Hi @dgchinner , @spetrosi

Updated AZNFS and WALinuxAgent installation as azure-specific packages, could you please help to review again? Thank you so much.

README.md Outdated
Comment on lines 68 to 70
- **WALinuxAgent**: Azure Linux Agent manages Linux provisioning and VM interaction with the Azure Fabric Controller.

- **aznfs**: Azure NFS mount helper - an Azure-optimized NFS client that simplifies mounting Azure Blob Storage containers over NFS v3 and applies client-side optimizations for improved performance. The package is installed from the Microsoft Production repository with non-interactive installation mode enabled. For more information, see <https://github.com/Azure/AZNFS-mount>.
Copy link
Contributor

Choose a reason for hiding this comment

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

The markdown linter has failed on the use '-' as the list delimiter - it wants you to use '*' instead. See:

https://github.com/linux-system-roles/hpc/actions/runs/21892239587/job/63200391071?pr=72

for details of the linter failure. Can you fix this and check that the linter passes after updating the PR?

Otherwise everything else looks fine.

@lixuemin2016 lixuemin2016 force-pushed the addaznfs branch 2 times, most recently from 38646fd to 4106cad Compare February 11, 2026 13:07
Add Azure specific package variable containing WALinuxAgent and aznfs

Install the AZNFS mount helper package from the Microsoft Production
repository with non-interactive installation mode enabled.
The current latest package version is aznfs-3.0.13-1.x86_64.
After installation, check systemd service aznfswatchdog status

For more information, see: <https://github.com/Azure/AZNFS-mount>

JIRA: RHELOPC-111

Signed-off-by: Xuemin Li <xuli@redhat.com>
@lixuemin2016 lixuemin2016 merged commit e80b290 into linux-system-roles:main Feb 12, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants