Skip to content

Conversation

minglumlu
Copy link
Member

No description provided.

changlei-li and others added 17 commits August 1, 2025 18:03
Add Xenctrlext.get_nr_nodes to get numa nodes count, get_nr_nodes gets
the count from numainfo.memory array size.

Signed-off-by: Changlei Li <[email protected]>
…6610)

`host.cpu_info` is a map that contains details about the physical CPUs
on this host. This PR adds a key of nr_nodes in the field to expose numa
nodes count.
Use `Xenctrlext.numainfo` to get the array size of numainfo.memory, see
https://github.com/xapi-project/xen-api/blob/v25.26.0/ocaml/xenopsd/c_stubs/xenctrlext_stubs.c#L395
…tch after apply_livepatch

Signed-off-by: Lunfan Zhang[Lunfan.Zhang] <[email protected]>
At the point of session login, check the user-agent in HTTP head
and track the user agents.
The user-agent format is <name>/<version> <comment>, parse the
name and version to record.
If the version is different from the stored user-agent, record
the last-seen version.
If the number of tracked user agents > max_num, remove the oldest
entry in the record.

Signed-off-by: Changlei Li <[email protected]>
Signed-off-by: Changlei Li <[email protected]>
When the session is created, store the user agents (name version pair)
that are from HTTP head in a module variable.
The user-agent format is `<name>/<version> <comment>`, parse the name
and version to record. If the version is different from the stored
user-agent, record the last-seen version. Remove the oldest entry if the
record list length exceeds max_num.

Provide a host API `host.get_tracked_user_agents` to get the record.
Note that the result is stored in memory, it will be cleared after
host/XAPI restart.
The current `make_kpatch_list` function parses non-empty lines between
`Loaded patch modules:` and `Installed patch modules:` and returns each
line directly. This approach includes both the patch name and its status
(e.g., [enabled]), as shown below:
```
  lp_4_19_19__8_0_32_xs8__4_19_19__8_0_33_xs8 [enabled]
  lp_4_19_19__8_0_20_xs8__4_19_19__8_0_21_xs8 [enabled]
```
This update adds a step to remove the status indicator, ensuring that
the function returns a clean list of kernel patch names only.
…6654)

To identify whether a VM is PVS-provisioned, this change dumps relevant
xenstore key-value pairs into `VM.services`.
For example, in xenstore:
`data = ""`
    ` ...`
    `pvs_target = ""`
    `target_software_version = "7.44.100"`
The key-value pair `pvs_target/target_software_version`: 7.44.100 will
be added to `VM.services`.

For a PVS-provisioned VM:
`# xe vm-param-get uuid=2ca308e6-c780-54e1-b62c-a41a46173cc0
param-name=services`
`pvs_target/target_software_version: 7.44.100`

For a non-PVS-provisioned VM:
`# xe vm-param-get uuid=a66d26af-74c1-d328-c445-fb52763b02e3
param-name=services`
` `
…epatch

The current make_xen_livepatch_list function expects exactly 2 parts
after splitting, but the output has 3 parts: ID, status, and metadata.
When split with ~limit:2,
it creates [ID; "status | metadata"],
which doesn't match the pattern [key; "APPLIED"],
and prevents it from correctly parsing the latest output of xen-livepatch list
~xen-livepatch list
 ID                                     | status     | metadata
----------------------------------------+------------+---------------
hp_1_1                                  | CHECKED    |
hp_2_1                                  | APPLIED    |
hp_3_2                                  | APPLIED    |

Signed-off-by: Lunfan Zhang[Lunfan.Zhang] <[email protected]>
…epatch (#6675)

The current `make_xen_livepatch_list` function expects exactly 2 parts
after splitting, but the output has 3 parts: ID, status, and metadata.
When split with ~limit:2, it creates [ID; "status | metadata"], which
doesn't match the pattern [key; "APPLIED"], and prevents it from
correctly parsing the latest output of `xen-livepatch list `:
~xen-livepatch list
```
 ID                                     | status     | metadata
----------------------------------------+------------+---------------
hp_1_1                                  | CHECKED    |
hp_2_1                                  | APPLIED    |
hp_3_2                                  | APPLIED    |
```
No conflicts.
```
$ git show
commit ec59bac
Merge: 61b98dc 209d950
Author: Ming Lu <[email protected]>
Date:   Wed Sep 24 12:54:29 2025 +0800

    Merge branch 'master' into private/mingl/merge_master_to_feature
```
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