diff options
author | Sam Betts <sam@code-smash.net> | 2018-05-01 11:02:38 +0100 |
---|---|---|
committer | Kaifeng Wang <kaifeng.w@gmail.com> | 2018-09-07 17:06:35 +0800 |
commit | bd82ead58080fa2b3e9e7b7fcb269a7a0fdc5a48 (patch) | |
tree | 7804968da722e7937b15fcddac2672e14d298db5 /ironic/drivers/modules/image_cache.py | |
parent | 0a10eb7794e1543ce2be09c0a55b62fa005b0710 (diff) | |
download | ironic-bd82ead58080fa2b3e9e7b7fcb269a7a0fdc5a48.tar.gz |
Direct deploy serve HTTP images from conductor
Currently direct deploy only works if temp urls are enabled or if a
HTTP image URL is given. This patch enables Ironic to serve images
directly from the conductor's HTTP server to the agent so that we can
enable agent deploy with out temp urls.
This also has the added benefit for standalone that the conductors will
cache the HTTP URL images and serve them into the provisioning network
meaning the provisioning network has no need for connectivity to the
outside world.
Story: #1598852
Task: #24639
Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: Iae6798616f29d876b274d9e0b44a1eb0f24e1747
Diffstat (limited to 'ironic/drivers/modules/image_cache.py')
-rw-r--r-- | ironic/drivers/modules/image_cache.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ironic/drivers/modules/image_cache.py b/ironic/drivers/modules/image_cache.py index 76b55d51d..0e1f7d35c 100644 --- a/ironic/drivers/modules/image_cache.py +++ b/ironic/drivers/modules/image_cache.py @@ -99,6 +99,11 @@ class ImageCache(object): href_encoded = href.encode('utf-8') if six.PY2 else href master_file_name = str(uuid.uuid5(uuid.NAMESPACE_URL, href_encoded)) + # NOTE(kaifeng) The ".converted" suffix acts as an indicator that the + # image cached has gone through the conversion logic. + if force_raw: + master_file_name = master_file_name + '.converted' + master_path = os.path.join(self.master_dir, master_file_name) if CONF.parallel_image_downloads: |