-
Notifications
You must be signed in to change notification settings - Fork 19
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
[smapiv3 merge] Rewrite using rpclib #85
Conversation
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
This can be merged at any time, because currently it's not pinned to the target branch. |
We'll have to reset master to this branch, because they have diverged 😮 |
Reviewed 25 of 44 files at r1, 1 of 1 files at r2, 9 of 11 files at r3, 3 of 6 files at r4, 1 of 3 files at r5, 120 of 121 files at r6, 3 of 6 files at r7. update_gh_pages.sh, line 34 at r7 (raw file):
BTW you can use generator/lib/common.ml, line 20 at r7 (raw file):
BTWS is it worth to keep using generator/lib/control.ml, line 10 at r7 (raw file):
Docstring is wrong, it should say the 'operation has been canceled' generator/lib/control.ml, line 289 at r7 (raw file):
BTW should we use int64 here too for consistency? generator/lib/control.ml, line 295 at r7 (raw file):
Why are the types different for volume1 and volume2, are they named parameters? generator/lib/control.ml, line 307 at r7 (raw file):
drop the ; generator/lib/control.ml, line 308 at r7 (raw file):
is ; needed here? generator/lib/data.ml, line 27 at r7 (raw file):
What is the dummy for? Comments from Reviewable |
update_gh_pages.sh, line 34 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
Thanks, fixed! Comments from Reviewable |
generator/lib/common.ml, line 20 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
Yes, we can use ocaml comments most of the time, but not always - I'm planning to investigate & convert these later. Comments from Reviewable |
generator/lib/control.ml, line 10 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
Well spotted! Fixed it. Comments from Reviewable |
generator/lib/control.ml, line 289 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
I used int here because users are not supposed to list changed blocks for such a large extent length that would require an int64 - that would result in significant memory usage. (CA-290243) Comments from Reviewable |
generator/lib/control.ml, line 295 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
Exactly, the params have to be named for the Python generation to work (they are put into json dictionaries), that's why we need two different params with two different names. Comments from Reviewable |
generator/lib/control.ml, line 307 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
Well spotted! Comments from Reviewable |
generator/lib/control.ml, line 308 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
Well spotted! Comments from Reviewable |
generator/lib/data.ml, line 27 at r7 (raw file): Previously, edwintorok (Török Edwin) wrote…
Good point, now we can drop this! There was a bug in rpclib which caused a fatal warning for structs with only one field. Comments from Reviewable |
generator/lib/data.ml, line 27 at r7 (raw file): Previously, gaborigloi wrote…
Comments from Reviewable |
Review status: 161 of 167 files reviewed, all discussions resolved (waiting on @edwintorok) generator/lib/control.ml, line 289 at r7 (raw file): Previously, gaborigloi wrote…
OK. In practice you only loose 1 bit on 64-bit architectures, so int should be fine, we do not run on 32-bit architectures anyway. Comments from Reviewable |
Reviewed 2 of 44 files at r1, 1 of 6 files at r7, 3 of 3 files at r8. generator/lib/control.ml, line 27 at r8 (raw file):
Could we use generator/lib/control.ml, line 117 at r8 (raw file):
Didn't we drop URIs in favour of device-config? I'm a bit confused why its still here. generator/lib/control.ml, line 132 at r8 (raw file):
What units does granularity use, is it bytes? generator/lib/control.ml, line 133 at r8 (raw file):
Could we define a base64 abstract Rpc type and conversion functions to/from string?
generator/lib/control.ml, line 133 at r8 (raw file):
What is the meaning of the bitmap? bit is set if block has changed? generator/lib/control.ml, line 134 at r8 (raw file):
Will this be a single struct, or a list of extents (list of changed_blocks chunks) like we have in sparse_dd? generator/lib/control.ml, line 283 at r8 (raw file):
It is slightly confusing to have both parameter types and methods declared at topmost level. generator/lib/control.ml, line 302 at r8 (raw file):
We've already released API version 4, so this should be version 5. We've got plenty of integers, lets not worry about keeping them low :) generator/lib/control.ml, line 420 at r8 (raw file):
Version 5 please, we already released version 4. generator/lib/data.ml, line 179 at r8 (raw file):
Already released version 4, lets start from 5 here. generator/lib/data.ml, line 217 at r8 (raw file):
Where is blocklist defined? generator/lib/data.ml, line 227 at r8 (raw file):
Will this use NBD over TLS? Would be good if we can ensure that this path is always encrypted. generator/lib/data.ml, line 255 at r8 (raw file):
I would've expected the Task interface to be used here, any reason why it isn't? generator/lib/data.ml, line 283 at r8 (raw file):
Does this mean that all SMAPIv3 SRs must support CBT if they support SxM? generator/lib/data.ml, line 297 at r8 (raw file):
Would be good if there was another optional operation available here that took a snapshot and calculated a SHA256 (or some other) hash of the VDI, and then did the same on the destination after all (delta) copies have finished. generator/lib/plugin.ml, line 4 at r8 (raw file):
What happend to the Unimplemented exception here? Or do we simply require all plugin methods to be implemented? generator/lib/plugin.ml, line 28 at r8 (raw file):
Could we use an enum here, or the "wire" format would not be compatible? generator/lib/plugin.ml, line 34 at r8 (raw file):
Same question here, would using an enum break the 'wire API'? Unfortunately Plugin is the one API we cannot break, because it is the one used to determine the version number of the plugin. generator/lib/plugin.ml, line 80 at r8 (raw file):
1.0 is correct here, we can't ever change this API, see above. generator/lib/plugin.ml, line 87 at r8 (raw file):
This seems to have been taken from the wrong place. This is Plugin.ml, so it should say something like the old one did
generator/lib/task.ml, line 1 at r8 (raw file):
Is this the equivalent of the Task API from https://github.com/xapi-project/xcp-idl/blob/b062924ccc99713e9836e5c9b33b30734febce85/storage/storage_interface.ml#L168-L192 generator/lib/task.ml, line 14 at r8 (raw file):
There is also a Mirror.id in the xcp-idl enum, is that needed here? generator/lib/task.ml, line 33 at r8 (raw file):
subtasks, debug_info and backtrace are missing compared to xcp-idl. Comments from Reviewable |
generator/lib/control.ml, line 27 at r8 (raw file): Previously, edwintorok (Török Edwin) wrote…
No, sadly that didn't work, it confused the ppx somehow :/ Comments from Reviewable |
generator/lib/control.ml, line 117 at r8 (raw file): Previously, edwintorok (Török Edwin) wrote…
These URIs are different, they are for accessing the data of the Volume via a datapath plugin, not for identifying or locating it. We use them in xapi-storage-script to select a datapath based on the URI scheme, in Comments from Reviewable |
generator/lib/control.ml, line 132 at r8 (raw file): Previously, edwintorok (Török Edwin) wrote…
Yes, I think that makes the most sense, I'll document that Comments from Reviewable |
generator/lib/control.ml, line 133 at r8 (raw file): Previously, edwintorok (Török Edwin) wrote…
I think we should leave it in base64 for now, because that is the format we return from the relevant XenAPI call, and in the current CBT implementation we pass it up from SM without conversion to/from base64. Comments from Reviewable |
generator/lib/control.ml, line 134 at r8 (raw file): Previously, edwintorok (Török Edwin) wrote…
The API is now chunked, we have to request changed blocks for a sub-area of the disk, and pass in the offset, and the length. This is to fix the issue you mention about excessive memory consumption etc. Comments from Reviewable |
generator/lib/control.ml, line 133 at r8 (raw file): Previously, edwintorok (Török Edwin) wrote…
Yes, I've updated the docs Comments from Reviewable |
Reviewed 1 of 1 files at r9. generator/lib/control.ml, line 117 at r8 (raw file): Previously, gaborigloi wrote…
Perhaps say that it can be used to 'by a datapath plugin for I/O' instead of just I/O generator/lib/control.ml, line 121 at r8 (raw file):
typo: /he list/the list/ generator/lib/control.ml, line 133 at r8 (raw file): Previously, gaborigloi wrote…
can you define a generator/lib/control.ml, line 134 at r8 (raw file): Previously, gaborigloi wrote…
Thanks, would it help to include in the reply the offset and length, so the struct is self-contained and unambiguously describes a changed block chunk? Comments from Reviewable |
generator/lib/control.ml, line 283 at r8 (raw file): Previously, edwintorok (Török Edwin) wrote…
Good idea, I've done this for all affected params, I think for now they are not needed elsewhere. Comments from Reviewable |
It doesn't show up in reviewable or github. Did you push the branch, or is github lagging behind? Review status: complete! all files reviewed, all discussions resolved Comments from Reviewable |
I did push the branch 🤔 Comments from Reviewable |
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
…ling of unicode, with format being better. Signed-off-by: Mark Syms <mark.syms@citrix.com>
The interface and examples are generated by ocaml-rpc Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Now the generator module provides the library too, since the bindings are generated by ocaml-rpc itself. Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
These are the same as in SMAPIv2 Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
…for Volume Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
I've cleaned up the commit history, now it's ready for merging. Comments from Reviewable |
Review status: complete! all files reviewed, all discussions resolved Comments from Reviewable |
I've moved the
feature/REQ477/master
branch to the base commit where I started from, so that all my changes are visible here.This change is