Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run mstfwreset when applying config changes #449

Closed

Conversation

SalDaniele
Copy link
Contributor

@SalDaniele SalDaniele commented May 30, 2023

As of the most recent update to the Bluefield2 firmware (v24.37.1300)
configuration changes no longer are applied on node reboot without
running mstfwreset().

This can result in a node ending up in a bootloop when applying a new
configuration.

i.e. a sriov-workload-node-policy if applied to updated total vfs. This
change is applied via mstconfig, however the change is not reflected in
NUM_OF_VFS without running mstfwreset(). This resulted in a repeated
call to reboot.

    I0523 20:59:44.059046    7496 mellanox_plugin.go:335] Changing TotalVfs 16 to 12, needs reboot
    I0523 20:59:44.059057    7496 mellanox_plugin.go:172] mellanox-plugin needDrain true needReboot true

Signed-off-by: Salvatore Daniele sdaniele@redhat.com

@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@SalDaniele SalDaniele changed the title Add pciultis dependency Add pciutils dependency May 30, 2023
@SalDaniele
Copy link
Contributor Author

/cc @wizhaoredhat

@SchSeba @adrianchiris @zeeke Can anyone PTAL? Small update that is blocking our work

@wizhaoredhat
Copy link
Contributor

LGTM

@wizhaoredhat
Copy link
Contributor

wizhaoredhat commented May 30, 2023

Related issue: Mellanox/mstflint#785

@wizhaoredhat
Copy link
Contributor

/cc @bn222

@github-actions github-actions bot requested a review from bn222 May 30, 2023 17:39
@wizhaoredhat
Copy link
Contributor

wizhaoredhat commented May 30, 2023

@SalDaniele Could you also describe the bootloop with the config-daemon we were seeing with the latest BF2 firmware in the PR description?

@adrianchiris
Copy link
Collaborator

we are currently not calling mstfwreset in sriov-network-config-daemon, why is this change needed ?

@wizhaoredhat
Copy link
Contributor

@adrianchiris Although we aren't using mstfwreset here. The mstflint package as a whole does have pciutils as a dependency. We should add this dependency in.

Without pciutils, we will get the following error message when running mstfwreset:

Continue with reset?[y/N] y
Failed
-E- failed to run 'setpci -s 0000:c9:02.0 0x0.w'.

The setpci command is part of the pciutils package.

Signed-off-by: Salvatore Daniele <sdaniele@redhat.com>
@github-actions
Copy link

github-actions bot commented Jun 6, 2023

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@SalDaniele SalDaniele changed the title Add pciutils dependency Run mstfwreset when applying config changes Jun 6, 2023
@SalDaniele
Copy link
Contributor Author

@adrianchiris I just added an additional commit to address the crux of the issue we are encountering. As of the most recent Bluefields2 firmware update (5-18-23) config changes are no longer applied on next boot as they have been previously. This requires us to call mstfwreset manually. Without doing so, we can end up in a boot loop, where a change is applied by the config daemon, the node reboots, the change is not reflected, etc.

@coveralls
Copy link

coveralls commented Jun 6, 2023

Pull Request Test Coverage Report for Build 5200424111

  • 0 of 19 (0.0%) changed or added relevant lines in 1 file are covered.
  • 8 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.2%) to 25.768%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/plugins/mellanox/mellanox_plugin.go 0 19 0.0%
Files with Coverage Reduction New Missed Lines %
controllers/sriovibnetwork_controller.go 2 64.15%
api/v1/helper.go 3 41.32%
pkg/daemon/daemon.go 3 42.91%
Totals Coverage Status
Change from base Build 5143456346: -0.2%
Covered Lines: 1963
Relevant Lines: 7618

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Jun 6, 2023

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

As of the most recent update to the Bluefield2 firmware (v24.37.1300)
configuration changes no longer are applied on node reboot without
running mstfwreset().

This can result in a node ending up in a bootloop when applying a new
configuration.

i.e. a sriov-workload-node-policy if applied to updated total vfs. This
change is applied via mstconfig, however the change is not reflected in
NUM_OF_VFS without running mstfwreset(). This resulted in a repeated
call to reboot

I0523 20:59:44.059046    7496 mellanox_plugin.go:335] Changing TotalVfs 16 to 12, needs reboot
I0523 20:59:44.059057    7496 mellanox_plugin.go:172] mellanox-plugin needDrain true needReboot true

Signed-off-by: Salvatore Daniele <sdaniele@redhat.com>
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@wizhaoredhat
Copy link
Contributor

LGTM
@adrianchiris PTAL

if err := configFW(); err != nil {
return err
}
if err := resetFW(); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

im not too keen on always running mstfwreset, perhaps only for DPUs in Embedded mode ?

i need to think about it a bit more

Copy link
Collaborator

@adrianchiris adrianchiris Jun 13, 2023

Choose a reason for hiding this comment

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

also for DPU you need to run with --reset-sync=1 flag.

see:
https://docs.nvidia.com/networking/pages/viewpage.action?pageId=52009175

with current implementation, does it work for u ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aahh good to know. I was testing the current implementation on a cluster w/ the BF in NIC mode, which was working. The issue I was seeing was not specific to running in DPU embedded mode, the node would get stuck in a bootloop if I applied a policy to change the number of vfs, since after rebooting the updated configuration would not be applied, triggering another reboot.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So, you encountered the issue with DPU in NIC mode as well ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding since submitting this patch is that this is not intended behavior by Nvidia and a firmware patch will come in July to address this issue.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The issue is that the behavior of NIC mode changed too and is broken in a similar to DPU. With DPU mode --sync 1 causes the DPU to hang. I have code that adds --sync 1 but I want it to work correctly before pushing the changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My understanding since submitting this patch is that this is not intended behavior by Nvidia and a firmware patch will come in July to address this issue.

that is correct, its a bug and Nvidia should fix the firmware.

@SalDaniele in that case, i think this PR is no longer required and can be closed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes provided this fix is in the next firmware release, we can close this PR

@adrianchiris
Copy link
Collaborator

PR is not needed, see discussion above

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.

5 participants