Skip to content

Conversation

edwintorok
Copy link
Contributor

feature/perf cannot be merged currently due to a conflict with master, so it needs another update.
(And github won't let me push to feature/perf directly)

Andrii Sultanov and others added 30 commits June 26, 2024 14:17
Previously xapi calls `set_tls_config` regardless of whether a host
has joined or enabled, which will restart the remote server of
xapi-clusterd. In the meantime, another xapi-clusterd might also be
joining, which causes `distribute_state` to be called while the
remote server is restarting.

Now remove the `set_tls_config`, this is because `join_internal` already
creates a tls_config and passes it to xapi-clusterd, but xapi-clusterd
does not store that tls_config in its db, it just starts the http server
with that tls config. Modifying xapi-clusterd to store that config will
be done in a separate PR. Moreover, `cluster_host.enable` also calls `set_tls_config`,
which means there is no need to call `set_tls_config` if the cluster
host is joined but not enabled.

Also move the observer and watcher creation into the not joined case,
since cluster_host.enable already calls them and there is no need to
call them if the host is not enabled.

This does not, however, solve the whole problem. For that, we need to
make sure that `distribute_state` and `set_tls_config` cannot happen at
the same time. More generally, any remote calls cannot happen while
`tls_config` is running. Hence we need them to hold the same lock. This
will be done in xapi-clusterd.

Signed-off-by: Vincent Liu <[email protected]>
Introduces percent-decoding back - in the past we used to do
urlencode in parse_uri instead.

Signed-off-by: Andrii Sultanov <[email protected]>
explicit handling of failure cases.

OCaml's stdlib has Sys.getenv_opt since 4.05. Some of the newer code
already uses it, and some of the old code handled exceptions (so
could nicely be transitioned to handling options instead). Some,
however, did not handle failure at all. This commit remedies that.

In most cases, getenv is used to query the PATH variable (before
adding another directory to it, for example), in which case there is
a nice default value of "". In some cases, the environment variable
is required to be present to proceed, then there is a failure of some
kind raised with the appropriate message.

A test case was added to the quality-gate.sh script to prevent
introduction of the exception-raising Unix.getenv into new code.

Signed-off-by: Andrii Sultanov <[email protected]>
This avoids two traversals in the cases where Hashtbl.mem is used
right before Hashtbl.find: avoiding two traversals,
possible data races and the possibility where one
would be changed without the other, introducing bugs.

Additionally, it handles failure explicitly where it wasn't
handled before, and moves from exception handling to matching on options
resulting in intentions becoming clearer.

This commit only changes trivial cases where little refactoring was
necessary.

Signed-off-by: Andrii Sultanov <[email protected]>
Signed-off-by: Andrii Sultanov <[email protected]>
…ov/uri-improvement

Remove parse_uri, switch to using Uri module instead
datamodel_lifecycle.ml needs to be bumped to 24.18.0-next for anti-affinity change.

Signed-off-by: Bengang Yuan <[email protected]>
DRAC power on support relies upon a Dell supplemental pack which is no longer
available, so remove it.

Add IPMI power on support using ipmitool, which should work with virtually any
modern server which has a BMC, regardless of vendor.

Signed-off-by: Alex Brett <[email protected]>
As per review comment.

Signed-off-by: Alex Brett <[email protected]>
2.0.2 dropped Fd_send_recv.Unix_error, and only raises Unix.Unix_error (Although the type itself is still present for backwards compatibility).

Catch both exceptions, this now passes on both OCaml 4 and OCaml 5.2.

Eventually we'll want to drop the Fd_send_recv.Unix_error from here and from the library itself once we've updated to it.

Signed-off-by: Edwin Török <[email protected]>
Coherently use tabs instead of spaces.
Just style changes.

Signed-off-by: Frediano Ziglio <[email protected]>
…ov/empty-length-checking

IH-640: Eliminate unnecessary usage of List.length to check for empty lists
…ov/opt-refactoring

IH-633: Transition away from exception-raising Hashtbl.find and Unix.getenv
IH-621: Add IPMI host power on support and remove DRAC
…ls-config

CA-392887: `set_tls_config` immediately after enabling clustering
….getenv_opt with")

Signed-off-by: Andrii Sultanov <[email protected]>
…ov/opt-fix

Fixes: 99c4356 ("Transition from exception-raising Unix.getenv to Sys.getenv_opt with")
Colin James and others added 3 commits July 9, 2024 12:29
The xs-trace utility is restructured to enhance its readability and, to aid
with potential future extension, its CLI is reimplemented in terms of Cmdliner.

It is hoped that the current command modes are consistent with what was already
expected by xs-trace, i.e. xs-trace (cp|mv) <src> <endpoint>

These changes should make it simpler to extend this utility with more
functionality. For example, there is an idea to add some short conversion
routines from Zipkinv2 to Google's Catapult trace format - so that single
host triaging can bypass heavy distributed tracing services and use
functionality built into Chrome (or the online Perfetto trace viewer).

Signed-off-by: Colin James <[email protected]>
IH-642: Restructure xs-trace to use Cmdliner
@robhoes robhoes merged commit e3d84de into xapi-project:feature/perf Jul 10, 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.

8 participants