Comment 1 for bug 1703856

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

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

Output:
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 2dd26c4d4799ebd29fa31e48d49e8e53 |
| container_format | bare |
| created_at | 2017-07-13T11:38:24Z |
| disk_format | iso |
| id | 52ffe21f-398d-4d90-8ad7-0b2667f131a9 |
| min_disk | 0 |
| min_ram | 0 |
| name | dsl |
| owner | 6d3cd4fd4059449286a881373d27f1b2 |
| protected | False |
| size | 10737418240 |
| status | active |
| tags | [] |
| updated_at | 2017-07-13T11:46:30Z |
| 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.