Ask Your Question
0

Glance docker images not created, always in SAVING state

asked 2015-07-14 03:52:06 -0500

Ram.Meena gravatar image

Hi,

I have installed Openstack Kilo on Ubuntu 14.04 and integrated glance with docker. but when I run glance image-create command, images are always in saving state.

root@controller:~# docker save cirros | glance image-create --visibility public --container-format=docker --disk-format=raw --name cirros --progress
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | None                                 |
| container_format | docker                               |
| created_at       | 2015-07-14T08:36:52Z                 |
| disk_format      | raw                                  |
| id               | 3edeb153-252f-4065-af61-f9628c3c5873 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros                               |
| owner            | b48769b527734606a42bf9e69e8e9b14     |
| protected        | False                                |
| size             | None                                 |
| status           | queued                               |
| tags             | []                                   |
| updated_at       | 2015-07-14T08:36:52Z                 |
| virtual_size     | None                                 |
| visibility       | public                               |
+------------------+--------------------------------------+
write /dev/stdout: broken pipe

root@controller:~# nova image-list
+--------------------------------------+---------------------+--------+--------+
| ID                                   | Name                | Status | Server |
+--------------------------------------+---------------------+--------+--------+
| 24a1275d-ffa1-487a-aef0-0b79a6808e58 | Ubuntu-Trusty       | ACTIVE |        |
| ed5a37a3-717d-41e6-a073-88b6037f10dd | cirros              | SAVING |        |
| fa543735-28a8-4445-899c-e00747e88478 | cirros              | SAVING |        |
| 14954dd5-bc42-4f70-be59-c8c839ed72dc | cirros-0.3.4-x86_64 | ACTIVE |        |
+--------------------------------------+---------------------+--------+--------+

There is no error in logs of glance api and registry.

I have below configure in glance-api.conf:

[image_format]
container_formats = ami,ari,aki,bare,ovf,docker

[glance_store]
default_store = file
filesystem_store_datadir = /var/lib/glance/images/

If I create normal images it works fine but when I create images with docker save, it gives error 'write /dev/stdout: broken pipe' and images are always in saving state.

Please suggest.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2015-07-14 04:28:50 -0500

dbaxps gravatar image

updated 2015-07-14 04:31:28 -0500

I believe you are missing "docker pull". Could you test :-

#  . keystonerc_admin
#  docker pull rastasheep/ubuntu-sshd:14.04
#  docker save rastasheep/ubuntu-sshd:14.04 | glance image-create --is-public=True   --container-format=docker --disk-format=raw --name rastasheep/ubuntu-sshd:14.04

Either build image locally && upload like this
Follow https://github.com/tutumcloud/tutum-u...

[root@WorkstationF22 ~(keystone_admin)]#  docker save tutum/ubuntu:vivid  | \
glance image-create --is-public=True   --container-format=docker \
--disk-format=raw --name tutum/ubuntu:vivid
edit flag offensive delete link more

Comments

I have already pulled the images..you can check below output:

ubuntu@controller:~$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
cirros              latest              d8de71c04044        11 weeks ago        7.698 MB
Ram.Meena gravatar imageRam.Meena ( 2015-07-14 04:56:03 -0500 )edit

Please pull in native docker image like rastasheep/ubuntu-sshd:14.04
Just to test

dbaxps gravatar imagedbaxps ( 2015-07-14 04:58:35 -0500 )edit

I am pulling it now...:)

Ram.Meena gravatar imageRam.Meena ( 2015-07-14 05:04:08 -0500 )edit

Still same error 'write /dev/stdout: broken pipe' and image is in 'SAVING' state.

Ram.Meena gravatar imageRam.Meena ( 2015-07-14 05:22:07 -0500 )edit
0

answered 2015-08-28 08:34:27 -0500

daikk115 gravatar image

updated 2015-08-28 11:35:27 -0500

I also had a similar error and i fix it like this:


Create one file .tar empty : create one file any and

tar cf file.tar file

tar --delete -f file.tar file


Save image docker into file.tar

docker save cirros > file.tar


Create image glance from file tar

glance image-create --name "cirros-0.3.4-x86_64" --file /dir/file.tar --disk-format raw --container-format docker --visibility public --progress


I hope it can help you.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-07-14 03:52:06 -0500

Seen: 951 times

Last updated: Aug 28 '15