Skip to content

fix(xo-server): change current_operations display for xo host and poo… - #10283

Open
ayoub-el-kajji-v wants to merge 6 commits into
masterfrom
fix/host-current-operations
Open

fix(xo-server): change current_operations display for xo host and poo…#10283
ayoub-el-kajji-v wants to merge 6 commits into
masterfrom
fix/host-current-operations

Conversation

@ayoub-el-kajji-v

@ayoub-el-kajji-v ayoub-el-kajji-v commented Aug 20, 2026

Copy link
Copy Markdown

Description

[XO-2810]
This PR is a fix to change the display format of the current_operations object in Host and Pool to be displayed with the same format of the current_operations in VM

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

If you are an external contributor, you can skip this part. Simply create the pull request, and we'll get back to you as soon as possible.

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.
  4. If the PR relates to a change in the openAPI specification, a member of the DevOps team must also participate in the review.

@plane-sync-vates

plane-sync-vates Bot commented Aug 20, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@ayoub-el-kajji-v
ayoub-el-kajji-v marked this pull request as ready for review August 20, 2026 08:50

@spacotte-vates spacotte-vates left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Details, otherwise LGTM

Comment thread CHANGELOG.unreleased.md
- [Warm migration] Fix `Vm target of warm migration not found` error at the end of a migration (PR [#10210](https://github.com/vatesfr/xen-orchestra/pull/10210))
- **XO 5**:
- [VM/Console] Fix the page header and tab navigation disappearing permanently in the console tab (PR [#10007](https://github.com/vatesfr/xen-orchestra/pull/10007))
- [XO server] Fix current_operations format on host and pool objects (PR [#10283](https://github.com/vatesfr/xen-orchestra/pull/10283))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's better to move it above the XO 5/XO 6 section otherwise it's a bit confusing where it belongs.

auto_poweron: obj.other_config.auto_poweron === 'true',
crashDumpSr: link(obj, 'crash_dump_SR'),
current_operations: obj.current_operations,
current_operations: currentOperations,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
current_operations: currentOperations,
current_operations: getCurrentOperations(obj),

Prevents using a const, not very important.

@MathieuRA MathieuRA left a comment

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.

The code LGTM, but during my tests, it didn't work as expected.
For example, if you shut down a host, the shutdown operation does not appear in the object's current_operations

Comment on lines +74 to +79
// Builds a { taskId -> operation } map from a XAPI object's raw
// current_operations ({ OpaqueRef -> operation }), dropping any entry
// whose task is no longer present in the local cache (e.g. it finished
// and was collected). This lets consumers know an operation is truly
// over once it disappears from the map, instead of seeing a stale entry
// forever.

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.

Convert this comment into JSDoc so that it appears when hovering over the function signature

Comment thread CHANGELOG.unreleased.md Outdated
- [Backup/File restore, Backup/Health] An unreachable backup repository no longer slows down every listing: it is skipped after a delay and retried with an increasing backoff (PR [#10205](https://github.com/vatesfr/xen-orchestra/pull/10205))
- [REST API] Fix `/users/:id/authentication_tokens` sometimes did not return the token used to make the request (PR [#10233](https://github.com/vatesfr/xen-orchestra/pull/10233))
- [XO server] Fix a random behavior regarding `coresPerSocket` update (PR [#10201](https://github.com/vatesfr/xen-orchestra/pull/10201))
- [XO server] Fix current_operations format on host and pool objects (PR [#10283](https://github.com/vatesfr/xen-orchestra/pull/10283))

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.

update xo-server to minor instead patch

Comment thread CHANGELOG.unreleased.md Outdated
- [Backup/File restore, Backup/Health] An unreachable backup repository no longer slows down every listing: it is skipped after a delay and retried with an increasing backoff (PR [#10205](https://github.com/vatesfr/xen-orchestra/pull/10205))
- [REST API] Fix `/users/:id/authentication_tokens` sometimes did not return the token used to make the request (PR [#10233](https://github.com/vatesfr/xen-orchestra/pull/10233))
- [XO server] Fix a random behavior regarding `coresPerSocket` update (PR [#10201](https://github.com/vatesfr/xen-orchestra/pull/10201))
- [XO server] Fix current_operations format on host and pool objects (PR [#10283](https://github.com/vatesfr/xen-orchestra/pull/10283))

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.

Each new entry must be placed at the end of the section (to facilitate conflict resolution).
They are reorganized during the technical release

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