Initial finding:
This is something related to uwsgi socket timeout. Default value for socket-timeout is 30 in /etc/glance/glance-uwsgi.ini file.
For testing purpose I have tried to create 10 GB image using create command:
$ time glance --debug image-create --name dsl --file gentoo_root.img --disk-format iso --container-format bare
real 2m48.539s
user 0m4.076s
sys 0m10.012s
It has failed with “502 bad gateway” after 3 minutes. Then I have increased this timeout to 60 and restarted glance-api service and ran above command again.
$ time glance --debug image-create --name dsl --file gentoo_root.img --disk-format iso --container-format bare
Initial finding: glance- uwsgi.ini file.
This is something related to uwsgi socket timeout. Default value for socket-timeout is 30 in /etc/glance/
For testing purpose I have tried to create 10 GB image using create command:
$ time glance --debug image-create --name dsl --file gentoo_root.img --disk-format iso --container-format bare
real 2m48.539s
user 0m4.076s
sys 0m10.012s
It has failed with “502 bad gateway” after 3 minutes. Then I have increased this timeout to 60 and restarted glance-api service and ran above command again.
$ time glance --debug image-create --name dsl --file gentoo_root.img --disk-format iso --container-format bare
Output: ------- -----+- ------- ------- ------- ------- ------- --+ ------- -----+- ------- ------- ------- ------- ------- --+ 29fa31e48d49e8e 53 | 13T11:38: 24Z | 398d-4d90- 8ad7-0b2667f131 a9 | 286a881373d27f1 b2 | 13T11:46: 30Z | ------- -----+- ------- ------- ------- ------- ------- --+
+------
| Property | Value |
+------
| checksum | 2dd26c4d4799ebd
| container_format | bare |
| created_at | 2017-07-
| disk_format | iso |
| id | 52ffe21f-
| min_disk | 0 |
| min_ram | 0 |
| name | dsl |
| owner | 6d3cd4fd4059449
| protected | False |
| size | 10737418240 |
| status | active |
| tags | [] |
| updated_at | 2017-07-
| virtual_size | None |
| visibility | shared |
+------
real 8m12.245s
user 0m4.416s
sys 0m10.212s
After this I was able to create image without any issue.
So another workaround is to set socket-timeout to higher value in /etc/glance/ glance- uwsgi.ini file.