Skip to content

Feature branch sync with master #5937

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

Merged
merged 27 commits into from
Aug 15, 2024

Conversation

liulinC
Copy link
Collaborator

@liulinC liulinC commented Aug 14, 2024

No description provided.

edwintorok and others added 27 commits August 5, 2024 09:21
Adds `with_child_trace` fuction that only creates a span only if there
exists a parent.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Intruments the following path of an http request:

- `handle_one`,
- `callback`,
- `callback1`,
- `dispatch`,
- `jsoncallback`,
- `response`.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Sometimes it takes the underlying cluster stack (corosync) some time to return
a consistent view of the quorum. For example, it may be that the membership
information correctly reflects the new members after a membership change, while the
quorum field is still out of date. Add a delay here to make sure that the information
from corosync represents a consistent snapshot of the current cluster state.

Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
Intruments the request reading loop.

Adds new functionality to the tracing library to update a span with a
new parent.

This way we can retroactively set the parent span with the correnct one.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Fixes warning of unused records fields.

These fields are part of the opentelementry spec but we are currently
not using them in `xapi`.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Increases the default maximum number of spans inside a trace from `1000`
to `2500`.

Now that we instrumented the internal http calls, with all components
enabled, the number of spans inside `xapi` component for a `vm-start`
operations is slightly  greater than `1000`. This causes spans to be
leaked, they are removed from the ongoing span table but never added in
the finished tabled. Therefore, they are lost unless the limit is
change in `/etc/xapi.conf`.

This should fix the issue until we implement a better abstraction for
the span hashtables.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
….Request`

Like the title says, this commit adds `Http.Request.with_tracing` to
`Http.Request`.

This should enable updating the traceparent field of a request while we
process it.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
This change augments all parameter structures emitted by the JSON backend to
include a "required" member that specifies whether the parameter is
optional or not. Parameters are considered optional in the IDL if a default
value is provided for them.

The simplest example is session.login_with_password. This message permits two
extra parameters, "version" and "originator" - but these are not required to
successfully invoke the function.

Signed-off-by: Colin James <colin.barr@cloud.com>
…/CP-50444

CP-50444: Instrument http svr with dt
This has ended up in our public PyPI package description:
https://pypi.org/project/XenAPI/

However it is irrelevant to a user of the package on PyPI, because they'd already get the "built" version,
that has the version number inside, so they don't need OCaml or 'make' to use it.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Output if parameter is required in JSON backend
…ysdk

Python SDK: Move "Packaging" section out of the public docs
Signed-off-by: Colin James <colin.barr@cloud.com>
```
File "ocaml/libs/clock/dune", line 27, characters 19-33:
27 |   (names test_date test_timer_run)
                        ^^^^^^^^^^^^^^                                                                                                                                       qcheck random seed: 423397317                                                                                                                                                Testing `Timer'.                                                                                                                                                             This run has ID `D009HP55'.                                                      �[<35;18;6M
F.............

┌──────────────────────────────────────────────────────────────────────────────┐
│ [FAIL]        Timer          0   Timer.remaining.                            │
└──────────────────────────────────────────────────────────────────────────────┘
Sleeping for 0.150000 seconds...
Sleeping for 0.000500 seconds...

test `Timer.remaining` failed on ≥ 1 cases:
1ms
Expected to have spare time, but got excess: 1.91μs. Duration: 1ms, actual: 999μs, timer:
elapsed: 1.03ms
duration: 1ms
```

Here we asked for a sleep of 0.5ms, but got woken up twice as late.
And the quickcheck property was expecting that the actual wake up time won't be twice as wrong.
In reality it can wake up by arbitrary amounts of time later based on how busy the OS is,
but we do need to check that the wakeups are not completely wrong.

So skip the check on very short durations, but keep it on the longer 100ms and 300ms tests.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
jemalloc was updated to version 5.3.0:
- Provides libjemalloc.so.2 instead of libjemalloc.so.1
- No longer supported `lg_dirty_mult` option

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
…persist tmp file after reboot

- Modified xapi_globs.ml to include this change.

Signed-off-by: Ashwinh <ashwin.h@cloud.com>
On behalf of Colin <colin.barr@cloud.com>, I, Colin James <colin.barr@cloud.com>, hereby add my Signed-off-by to this commit: 8337fa9

Signed-off-by: Colin James <colin.barr@cloud.com>
Ensure that the updated data and metadata are written before the
headers are updated otherwise xcp-rrdd might start reading the data
block before all the data is populated and thus run off the end of the
data.

Signed-off-by: Mark Syms <mark.syms@cloud.com>
…tephenche/CA-397171

CA-397171: Replace libjemalloc.so.1 with libjemalloc.so.2
…leepy

CI: fix spurious failure on busy system
…A-392685

CA-392685:/tmp is mounted with type tmpfs which cause the files to be cleaned after host reboot in XS rawhide.
…oro-wait

CA-396635: Wait for corosync to update its info
In the commit 62db5cb, the device name validation was consolidated with
the function which converts name to device number. Particularly, the
function "Device_number.of_string" is used for both the validation and
the conversion.

But one issue was introduced in the validation is that the "None" value
returned from "Device_number.of_string" is considered as valid. This
causes the error "the device name is invalid".

This commit just fixes this issue.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
Signed-off-by: Ming Lu <ming.lu@cloud.com>
@liulinC
Copy link
Collaborator Author

liulinC commented Aug 14, 2024

Current CI check because new python code in master does not have necessary unittest,
thus lower the coverage rate. @bernhardkaindl is fixing that.

@bernhardkaindl
Copy link
Collaborator

bernhardkaindl commented Aug 14, 2024

Current CI check because new python code in master does not have necessary unittest,
thus lower the coverage rate. @bernhardkaindl is fixing that.

Correct, opened #5938 to test (and thereby cover) the merged changes for the sync of master into feature/py3.

Please just close and re-open this PR (#5937) after #5938 is merged to feature/py3 to fix the CI run of this PR (#5937).

@liulinC liulinC closed this Aug 15, 2024
@liulinC liulinC reopened this Aug 15, 2024
@liulinC liulinC merged commit a5d13be into xapi-project:feature/py3 Aug 15, 2024
25 of 26 checks passed
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.