Skip to content

Commit

Permalink
fix: Toss Out Invalid Amount On VFs For SR-IOV
Browse files Browse the repository at this point in the history
* toss out anything less than or equal to zero for the SR-IOV device
  virtual function addresses
* avoid making an API call out to the endpoint, reducing network chatter

Resolves: github.com/harvester/harvester/issues/3977
  • Loading branch information
Mike Russell committed May 25, 2023
1 parent 55fefcf commit 8b53e19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/harvester/dialog/EnableSriovDevice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export default {
try {
this.resources[0].spec.numVFs = this.numVFs;
if (this.resources[0].spec.numVFs <= 0) {
this.resources[0].spec.numVFs = 0;
this.numVFs = 0;
this.close();
return;
}
await actionResource.save();
buttonCb(true);
this.close();
Expand Down

0 comments on commit 8b53e19

Please sign in to comment.