-
Notifications
You must be signed in to change notification settings - Fork 292
Update feature/perf from master #5804
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>
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 <shuntian.liu2@cloud.com>
Introduces percent-decoding back - in the past we used to do urlencode in parse_uri instead. Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>
Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>
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 <andrii.sultanov@cloud.com>
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 <andrii.sultanov@cloud.com>
Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>
Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>
Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>
…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 <bengang.yuan@cloud.com>
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 <alex.brett@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
As per review comment. Signed-off-by: Alex Brett <alex.brett@cloud.com>
Signed-off-by: Edwin Török <edwin.torok@cloud.com>
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 <edwin.torok@cloud.com>
Signed-off-by: Alex Brett <alex.brett@cloud.com>
Coherently use tabs instead of spaces. Just style changes. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
…ov/empty-length-checking IH-640: Eliminate unnecessary usage of List.length to check for empty lists
Signed-off-by: Andriy Sultanov <53952748+last-genius@users.noreply.github.com>
…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 <andrii.sultanov@cloud.com>
…ov/opt-fix Fixes: 99c4356 ("Transition from exception-raising Unix.getenv to Sys.getenv_opt with")
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 <colin.barr@cloud.com>
IH-642: Restructure xs-trace to use Cmdliner
robhoes
approved these changes
Jul 10, 2024
Vincent-lau
approved these changes
Jul 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)