Zun

Comment 3 for bug 1691673

Revision history for this message
cooldharma06 (cooldharma06) wrote :

Hi all,

i have some suggestion regarding this.

Following code changes have to be done in zun:

In this process images are getting downloaded into the /opt/stack/data/zun/images/xxxxxxxxxxxxx.tar file (devstack)

we have to load those images(xxxxx.tar) into the docker repository using following command:

docker load < xxxxxxxxxxxxxxxxxx.tar

but there is a problem the image will be loaded with default name. i.e., if i upload cirros image as cir_updated into glance. After downloading tar file from glance and doing - docker load < xxxxxxxxxxxxxxxx.tar. docker images will show only cirros:latest as the tag name. It wont show cir_updated:latest.

So for this i have two suggestions:
1. We have to edit the manifest.json file which is residing inside the xxxxxxx.tar

[{"Config":"f8ce316a37a79a89cb6f9ef65f23b38893fe291b519a8b18cf08af65872f02a9.json","RepoTags":["cirros:latest"],"Layers":["533e131ca4c4c44518e65b0e4e97fa4e8f694e8508f82763b8bcd3c376335f42/layer.tar","5cdf968d25c374ae189e9454d824bcf7df858f4fb108fa911dbc728f4a4c0802/layer.tar","64fd92eec6d14d474cc7d3321be52c8b7d922ab42c6848de9beb5117914868b0/layer.tar","78fbfd1ba6e559553c5d6d45d4e27a07a1ddcf54d91c14290c012111555d6f54/layer.tar","8d9719d7eab848cd65b3f2db04121dcc849779509c49dcb8dae909e3859d5800/layer.tar"]}]

We can find cirros:latest which we have to change as glance_image-name:latest.

Or

2. After loading the image, add new tag to that loaded image using tag command.
     docker tag docker_image_id glance_imagename:latest
     then remove the old cirros:latest image using docker rmi cirros. So that it will untag the cirros:latest.

Also if we pass image_id as the parameter means we have to get the corresponding image name from glance. and we have to pass image_name instead of image_id.

Please consider if its worth.

thanks & regards,
Dharmalingam S