Skip to content

Conversation

edwintorok
Copy link
Contributor

No description provided.

liulinC and others added 30 commits March 7, 2024 10:12
CA-389241: import-update-key compat with xs8 and xs9
* CP-46944: Update yum plugins to dnf plugins

Signed-off-by: Lin Liu <[email protected]>

* CP-46944: Update unittest to make github CI happy

github CI has issues with
- ubuntu-22.04 container
- python11
- python3-dnf

Instead of patching the upstreams, we just provide a stub for
the fix
Signed-off-by: Lin Liu <[email protected]>

---------

Signed-off-by: Lin Liu <[email protected]>
* CP-45921: Use dnf as package manager for XS9

 Given XS9 has updated to dnf and no yum is available,
 xapi will choose package manager basing on following
 - If dnf exists, use dnf
 - otherwise, fallback to yum
 xapi just presume dnf or yum is available in the system.

 Because xapi decides to use dnf or yum according to the running
 environment, this commit is compatible with yum/xs8 and dnf/xs9

Signed-off-by: Lin Liu <[email protected]>

* CP-45921: Code refine for
- Move test code to its own suite
- Replace `active` with `manager`, which is static
- Add cmd_line record type to abstract cmd line type
- Refine doc comment and license

---------

Signed-off-by: Lin Liu <[email protected]>
The default gpg public keyring database updated
- pubring.kbx for new gpg on XS9
- pubring.gpg for old gpg on XS8
Detect whether pubring.kbx exists and fallback to old one for XS8

Signed-off-by: Lin Liu <[email protected]>
…project#5564)

* CP-48221: Update plugin detect package manager dynamically

Given XS9 has deplicated yum with dnf, to be compatible with XS8,
- Use dnf if dnf is detected
- Fallback to yum otherwise

Signed-off-by: Lin Liu <[email protected]>

* CP-48221: Make CI happy with various scans

---------

Signed-off-by: Lin Liu <[email protected]>
Co-authored-by: Luca Zhang <[email protected]>
Use the Atomic module to track whether a watcher has been created.

Signed-off-by: Vincent Liu <[email protected]>
This allows one to force sync the state of xapi db with the cluster
stack, useful for cluster API methods change the state of the cluster.

Signed-off-by: Vincent Liu <[email protected]>
Previously there were two ways an alert for a cluster host join/leave
can be raised: 1. through the cluster change watcher; 2. through the api
call. These two can generate duplicate alerts as an API call can cause
the cluster change watcher to notice the change as well.

The idea of the fix here is still to let API and watcher raise alerts
separately, but now add synchronous API calls to allow API call
(cluster-host-join, etc) to call
the cluster change update code at the right time so that the cluster
change watcher won't see the change again, hence not generating duplicate
alerts.

Signed-off-by: Vincent Liu <[email protected]>
…ess-alert

CA-394109: Reduce number of alerts
The new fingerprint_sha256 and fingerprint_sha1 fields will be empty
when upgrading from a version without the fields. This commit checks for
this and fills them in, stopping the certificate from being needlessly
reinstalled.

Signed-off-by: Steven Woods <[email protected]>
In nm.ml; helpers.ml.
Expands test cases, keeps the existent exception behaviour.

Signed-off-by: Andrii Sultanov <[email protected]>
Signed-off-by: Stephen Cheng <[email protected]>
…tephenche/sync_xs9_with_master

Routine sync xs9 with master
Otherwise the tests are run as part of every package when installing them using
opam, leading to failures

Signed-off-by: Pau Ruiz Safont <[email protected]>
Use a function accepting printf-style arguments to raise an error and
simplify all the call sites.

Signed-off-by: Christian Lindig <[email protected]>
Also move the last function to Xapi_stdext.

Signed-off-by: Vincent Liu <[email protected]>
Note we are only checking for default of new parameters in messages
that already have default parameters.

It lacks checks for new parameters added to messages with no default
parameters, but there is no easy way to achieve that because the generator
cannot tell what is new and what is not, moreover, there are existing
messages with non-default parameters introduced in different releases.

Signed-off-by: Vincent Liu <[email protected]>
psafont and others added 26 commits July 15, 2024 13:51
Using records in cross-pool migration code is dangerous, as the code interacts
with potentially newer hosts. This means that fields in the record might be
different from what's expected. In particular adding an enum field can break
the deserialization, and removing a field as well.

With this change, only SR records are used. This is done to minimize the number
of calls done.

Signed-off-by: Pau Ruiz Safont <[email protected]>
…heck-param

