-
Notifications
You must be signed in to change notification settings - Fork 292
Backports from Master #3712
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
Backports from Master #3712
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
My commits look correct, I think we'd have to backport this too if we haven't done it already: xapi-project/xen-api-libs-transitional#41 |
The commits for xen-api-libs-transitional are on the 1.0-lcm branch and already.
|
… current task being early marked completed This issue is raised found due to on forwarded task, some call further to be forwarded will still be done in the same task so resulting the current task marked as completed when the forwarding call completes (actually should be some sub task). In some situation, this will cause further issue like task being destroyed by GC. The original issue is from pool.hello. However when making code change, similar issue is spotted in xapi_host.ml. So similar changes is done for xapi_host.ml. Signed-off-by: YarsinCitrix <yarsin.he@citrix.com>
Move `exec` into `exec_with_context` to simplify the code. Signed-off-by: Yang Qian <yang.qian@citrix.com>
When master forward a task to slave, slave will mark the task as completed once finish processing it, however when master finishing the forwarding, it will also mark the task as completed. Furthermore, when slave finished the task, that does not mean the task is done, there may be some stuff that master has to handle, so we have to ensure the task only complete once the master finish its work. For the task forwarded from client, which called with `exec_with_forwarded_task`, we also have to complete it once it finished. Signed-off-by: Yang Qian <yang.qian@citrix.com>
…current state In CA-286364, a reboot happened on a VM that had PV tools installed. This triggered xapi's updates-from-xenopsd to look at the new state. This was slow for other reasons and by the time we were looking at the events the VM had reloaded its PV drivers. When we notice a VM has a different start time we delete and recreate the guest metrics. This object was, prior to this change, created with `PV_drivers_detected` taking the default value of `false`. We then took a look at the value of 'PV_drivers_detected' in the current state of the VM and noticed that it hadn't changed since we last looked at it (before the VM rebooted) - so we didn't set the field in the database. The change in this CS ensures we always create the guest_metrics with the current state of the VM, which we were already doing for all other fields in `VM_guest_metrics`. Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
…etwork is added, 'Networking' tab of the VM shows incorrect information. Signed-off-by: minglumlu <ming.lu@citrix.com>
This makes debugging easier, otherwise you can't see where the exception is raised from. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Signed-off-by: Edwin Török <edvin.torok@citrix.com>
HA VM restarts need to happen in the order defined by the HA policy and handle failures. The initial implementation used code specialized to do that by preparing a record with VMs and tasks, sorting them, retrying them, but it soon became unreadable and each slight modification required large restructuring in the code. The code is simpler and more readable if we introduce a general purpose mechanism for performing actions after a task has finished, and for automatically grouping actions by an order number and launching them in parallel. The abstraction used is a monad, however the knowledge of monads is kept minimal by having the naming and documentation in the code refer to tasks and actions, rather than abstract monad concepts. The code tries to be careful about exceptions, and wraps them in a Result type. This is the just the helper module implementation. Note for backporting: older versions will not have a result module, you need to define: ``` module Result = struct type 'a result = Ok of 'a | Error of 'a end let (|>) x f = f x ``` `Xapi_stdext_std` is just `Stdext` 'let open ... in' probably needs to be replaced with an open at toplevel To make backporting easier GADTs are not used here, and changes are contained in a single file. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
…lure HA VM restarts need to happen in the order defined by the HA policy. We can restart all VMs with start order 0 in parallel, wait until all of them are started (or failed), then start all with order 1, etc. We also need to support retrying after failures. Best effort VMs are now also sorted and restarted based on start order, and in parallel. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
…n scheme There's a firstboot script that attempts to prevent the new logrotate script running when you've got the old-style partition layout. It does this by moving the cron file aside. Unfortunately the cron file belongs to the xapi RPM and hence installing any newer xapi-core RPM puts the file back in place. This is a quick-fix solution that applies the same logic that the firstboot script uses to detect old-style partitioning and bails out if it sees it. Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
edwintorok
approved these changes
Sep 24, 2018
robhoes
approved these changes
Sep 24, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked the other ones, and it looks fine.
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.
This PR contains a series of backports from the master branch. All commits were cherry-picked and did not require manual changes. Below are the key commits:
restart_auto_run_vms
Jon Ludlam