Prepare for VDI.revert: add tests and robustify error paths (26.1-lcm)#7103
Open
psafont wants to merge 14 commits into
Open
Prepare for VDI.revert: add tests and robustify error paths (26.1-lcm)#7103psafont wants to merge 14 commits into
psafont wants to merge 14 commits into
Conversation
used for running dune in a build root without conflicting with the
normal _build that is used by editors or other tools
This separate directory can be used by setting an environment variable:
DUNE_BUILD_DIR=_mock dune build ocaml/quicktest/ --profile=release -w
Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
This module can help with printing API types, so move it to a new private library so it can be used without compiling the cli server. This is especially interesting for unit tests. Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Makes the distinction between the absence of a value and absence of an error. Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
The lists of operations used in the module need to be a subset of all_ops, otherwise spurious errors can be thrown on runtime. Ensuring these properties allows to drop the runtime check Also add an interface file for the module Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
avoids having unused bindings Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
That's pre-2009 in xapi land Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
No change in behaviour Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
VDIs containing only CDs are immutable and are prevented from being cloned. Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
This is preparation for using VDI.revert. No change in behaviour Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
This moves them outside of the try catch that destroys newly-cloned disks, but this is safe since these don't change the state of the host like the destroy vifs. This allows to simplify the type needed to be able to clean up the new VDIs in case of failure. Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Previously in some parts of the revert, (rare) failures would not induce the deletion of newly cloned VDIs. Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
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
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.
These changes add both unit-tests and quicktests to make sure that regressions introduced with VDI.revert will be visible as early as possible.
In particular:
Changes have been introduced in the error path, now VDIs are properly destroyed in some situation where they were meant to be destroyed, but the code failed to do so, making it more consistent.
This is preparation for the changes to make this proposal a reality: https://github.com/xapi-project/xen-api/blob/master/doc/content/design/snapshot-revert.md
I've run these tests on hosts.