Add new check for new parameters' default value
Signed-off-by: Konstantina Chremmou <[email protected]>

# Conflicts:
#	ocaml/sdk-gen/powershell/gen_powershell_binding.ml
The suites are ordered and some take quite a long time to run, so
introduce an option to only run some of them if necessary.

Signed-off-by: Andrii Sultanov <[email protected]>
We used to send and parse cookies (internally, therefore it
wasn't a big problem) with '&' as separators. Now we also
accept ';' as separators (RFC-compliant), as preparation
for sending cookies with ';' in the future.

Signed-off-by: Andrii Sultanov <[email protected]>
Test helper functions had to be reworked to also allow sending HTTP
requests through normal sockets, not only file sockets.

A test was moved from the legacy endpoint to the new one.

Signed-off-by: Andrii Sultanov <[email protected]>
…/CA-394169-tracing

Instrument task related functionality
…dk-ps

[OIL] Templatization of PS Remove-Xen* cmdlets. Refactoring of HTTP_actions.mustache
Github let a conflict pass by in the last merge

Signed-off-by: Pau Ruiz Safont <[email protected]>
We already have method_name so printing the method itself doesn't add
anything. It also makes searching in Jaeger more difficult as the method
includes its id.

Signed-off-by: Steven Woods <[email protected]>
The float argument gets converted to microseconds when making the system call.
If it is <1us then it gets converted to 0, which has special meaning
* for select/epoll it means timeout immediately
* for setsockopt SO_RCVTIMEO it means never timeout

So do not generate tests with such small timeout, instead replace them with no delays.

We cannot call `QCheck2.assume` here (it can only be called from the body of a test),
 otherwise sometimes we might get a failure like this:
```
Test Dune__exe__Unixext_test.test_proxy failed:

ERROR: uncaught exception in generator for test Dune__exe__Unixext_test.test_proxy after 100 steps:
Exception: QCheck2.Failed_precondition
Backtrace: Raised at QCheck2.assume in file "src/core/QCheck2.ml" (inlined), line 57, characters 29-54
Called from Xapi_fd_test__Generate.delay_of_size in file "ocaml/libs/xapi-stdext/lib/xapi-fd-test/generate.ml", line 66, characters 2-34
Called from QCheck2.Tree.bind in file "src/core/QCheck2.ml", line 207, characters 28-31
Called from QCheck2.Gen.bind in file "src/core/QCheck2.ml", line 271, characters 72-80
Called from QCheck2.Tree.bind in file "src/core/QCheck2.ml", line 207, characters 28-31
Called from QCheck2.Test.check_state in file "src/core/QCheck2.ml", line 1749, characters 12-32
```

Signed-off-by: Edwin Török <[email protected]>
… must be at least 1

Reject <1us timeouts, they are likely the result of a rounding down bug.

If we try to use a timeout that is >0, but < 1e-6 it'd be truncated to 0.
0 has a special meaning of 'no timeout', rather than immediately timeout.

The generator got already changed to avoid generating such short timeouts.

Signed-off-by: Edwin Török <[email protected]>
…-49811

CP-49811: Remove redundant method object from span name
…n call

really_input takes a timeout parameter, however this is the timeout
for each individual read call, not the entire function.

So if we have a sender that sends a 64KiB buffer 1 byte at a time,
and we set a timeout of 100ms then the operation can take up to 109 minutes.

The timeout generated by quick-check is meant to be the total timeout, so divide it by the
number of read/write calls that we are expected to make, to ensure that the overall timeout is not excessive.

If the timeout ends up being too small then we tell quickcheck to generate another configuration
with `assume`.

Signed-off-by: Edwin Török <[email protected]>
Adds a parent span for the auto_instrumentation of each module. This
helps to group them together so that they can be hidden more easily in
Jaeger. Ideally we should group all of the auto_instrumentation spans
together, but there is no easy way to do this as there's no way to be
sure of when we're finished importing modules.

Signed-off-by: Steven Woods <[email protected]>
Xapi will send alert when the user is running on a Corosync 2 cluster
and prompting them to upgrade. This should only happen on XS 9 and is
behind the corosync3 feature flag.

XenCenter can take advantage of this alert message, but should have its
own warning message to tell the user why/how to perform the upgrade.

Signed-off-by: Vincent Liu <[email protected]>
…-49875

CP-49875: observer.py: Group the auto_instrumentation spans by module
…orosync3-msg

CP-49634: Add alerting for Corosync upgrade
@edwintorok edwintorok merged commit 88671bc into xapi-project:feature/perf Jul 18, 2024
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.