Skip to content

Sync master to feature branch#6948

Merged
liulinC merged 16 commits intofeature/ldapsfrom
master
Mar 16, 2026
Merged

Sync master to feature branch#6948
liulinC merged 16 commits intofeature/ldapsfrom
master

Conversation

@liulinC
Copy link
Copy Markdown
Collaborator

@liulinC liulinC commented Mar 16, 2026

No description provided.

lindig and others added 16 commits March 9, 2026 16:08
Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
There is uncertainty where it is safe to use *_val macros inside
caml_release/acquire_runtime_system(). This moves the macro outisde,
which is safe.

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
Wrap C calls with caml_release/acquire_runtime_system()

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
…stem

Release the OCaml runtime lock in more simple cases. However, in cases
with complicated control flow we don't release the lock to avoid having
to argue about the control flow. These are all in rarely used C
functionality.

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
This function is similar to try_map, the difference is that in case of
error it also returns the list of successful results.

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
(cherry picked from commit 321a13a)
When a statefile VDI fails to be attached, previously all the candiadtes
were tried to be detached. This could generate unnecessary churn in the
logs because detaching the ones that were not attached created actions
that are sure to error.

Now only the attached VDIs are tried to be detached, as well as the one
that caused the error, just in case it was half-attached and detaching
clearing an error condition, like before.

Also log the UUID of the VDIs involved instead of the reference.

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
(cherry picked from commit d9de85c)
This helps debugging the correspondence between the xapi_ha logs
mentioning the reference and the exec mentioning the UUID.

Also fetch the uuid from the database only once.

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
(cherry picked from commit 4ec4425)
In some cases when trying to enable HA, no errors can be seen after
running the HA scripts, and the only logged message is HA failing to be
enabled because of a VDI is not available.

Log the intermediate error to be able to see the error that causes the
VDI from being unavailable.

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
(cherry picked from commit c8b2df0)
This timestamp is only used when logging to stdout, and not when logging
to syslog.

This is a functional change, hyphens are added between the elements of the
date, and semicolons between the elements of time.

Generation of rbac_static.csv used the timestamp function, separate it
into its own, while keeping the old format:
    20260311T11:40:06.013Z

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
(cherry picked from commit 2edf203)
Use the Stdlib's ones

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
(cherry picked from commit 136d3e1)
Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
(cherry picked from commit c4bef5a)
A series of commits to adhere more closely to the recommendations for C
bindings before moving to OCaml 5:

* release/acquire the runtime lock
* don't use *_val macros once the runtime lock is released. Hence, move
these transformations before the FFI call.
* see
https://discuss.ocaml.org/t/ocaml-5-ffi-use-of-int-val-inside-caml-enter-blocking-section/17872/9
for a discussion why the compiler does use these macros in some places
There are some XCP-ng users that have found issues when running th
static-vdi scripts for enabling HA, but some of the logged errors were
red flags, and the actual cause of the issue was not logged.

This PR deploys a few fixes that should make it easier to assess the
root cause, along with xapi-project/backtrace#20

Commits were cherry-picked from #6941
@liulinC liulinC merged commit cf6575b into feature/ldaps Mar 16, 2026
102 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.

5 participants