The 'disks' key will now be treated as a dictionary where all previous
global settings can be individually applied. Additionally, a disk can be
pre-created and provided for use by qemu.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The '--import-only' optional can be combined with either a
'--source-spec' or '--source-spec-path' optional to define
the source for the read-only import.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When using the non-legacy mode image migration, the 'rbd status'
command will now show the source-spec for the migration if the
source pool id is invalid.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When long command names and long optional names are combined,
it's possible for the help text to be printed beyond the 80
character limit.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Read requests will always need to go via the image dispatch layer to
ensure migrations are properly handled.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When in import-only mode, allow the source image to be opened by
name in case it's a V2 image format w/o its image id specified in
the JSON.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
To remain consistent between the native which will automatically close
the ImageCtx if it fails to open the image, the raw format should also
close the ImageCtx.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
For backing source formats that don't care about the low-level
RBD layout details, provide safe default values for the layout
to ensure that striping logic will still function.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the "list_snaps" IO call returns immediately, it can result
in an attempted recursive lock starting from CopyupRequest.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The migration prepare operation will need to know the size of
the source image so that it can create the destination image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When preparing an import, the native format can not expect to have
the child image opened since it hasn't been created yet.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
These related methods accept a JSON-encoded source-spec that
describes how to read from the source image. The migration is
a one-way operation, so children/groups/etc won't be updated
to point to the new destination image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When migrating from an import-only source-spec like an external
file, it will be important to also store the progress on the
destination image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Remove all the hard-coded references to the NativeFormat
handler and allow the RawFormat+FileStream handlers to be
instantiated.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Remove the dependency on the MigrationInfo struct and allow the native
format to directly pull parameters from the JSON-encoded object
structure.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
there is chance that new pg_temp_wanted is added when we are sending
them in ShardServices::send_pg_temp(), but the pg temp are already
collected into the messages before seastar::parallel_for_each(). so,
we cannot move all elements from pg_temp_wanted to pg_temp_pending after
sending the messages, that'd also move the unsent pg temps to
pg_temp_pending as well. so we have to do this before do the async call,
this issue was root caused by Xuehan Xu <xxhdx1985126@gmail.com>.
Signed-off-by: Kefu Chai <kchai@redhat.com>
there is no need to define a wrapper for moving pg_temp_wanted to
pg_temp_pending. and it hurts the readability.
Signed-off-by: Kefu Chai <kchai@redhat.com>
seastar always uses GCC-9 and up, so there is no need to check for
the existence of map::merge() before using it anymore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
also use lua assert() in uni tests instead of print()
fix bug when accessing user id in an ACL grant
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
crimson/gtest_seastar: do not keep a copy of argv
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Ronen Friedman <rfriedma@redhat.com>