Skip to content

Merge master into feature/host-network-device-ordering #6520

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

Closed
wants to merge 84 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
12e5680
CP-53477 Update host/pool datamodel to support SSH status query and c…
LunfanZhang Mar 25, 2025
2f00a21
CP-53477 Update Host/Pool Data model to Support Dom0 SSH Control (#6388)
minglumlu Mar 28, 2025
497bbfa
Merge master into feature/configure-ssh-phase2 (#6398)
gangj Apr 2, 2025
db38cb0
Fixup
gangj Mar 28, 2025
a875364
CP-53711: Copy SSH settings from pool coordinator in pool join
gangj Mar 28, 2025
6e6c0ed
CP-53711: Copy SSH settings from pool coordinator in pool join (#6395)
gangj Apr 2, 2025
31c2b3c
Fixup
gangj Apr 7, 2025
49f8128
Merge master into feature/configure-ssh-phase2 (#6409)
gangj Apr 7, 2025
600e166
CP-53802: Restore SSH service to default state in pool eject
gangj Apr 7, 2025
0bc2246
Add default value of SSH settings in constants.ml
gangj Apr 7, 2025
5a533f5
CP-53711: Apply SSH settings in joiner before update_non_vm_metadata
gangj Apr 7, 2025
f67dcf7
CP-53723 Implement Console timeout configure API for Dom0 SSH control
LunfanZhang Apr 1, 2025
b70078f
CP-53711: Apply SSH settings in joiner before update_non_vm_metadata …
gangj Apr 8, 2025
25ed999
CP-53802: Restore SSH service to default state in pool eject (#6399)
gangj Apr 8, 2025
a3bc84d
CP-53478: Implement SSH enabeld timeout API for Dom0 SSH control
LunfanZhang Apr 1, 2025
cb9277d
CP-53725 Create SSH-related xe CLI for Dom0 SSH control
LunfanZhang Apr 1, 2025
e29eda2
CP-53478: Implement SSH-related APIs for Dom0 SSH control (#6394)
minglumlu Apr 8, 2025
365cd74
Remove the unused error set_console_idle_timeout_failed
gangj Apr 15, 2025
26ed87d
Update pom.xml
odaysec Apr 16, 2025
34b308c
CP-54138: Sync SSH status during XAPI startup
LunfanZhang Apr 11, 2025
12d5562
Merge master into current branch and resolve conflicts
LunfanZhang Apr 21, 2025
779f8f7
Sync master to feature/configure-ssh-phase2 (#6435)
BengangY Apr 22, 2025
1d12b8e
CP-308049: rrdview tool
edwintorok Dec 11, 2024
8deed51
CP-308049: rrdview tool
edwintorok Dec 11, 2024
84ecb1e
CA-410948 Avoid rasie full Exception when disable/enable ssh failed
LunfanZhang May 14, 2025
760fb26
CA-409949 CA-408048 XSI-1912 remove unabailable SM plugin by ref
May 29, 2025
bb63de6
CA-409949 CA-408048 XSI-1912 remove unavailable SM plugin by ref (#6490)
edwintorok May 29, 2025
6049a4a
xapi-types: remove dev errors when adding features
psafont May 21, 2025
ab90994
xenctrlext: add function to set the hard-affinity for vcpus
psafont May 28, 2025
836b3f1
xenopsd: pass the hard-affinity map to pre_build
psafont May 29, 2025
8d6044f
xenopsd: do not send hard affinities to xenguest when not needed
psafont May 29, 2025
0c00373
xenopsd: set the hard affinities directly when set by the user
psafont May 29, 2025
02fca09
xenopsd: expose a best-effort mode that set the hard affinity mask (C…
psafont May 28, 2025
18c952f
xapi: use hard-pinning with best-effort as an experimental feature (C…
psafont May 29, 2025
ae2d859
Add experimental feature to use hard affinities when using best-effor…
psafont Jun 2, 2025
3f21dea
CA-411679: Add min/max to runstate metrics
BengangY Jun 3, 2025
78d25e3
CA-411679: Runstate metrics return data over 100%
BengangY Jun 3, 2025
1356e9c
Modify doc mistakes
BengangY Jun 3, 2025
f75af5b
Modify doc mistakes (#6494)
psafont Jun 3, 2025
e156f31
CA-410948 Refine the Exception when disable/enable SSH failed (#6487)
BengangY Jun 3, 2025
c21f965
Merge master into current branch and resolve conflicts
LunfanZhang Jun 3, 2025
d5a6e88
CONTRIBUTING: add some initial guidelines
last-genius May 23, 2025
c7de2ce
Removed PowerShell 5.x build due to the retirement of windows-2019.
kc284 Jun 3, 2025
cfdb76e
Removed PowerShell 5.x build due to the retirement of windows-2019. (…
lindig Jun 3, 2025
c3761f9
fix Failure to use HTTPS or SFTP URL in Maven artifact upload/downloa…
psafont Jun 3, 2025
8a5111d
Add file-upload support to xe host-call-plugin
Jun 2, 2025
cf89d65
CP-53475 Update release number to latest tag
LunfanZhang Jun 3, 2025
80b0d6f
Sync master to feature/configure-ssh-phase2 (#6496)
BengangY Jun 4, 2025
cba2f1d
XSI-1918: Host can not join pool after enable external auth
liulinC May 30, 2025
35c353c
XSI-1918: Host can not join pool after enable external auth (#6492)
liulinC Jun 4, 2025
ee1e4c8
Add file-upload support to xe host-call-plugin (#6497)
psafont Jun 4, 2025
0b608d5
Merge SSH management Phase2 feature to next (#6500)
BengangY Jun 4, 2025
09b6256
xapi_vif: Guarantee the device parameter is an unsigned decimal integer
last-genius Jun 3, 2025
4bfdf7e
xapi_vif: Guarantee the device parameter is an unsigned decimal integ…
last-genius Jun 4, 2025
5c54da3
xapi-idl: Avoid printing cli output when testing
psafont Jun 4, 2025
e121328
xapi-storage-script: avoid output when running python tests
psafont Jun 4, 2025
19e1704
CA-411766: Detach VBDs right after VM Halted
BengangY Jun 4, 2025
7ad7f88
CA-411679: Runstate metrics return data over 100% (#6493)
BengangY Jun 5, 2025
6c9167f
CA-411766: Detach VBDs right after VM Halted (#6501)
BengangY Jun 5, 2025
755d33b
Reduce output when running unit tests (#6502)
psafont Jun 5, 2025
7c27cc2
datamodel_lifecycle: automatic update
psafont Jun 5, 2025
85d5c92
CONTRIBUTING: add some initial guidelines (#6485)
psafont Jun 5, 2025
47d8133
CP-308049: rrdview tool (#6468)
edwintorok Jun 5, 2025
44ae9d5
datamodel_lifecycle: automatic update (#6506)
BengangY Jun 5, 2025
b8aa4a7
xcp-rrdd: change the code responsible for filtering out paused domains
psafont Jun 5, 2025
a227018
Update datamodel_lifecycle (25.21.0)
BengangY Jun 9, 2025
da12bab
CA-410085: Improving clearing cgroup after vfork
freddy77 Jun 6, 2025
c147854
Update datamodel_lifecycle (25.21.0) (#6509)
psafont Jun 9, 2025
bd5fe18
Adapt code to new mirage-crypto (CP-308222)
psafont Jun 3, 2025
61eb0aa
CP-308252 add VM.call_host_plugin
Jun 5, 2025
6ffa299
xapi-client: Add Tasks.wait_for_all_with_callback
last-genius Jun 6, 2025
64f6f63
xapi_host: Parallelize host evacuation even more
last-genius Jun 6, 2025
d2f366e
CP-308252 add VM.call_host_plugin (#6508)
lindig Jun 9, 2025
0c961bb
github: keep scheduled yangtze's runs working
psafont Jun 9, 2025
fd49f35
rrdd: Avoid missing aggregation of metrics from newly destroyed domains
psafont Jun 5, 2025
87ca449
xapi-aux: remove cstruct usage from networking_info
psafont Jun 3, 2025
867d563
github: keep scheduled yangtze's runs working (#6516)
psafont Jun 10, 2025
40e9fa1
xapi-cli-server: Expose evacuate-batch-size parameter in the CLI
last-genius Jun 6, 2025
6727c4e
Make rrdd more robust against domain appearing and disappearing (#6515)
psafont Jun 10, 2025
817b434
Parallelize host evacuation even more (#6514)
last-genius Jun 10, 2025
909b48e
Adapt code to new mirage-crypto (CP-308222) (#6512)
psafont Jun 10, 2025
c3fa071
CA-410085: Improving clearing cgroup after vfork (#6507)
lindig Jun 10, 2025
4cb387d
[maintenance]: add forkexecd C objects to .gitignore
edwintorok Jun 10, 2025
e67f151
[maintenance]: add forkexecd C objects to .gitignore (#6517)
edwintorok Jun 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/1.249-lcm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
python-test:
name: Python tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
contents: read
strategy:
Expand All @@ -28,7 +28,7 @@ jobs:

ocaml-test:
name: Ocaml tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout code
Expand Down
74 changes: 0 additions & 74 deletions .github/workflows/generate-and-build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,80 +200,6 @@ jobs:
name: SDK_Binaries_CSharp
path: source/src/bin/Release/XenServer.NET.${{ env.XAPI_VERSION_NUMBER }}-prerelease-unsigned.nupkg

build-powershell-5x-sdk:
name: Build PowerShell 5.x SDK (.NET Framework 4.5)
needs: build-csharp-sdk
# PowerShell SDK for PowerShell 5.x needs to run on windows-2019 because
# windows-2022 doesn't contain .NET Framework 4.x dev tools
runs-on: windows-2019
permissions:
contents: read

steps:
- name: Strip 'v' prefix from xapi version
shell: pwsh
run: echo "XAPI_VERSION_NUMBER=$("${{ inputs.xapi_version }}".TrimStart('v'))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Retrieve PowerShell SDK source
uses: actions/download-artifact@v4
with:
name: SDK_Source_PowerShell
path: source/

- name: Retrieve C# SDK binaries
uses: actions/download-artifact@v4
with:
name: SDK_Binaries_CSharp
path: csharp/

# Following needed for restoring packages
# when calling dotnet add package
- name: Set up dotnet CLI (.NET 6.0 and 8.0)
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6
8

- name: Setup project and dotnet CLI
shell: pwsh
run: |
dotnet nuget add source --name local ${{ github.workspace }}\csharp
dotnet add source/src package XenServer.NET --version ${{ env.XAPI_VERSION_NUMBER }}-prerelease-unsigned

- name: Build PowerShell SDK (.NET Framework 4.5)
shell: pwsh
run: |
dotnet build source/src/XenServerPowerShell.csproj `
--disable-build-servers `
--configuration Release `
-p:Version=${{ env.XAPI_VERSION_NUMBER }}-prerelease-unsigned `
-p:TargetFramework=net45 `
--verbosity=normal`

- name: Update SDK and PS versions in "XenServerPSModule.psd1"
shell: pwsh
run: |
(Get-Content "source\XenServerPSModule.psd1") -replace "@SDK_VERSION@","${{ env.XAPI_VERSION_NUMBER }}" | Set-Content -Path "source\XenServerPSModule.psd1"
(Get-Content "source\XenServerPSModule.psd1") -replace "@PS_VERSION@","5.0" | Set-Content -Path "source\XenServerPSModule.psd1"

- name: Move binaries to destination folder
shell: pwsh
run: |
New-Item -Path "." -Name "output" -ItemType "directory"
Copy-Item -Verbose "source\README_51.md" -Destination "output" -Force
Copy-Item -Verbose "source\LICENSE" -Destination "output" -Force
Copy-Item -Path "source\src\bin\Release\net45\*" -Include "*.dll" "output\"
Get-ChildItem -Path "source" |`
Where-Object { $_.Extension -eq ".ps1" -or $_.Extension -eq ".ps1xml" -or $_.Extension -eq ".psd1" -or $_.Extension -eq ".txt" } |`
ForEach-Object -Process { Copy-Item -Verbose $_.FullName -Destination "output" }

- name: Store PowerShell SDK (.NET Framework 4.5)
uses: actions/upload-artifact@v4
with:
name: SDK_Binaries_XenServerPowerShell_NET45
path: output/**/*

build-powershell-7x-sdk:
name: Build PowerShell 7.x SDK
strategy:
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ jobs:
name: SDK_Binaries_CSharp
path: dist/

- name: Retrieve PowerShell 5.x SDK distribution artifacts
uses: actions/download-artifact@v4
with:
name: SDK_Binaries_XenServerPowerShell_NET45
path: sdk_powershell_5x/

- name: Retrieve PowerShell 7.x SDK distribution artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -104,10 +98,6 @@ jobs:
rm -rf libxenserver/usr/local/lib/
tar -zcvf libxenserver-prerelease.src.tar.gz -C ./libxenserver/usr/local .

- name: Zip PowerShell 5.x SDK artifacts for deployment
shell: bash
run: zip PowerShell-SDK-5.x-prerelease-unsigned.zip ./sdk_powershell_5x -r

- name: Zip PowerShell 7.x SDK artifacts for deployment
shell: bash
run: zip PowerShell-SDK-7.x-prerelease-unsigned.zip ./sdk_powershell_7x -r
Expand All @@ -120,7 +110,6 @@ jobs:
shell: bash
run: |
gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --generate-notes dist/* \
PowerShell-SDK-5.x-prerelease-unsigned.zip \
PowerShell-SDK-7.x-prerelease-unsigned.zip \
Go-SDK-prerelease-unsigned.zip \
libxenserver-prerelease.tar.gz libxenserver-prerelease.src.tar.gz
Expand Down
162 changes: 162 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Issues

We welcome reports of technical issues with the components of the xen-api
toolstack. Please make sure that the description of the issue is as detailed as
possible to help anyone investigating it:

1) Mention how it was detected, if and how it could be reproduced

1) What's the desired behaviour? In what cases would it be useful?

1) Include error messages, related logs if appropriate

# Pull Requests

To contribute changes to xen-api, please fork the repository on
GitHub, and then submit a pull request.

It is required to add a `Signed-off-by:` as a
[Developers Certificate of Origin](http://developercertificate.org).
It certifies the patch's origin and is licensed under an
appropriate open-source licence to include it in Xapi:
https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff

The following points are intended to describe what makes a contribution "good" -
easier to review, integrate, and maintain. Please follow them in your work.

## Commit subjects and PR titles

Commit subjects should preferrably start with the name of the component the
commit is most related to, and describe what the commit achieves. If your
commit only touches the `ocaml/xenopsd` directory, it should look like this,
for example:

```
xenopsd: Fix a deadlock during VM suspend
```

Similar principle applies to Pull Request titles. If there is only a single
commit in the PR, Github will automatically copy its subject and description to
the PR's title and body. If there are several commits in the PR, describe what
the PR achieves and the components it most directly impacts.

If the commit subject includes some tracking identifier (such as `CP-1234`, for
example) referring to internal systems, please make sure to include all of the
essential information in the public descriptions - describe the symptoms of the
issue, how it was detected, investigated, how it could be reproduced, what are
the trade-offs and so on as appropriate.

## Split into commits

Following from the rules described above, if what the commit achieves is
difficult to fit into its subject, it is probably better to split it into
several commits, if possible. Note that every commit should build (`make`
should work and the CI should pass) independently, without requiring future
commits. This means some modifications can't really be split into several
commits (datamodel changes, in particular, require modifications to several
components at the same time), but makes it easier to revert part of the Pull
Request if some issues are detected in integration testing at a later point.

## Good Commit Messages

Commit messages (and the body of a Pull Request) should be as helpful and
descriptive as possible. If applicable, please include a description of current
behaviour, your changes, and the new behaviour. Justify the reasoning behind
your changes - are they sufficient on their own, or preparing for more changes?
Link any appropriate documentation, issues, or commits (avoiding internal and
publicly inaccessible sources)

## CI

Please make sure your Pull Request passes the Github CI. It will verify that
your code has been properly formatted (can be done locally with `make format`),
builds (`make` and `make check`), and passes the unit tests (`make test`).
The CI will run in the branches of your fork, so you can verify it passes
there before opening a Pull Request.

## Testing

Describe what kind of testing your contribution underwent. If the testing was
manual, please describe the commands or external clients that were used. If the
tests were automated, include at least a cursory description/name of the tests,
when they were regressed, if possible.

Please note that any contribution to the code of the project will likely
require at least some testing to be done. Depending on how central the
component touched in your PR is to the system, the more things could only be
detected in real-world usecases through integration testing.

If a commit has been determined to break integration testing at a later stage,
please note that the first and safest measure will almost always be reverting
the faulty commit. Making sure critical tests are passing remains a priority
over waiting for some commit to be reworked or refactored (which can be worked
on after a revert has been done). Though we are striving to make more tests
public (with failure then being visible to all), as long as some critical tests
remain private, this will also apply to such tests (with maintainers flagging
the breakage preferrably describing at least the gist of the test).

If you are still waiting on some testing to be done, please mark the PR as a
"draft" and make the reasoning clear.

If wider testing is needed (e.g. the change itself is believed to be correct
but may expose latent bugs in other components), lightweight feature flags can
also be used. E.g. an entry in `xapi_globs.ml` and `xapi.conf`, where the
feature/change is defaulted to `off`, to be turned on at a future time
(when e.g. more related PRs land, or it has passed some wider testing).

If your contribution doesn't intend to have any functional changes, please make
that clear as well.

## Feature work

If your contribution adds some new feature or reworks some major aspect of the
system (as opposed to one-off fixes), it can be benefitial to first describe
the plan of your work in a design proposal. Architectural issues are better
spotted early on, and taking a big-picture view can often lead to new insights.

An example of a design proposal is here:

https://github.com/xapi-project/xen-api/pull/6387

If submitting a design first is not possible, include documentation alongside
with your PR describing the work, like it was done in the last three commits
here:

https://github.com/xapi-project/xen-api/pull/6457

Note that the design will often serve as documentation as well - so take care
updating it after the implementation is done to better reflect reality.

## Review process and merge

It can often be useful to address review suggestions with a "fixup" commit
(created manually or with the help of `git commit --fixup=HASH`). This way it
is clear what the original code was and what your fix touches. Once the
fixup commit has been reviewed and the PR approved, please squash the fixup
commits with `git rebase --autosquash` before merging. Otherwise the commits in
the Pull Request should stay as independent commits - we do not require
squashing all the commits into a single one on merge.

If the commit fixes a bug in an earlier, already merged PR then it might be
useful to mention that in the commit, if known.

This can be done by adding this to your GIT configuration:

```
[pretty]
fixes = Fixes: %h (\"%s\")
```

And then running:

```
# git log -1 --pretty=fixes <hash-of-bad-commit>
Fixes: 1c581c074 ("xenopsd: Fix a deadlock during VM suspend")
```

This will print the commit title and hash in a nice format, which can then be
added to the footer of the commit message (alongside the sign-off).

This is useful information to have if any of these commits get backported to
another release in the future, so that we also backport the bugfixes, not just
the buggy commits.
3 changes: 3 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ It certifies the patch's origin and is licensed under an
appropriate open-source licence to include it in Xapi:
https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff

For more detailed guidelines on what makes a good contribution, see
[CONTRIBUTING](./CONTRIBUTING.md).

Discussions
-----------

Expand Down
4 changes: 2 additions & 2 deletions doc/content/toolstack/features/events/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ while True:
events = session.xenapi.event.next() # block until a xapi event on a xapi DB object is available
for event in events:
print "received event op=%s class=%s ref=%s" % (event['operation'], event['class'], event['ref'])
if event['class'] == 'vm' and event['operatoin'] == 'mod':
if event['class'] == 'vm' and event['operation'] == 'mod':
vm = event['snapshot']
print "xapi-event on vm: vm_uuid=%s, power_state=%s, current_operation=%s" % (vm['uuid'],vm['name_label'],vm['power_state'],vm['current_operations'].values())
print "xapi-event on vm: vm_uuid=%s, vm_name_label=%s, power_state=%s, current_operation=%s" % (vm['uuid'],vm['name_label'],vm['power_state'],vm['current_operations'].values())
except XenAPI.Failure, e:
if len(e.details) > 0 and e.details[0] == 'EVENTS_LOST':
session.xenapi.event.unregister(["VM","pool"])
Expand Down
Loading
Loading