I believe I understand what's going wrong; thanks to @OddBloke for the tip. tests/vmtests/image_sync.py syncs from the daily link, which is now a URL redirect to stable and as a result, the *content* of the streams file is also renamed:
com.ubuntu.maas:stable:v3:download.json
which used to be
com.ubuntu.maas:daily:v3:download.json
When curtin's image_sync goes to look for the synced content, it would only ever look for the content in these previously downloaded streams data files
If we change the URL to stable, and the STREAM_BASE (which points to the file where vmtest caches which content it pulled down) then the sync works correctly.
To your second question, should curtin use stable or candidate, I believe curtin should test stable primarily and I'd like to add a jenkins job to run candidate.
The challenge is that we can't easily mix the same images repo without a bigger refactor in image_sync.py as the /srv/images/.vmtest_data/* content is coupled to the stream_base.
Depending on how frequently we think we should run against candidate (once a week?) we could sync candidate to a different IMAGE_DIR; and with a fix to accept which stream.
I believe I understand what's going wrong; thanks to @OddBloke for the tip. tests/vmtests/ image_sync. py syncs from the daily link, which is now a URL redirect to stable and as a result, the *content* of the streams file is also renamed:
com.ubuntu. maas:stable: v3:download. json
which used to be
com.ubuntu. maas:daily: v3:download. json
When curtin's image_sync goes to look for the synced content, it would only ever look for the content in these previously downloaded streams data files
If we change the URL to stable, and the STREAM_BASE (which points to the file where vmtest caches which content it pulled down) then the sync works correctly.
So this:
% git diff tests/vmtests/ image_sync. py vmtests/ image_sync. py b/tests/ vmtests/ image_sync. py vmtests/ image_sync. py vmtests/ image_sync. py get(long_ key, os.environ.get(key, default))
diff --git a/tests/
index e460e028..9183f18a 100644
--- a/tests/
+++ b/tests/
@@ -31,10 +31,10 @@ def environ_get(key, default):
long_key = 'CURTIN_VMTEST_' + key
return os.environ.
- get("MAAS_ IMAGE_STREAM" , "stable") SRC_URL' , images. maas.io/ ephemeral- v3/daily/ streams/ v1/index. sjson") images. maas.io/ ephemeral- v3/%s/streams/ v1/index. sjson" % MAAS_STREAM) get("IMAGE_ DIR", "/srv/images")
+MAAS_STREAM = environ_
IMAGE_SRC_URL = environ_get(
'IMAGE_
- "http://
+ "http://
IMAGE_DIR = environ_
KEYRING = environ_get( ftype~( boot-initrd| boot-kernel| root-tgz| squashfs) '] maas:daily' maas:%s' % MAAS_STREAM CONTENT_ ID_PATH_ MAP = { v1/vmtest. json", bases-download" : "streams/ v1/vmtest- centos. json",
@@ -43,7 +43,7 @@ KEYRING = environ_get(
ITEM_NAME_FILTERS = \
['
FORMAT_JSON = 'JSON'
-STREAM_BASE = 'com.ubuntu.
+STREAM_BASE = 'com.ubuntu.
VMTEST_
STREAM_BASE + ":v3:download": "streams/
STREAM_BASE + ":centos-
Fixes things for syncing from stable.
To your second question, should curtin use stable or candidate, I believe curtin should test stable primarily and I'd like to add a jenkins job to run candidate.
The challenge is that we can't easily mix the same images repo without a bigger refactor in image_sync.py as the /srv/images/ .vmtest_ data/* content is coupled to the stream_base.
Depending on how frequently we think we should run against candidate (once a week?) we could sync candidate to a different IMAGE_DIR; and with a fix to accept which stream.