glance fails to import image as image has been saved on a diffrent host to the one where API request has been sent.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
New
|
Undecided
|
Unassigned |
Bug Description
**Environment**:
* OS ubunut 20.04
* Kolla-Ansible version Xena
* Docker image Install type source
* Docker image distribution: ubuntu
* Are you using official images: Yes
As in summary, I have 3x node HA cluster. HAProxy is in the default load balancing algorithm, I haven't seen it with small images, but with big images, I've tried 20GB and 50GB win10 images. The image has been saved in glance staging directory on one node, but then the request has been sent to another glance container on another host, and I can see the following ERROR in the logs. The image is correctly transferred and I can see it in another host but glance won't attempt to re-run the importing stage and probably won't know anyway where the file is, has 33% chance of getting it right. When I've added hash-type consistent to glance-api.cfg in haproxy it's all working as expected.
```
Task 'api_image_
5 predecessors (most recent first):
Flow 'api_image_
|__Atom 'api_image_
|__Atom 'api_image_
|__Atom 'api_image_
|__Flow 'api_image_import': FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
2022-07-22 11:45:06.540 974 ERROR glance.
```
```
ubuntu@
frontend glance_api_front
mode http
http-request del-header X-Forwarded-Proto
timeout client 6h
option httplog
option forwardfor
http-request set-header X-Forwarded-Proto https if { ssl_fc }
bind 172.16.71.20:9292 ssl crt /etc/haproxy/
default_backend glance_api_back
backend glance_api_back
mode http
timeout server 6h
hash-type consistent
server infra-az1-1 172.16.71.4:9292 check inter 2000 rise 2 fall 5
server infra-az2-1 172.16.71.5:9292 check inter 2000 rise 2 fall 5
server infra-az3-1 172.16.71.6:9292 check inter 2000 rise 2 fall 5
frontend glance_
mode http
http-request del-header X-Forwarded-Proto
timeout client 6h
option httplog
option forwardfor
http-request set-header X-Forwarded-Proto https if { ssl_fc }
bind 172.16.72.20:9292 ssl crt /etc/haproxy/
default_backend glance_
backend glance_
mode http
timeout server 6h
hash-type consistent
server infra-az1-1 172.16.71.4:9292 check inter 2000 rise 2 fall 5
server infra-az2-1 172.16.71.5:9292 check inter 2000 rise 2 fall 5
server infra-az3-1 172.16.71.6:9292 check inter 2000 rise 2 fall 5
```