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

feat(xo-web): in health tab, hide PVS accelerator in orphan VDIs #8039

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MelissaFrncJrg
Copy link
Contributor

Description

Fixes #7938

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

Review process

This 2-passes review process aims to:

  • develop skills of junior reviewers
  • limit the workload for senior reviewers
  • limit the number of unnecessary changes by the author
  1. The author creates a PR.
  2. Review process:
    1. The author assigns the junior reviewer.
    2. The junior reviewer conducts their review:
      • Resolves their comments if they are addressed.
      • Adds comments if necessary or approves the PR.
    3. The junior reviewer assigns the senior reviewer.
    4. The senior reviewer conducts their review:
      • If there are no unresolved comments on the PR → merge.
      • Otherwise, we continue with 3.
  3. The author responds to comments and/or makes corrections, and we go back to 2.

Notes:

  1. The author can request a review at any time, even if the PR is still a Draft.
  2. In theory, there should not be more than one reviewer at a time.
  3. The author should not make any changes:
    • When a reviewer is assigned.
    • Between the junior and senior reviews.

@MelissaFrncJrg MelissaFrncJrg marked this pull request as ready for review October 7, 2024 11:56
Copy link
Member

@MathieuRA MathieuRA left a comment

Choose a reason for hiding this comment

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

Don't forget to add CHANGELOG.unreleased.md

@@ -515,7 +515,7 @@ const ALARM_ACTIONS = [
},
]

const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral'])
const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral', 'pvs_cache'])
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral', 'pvs_cache'])
const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral'])

Copy link
Member

Choose a reason for hiding this comment

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

Why add the pvs_cache type?
HANDLED_VDI_TYPES corresponds to the types of VDI we want to display.

Copy link
Member

Choose a reason for hiding this comment

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

But since 'pvs_cache' is a VDI_type, wouldn't it be better to use that instead of the name_label and name_description to exclude them? /cc @olivierlambert

Copy link
Member

Choose a reason for hiding this comment

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

I don't see this type being used on this forum's message: https://xcp-ng.org/forum/post/81940

Copy link
Member

Choose a reason for hiding this comment

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

I was about to post the same answer ^^ There's nothing (for what I can see) in the XAPI record to discriminate it outside the name label & description.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Me too, but we need to test how it works in real life.

Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't bet about the behaviour on something not even visible in the printed xe record. Even if a name/description isn't perfect, at least we have a proof on how it works, and we have 0 chances to get a PVS server around to test it. So even if it's counter-intuitive, I found the name solution safer than hopping XAPI is doing its work correctly.

Comment on lines +536 to +538
if (vdi.name_label === 'PVS cache VDI' && vdi.name_description === 'PVS cache VDI') {
return false
}
Copy link
Member

Choose a reason for hiding this comment

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

You can mutualize that with the if above.
Also add a comment that link to github issue.

if(
   ... ||
   vdi.name_label === 'PVS cache VDI' && vdi.name_description === 'PVS cache VDI' // see https://github.com/vatesfr/xen-orchestra/issues/7938
 ) {...}

@MathieuRA MathieuRA requested a review from pdonias October 9, 2024 09:18
@@ -515,7 +515,7 @@ const ALARM_ACTIONS = [
},
]

const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral'])
const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral', 'pvs_cache'])
Copy link
Member

Choose a reason for hiding this comment

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

But since 'pvs_cache' is a VDI_type, wouldn't it be better to use that instead of the name_label and name_description to exclude them? /cc @olivierlambert

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.

Hide PVS accelerator VDIs being orphaned in the Dashboard/Healthview
5 participants