Skip to content

CP-53951: XAPI should not depend on libssl#6366

Merged
edwintorok merged 2 commits into
xapi-project:masterfrom
edwintorok:pr/ssl
Apr 8, 2025
Merged

CP-53951: XAPI should not depend on libssl#6366
edwintorok merged 2 commits into
xapi-project:masterfrom
edwintorok:pr/ssl

Conversation

@edwintorok
Copy link
Copy Markdown
Member

@edwintorok edwintorok commented Mar 18, 2025

It usually uses stunnel for that purpose, and we don't want XAPI to be affected by OpenSSL bugs directly.

We can't completely drop openssl because sparse_dd relies on it, but that is a separate executable.

@edwintorok edwintorok requested a review from incipit0 March 18, 2025 14:23
Comment thread ocaml/xapi/check-no-lwtssl.sh Fixed
Comment thread ocaml/xapi/check-no-lwtssl.sh Fixed
Copy link
Copy Markdown
Contributor

@last-genius last-genius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If some command was used to automatically reformat the dune file, it should be noted in the commit message

@edwintorok
Copy link
Copy Markdown
Member Author

edwintorok commented Mar 18, 2025

If some command was used to automatically reformat the dune file, it should be noted in the commit message

My editor did it via LSP. Although this should be equivalent:

dune format-dune-file dune >x && mv x dune

We could also enable it globally in dune-project, we only have it enabled for OCaml files.

Added a note into the commit message.

Comment thread ocaml/xapi/sparse_dd_wrapper.ml
Used `dune format-dune-file dune >x && mv x dune`.
Can also be done via LSP.

No functional change.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
XAPI dependended on vhd_lib, which depends on ssl and lwt.
XAPI is not yet ready for Lwt (and mixing Lwt with blocking code is not a good idea).

The library was only used to gain access to 1 variant used for parameter passing inside XAPI.
Replace this with a polymorphic variant, and drop the dependency.
Also allows to drop a match case that was dead code (proto was only ever set to NBD).

Fixes: 044dc15 ("CP-45016: Add support for specifying nbd export in sparse_dd")

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
@edwintorok edwintorok added this pull request to the merge queue Apr 8, 2025
Merged via the queue into xapi-project:master with commit f51eba2 Apr 8, 2025
29 of 30 checks passed
@edwintorok edwintorok deleted the pr/ssl branch March 13, 2026 15:31
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