This is a rather beefy change due to the number of usages of this
import. The changes are trivial though.
Change-Id: I7badeeaca438b0291f4ed86670e7f217e6372c61
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
When we stage an image, we know the image size, so we should set it.
Since the user may be streaming an image and did not declare the
expected size, this lets them confirm before they import. It also
provides us a value to count for the staging quota coming in a later
patch.
The bulk of this change is adjusting existing tests to validate the
size for all of our stage/import tests.
This follows the change to set the image size during conversion,
ensuring that we can set it during stage for non-conversion jobs,
and that the conversion code that re-sets it after changing the
image data and size continues to work.
Related to blueprint glance-unified-quotas
Change-Id: I93a9145df27594a0cc59828619a7d0573e58d4fc
The wait_for_copying() helper will exit the loop if the *last*
store is found in the list, instead of *all* of them. This technically
works if the stores are processed in the same order we are checking,
but it's fragile and likely to fail in confusing ways.
This makes us only exit if all of them are present.
Change-Id: I8d9ba50f46e22b6740fdbdec6f8ef7c61dddbcf1
This test currently simulates failure by pre-deleting the store
directory for 'file3' which is the second of a two-store import
operation. The goal is to assert that the later failure reverts
the import of the earlier 'file2' store. However, the way the
polling loop works is that we break out once 'file2' has completed,
and then assume that 'file3' has already failed and reverted.
This is a race, and one we're losing consistently in CI.
This patch waits for the failure of 'file3' to be reported, as
well as the revert of 'file2' to occur before exiting the polling
loop and checking the final state of things to ensure that the
revert has actually happened. This addresses the non-determinism
inherent in the original test.
Change-Id: I11c7edaefc96236d2757acfb70d9c338c0f51348
Added new import method 'copy-image' which will copy existing image into
specified list of stores. Introduced additional task which will serve
as internal plugin which will allow copying existing image into staging
area and then this data will be uploaded to specified stores via regula
import flow.
NOTE: This new import method 'copy-image' is only supported if multiple
stores are enabled in deployment.
APIImpact
Implements: blueprint copy-existing-image
Change-Id: I13eaab7ab013f44ce18465bdbdbe8052942570ff
Refactor the image functional tests to pull common code into a
utility function and add multihash checks to those functional tests
that are only checking that the legacy checksum is set correctly.
Change-Id: If4e2dbb6db2bee0b8d8e307ce2f7f7bd15cddea8
Replace strategy of time.sleep(s_value) waiting for an image to
reach 'active' with a time-bounded wait-for-status loop function.
That way we can have a more generous s_value, which seems to
sometimes be needed in the gates, without having to use that much
time on every run.
I picked the initial s_value as 4x what was in the current code,
though given that some of the other gate tests run >1 hour, we could
easily make it 600 sec without lengthening the current minimum
time-to-verification of a patch.
Closes-bug: #1767142
Change-Id: Ib771079348d22212c7b6d90fa89e7fd4161422d3