If location URL looks like scp address: http://some_address:~/some_image then glance accepts this address
and creates a malformed image.
The problem here is because python http_client lib is trying to
recognize '~' as port but it is not acceptable port name.
The lib generates an InvalidURL exception but this exception is
hidden in one of universal catchers(except Exception).
We need to validate port name (is present before passing it to
http_client lib.
Change-Id: I36dddf7059711fb15ecb1fec4e438daf2bffcb60
Closes-bug: #1485792
(cherry picked from commit caf646af81118af114d38320b83146ff6ae95a07)
Reviewed: https:/ /review. openstack. org/229323 /git.openstack. org/cgit/ openstack/ glance_ store/commit/ ?id=dddb6f3357f 1b9bbe52759b3bd 1f3056aafcb168
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit dddb6f3357f1b9b be52759b3bd1f30 56aafcb168
Author: Kairat Kushaev <email address hidden>
Date: Tue Aug 18 01:34:58 2015 +0300
Catch InvalidURL when requesting store size
If location URL looks like scp address: some_address:~/some_image then glance accepts this address
http://
and creates a malformed image.
The problem here is because python http_client lib is trying to
recognize '~' as port but it is not acceptable port name.
The lib generates an InvalidURL exception but this exception is
hidden in one of universal catchers(except Exception).
We need to validate port name (is present before passing it to
http_client lib.
Change-Id: I36dddf7059711f b15ecb1fec4e438 daf2bffcb60 114d38320b83146 ff6ae95a07)
Closes-bug: #1485792
(cherry picked from commit caf646af81118af