Skip to content
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

fix(xapi)): cannot compare functional values #6034

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

edwintorok
Copy link
Contributor

Fixes: 6635a00 ("CP-49136: Introduce PRNG for generating non-secret UUIDs")

We had a bug that would not fail any unit tests, but XAPI would fail to start

This reproduces the error now:
```
[invalid] compare: functional value
          Raised by primitive operation at Xapi_globs.other_options.(fun) in file "ocaml/xapi/xapi_globs.ml", line 1622, characters 17-59
          Called from Xcp_service.Config_file.dump.(fun) in file "ocaml/xapi-idl/lib/xcp_service.ml", line 145, characters 34-46
          Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
          Called from Xcp_service.configure_common in file "ocaml/xapi-idl/lib/xcp_service.ml", line 432, characters 2-30
          Called from Xcp_service.configure in file "ocaml/xapi-idl/lib/xcp_service.ml", line 461, characters 4-259
          Called from Alcotest_engine__Core.Make.protect_test.(fun) in file "src/alcotest-engine/core.ml", line 181, characters 17-23
          Called from Alcotest_engine__Monad.Identity.catch in file "src/alcotest-engine/monad.ml", line 24, characters 31-35
```

Also print the Failure message in Xcp_service.configure, otherwise it'd exit 1 without saying why if you supply invalid cmdline arguments.

Signed-off-by: Edwin Török <[email protected]>
Fixes: 6635a00 ("CP-49136: Introduce PRNG for generating non-secret UUIDs")

Signed-off-by: Edwin Török <[email protected]>
@edwintorok edwintorok marked this pull request as ready for review October 2, 2024 11:00
@edwintorok edwintorok added this pull request to the merge queue Oct 2, 2024
Merged via the queue into xapi-project:master with commit d23597b Oct 2, 2024
15 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.

4 participants