Steps to reproduce by providing invalid URL [valid URL with HTTPS option]: 1) Task API from PostMan :
{ "type": "import", "input": { "import_from": "https://xxxxxxxxxxxxxxx/log.qcow2", "import_from_format": "qcow2", "image_properties": { "disk_format": "qcow", "container_format": "bare", "name": "test-create2xxx" }
} }
Response from Task API :
{ "status": "pending", "created_at": "2018-11-05T10:40:10Z", "updated_at": "2018-11-05T10:40:10Z", "self": "/v2/tasks/2d35894f-24a5-4ab6-8aba-3950008629e6", "result": null, "owner": "47441f261db046f9967ef099877369e4", "input": { "image_properties": { "container_format": "bare", "disk_format": "qcow", "name": "test-create2xxx" }, "import_from_format": "qcow2", "import_from": "https://xxxxxxxxxxxxxxx/log.qcow2" }, "message": "", "type": "import", "id": "2d35894f-24a5-4ab6-8aba-3950008629e6", "schema": "/v2/schemas/task" }
2) Check the Task Progress : { "status": "failure", "created_at": "2018-11-05T10:40:10Z", "updated_at": "2018-11-05T10:42:18Z", "expires_at": "2018-11-07T10:42:18Z", "self": "/v2/tasks/2d35894f-24a5-4ab6-8aba-3950008629e6", "result": null, "owner": "47441f261db046f9967ef099877369e4", "input": { "image_properties": { "container_format": "bare", "disk_format": "qcow", "name": "test-create2xxx" }, "import_from_format": "qcow2", "import_from": "https://xxxxxxxxxxxxxxx/log.qcow2" }, "message": "Task failed due to Internal Error", "type": "import", "id": "2d35894f-24a5-4ab6-8aba-3950008629e6", "schema": "/v2/schemas/task" }
3) Log in to the VIM and view the Image :
[xxxx@undercloud (overcloudrc) ~]$ glance image-show 02503fd9-d29d-4d78-b31d-b6602a229ad1 +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | None | | container_format | bare | | created_at | 2018-11-05T10:40:10Z | | disk_format | qcow | | id | 02503fd9-d29d-4d78-b31d-b6602a229ad1 | | locations | [] | | min_disk | 0 | | min_ram | 0 | | name | test-create2xxx | | owner | 47441f261db046f9967ef099877369e4 | | protected | False | | size | None | | status | saving | | tags | [] | | updated_at | 2018-11-05T10:40:10Z | | virtual_size | None | | visibility | private | +------------------+--------------------------------------+
Steps to reproduce by providing invalid URL [valid URL with HTTPS option]:
1) Task API from PostMan :
{
"import_ from": "https:/ /xxxxxxxxxxxxxx x/log.qcow2",
"import_ from_format" : "qcow2",
"image_ properties" : {
"disk_ format" : "qcow",
"container _format" : "bare",
"type": "import",
"input": {
"name": "test-create2xxx"
}
}
}
Response from Task API :
{ 05T10:40: 10Z", 05T10:40: 10Z", 2d35894f- 24a5-4ab6- 8aba-3950008629 e6", f9967ef09987736 9e4",
"image_ properties" : {
"container _format" : "bare",
"disk_ format" : "qcow",
"import_ from_format" : "qcow2",
"import_ from": "https:/ /xxxxxxxxxxxxxx x/log.qcow2" 24a5-4ab6- 8aba-3950008629 e6",
"status": "pending",
"created_at": "2018-11-
"updated_at": "2018-11-
"self": "/v2/tasks/
"result": null,
"owner": "47441f261db046
"input": {
"name": "test-create2xxx"
},
},
"message": "",
"type": "import",
"id": "2d35894f-
"schema": "/v2/schemas/task"
}
2) Check the Task Progress : 05T10:40: 10Z", 05T10:42: 18Z", 07T10:42: 18Z", 2d35894f- 24a5-4ab6- 8aba-3950008629 e6", f9967ef09987736 9e4",
"image_ properties" : {
"container _format" : "bare",
"disk_ format" : "qcow",
"import_ from_format" : "qcow2",
"import_ from": "https:/ /xxxxxxxxxxxxxx x/log.qcow2" 24a5-4ab6- 8aba-3950008629 e6",
{
"status": "failure",
"created_at": "2018-11-
"updated_at": "2018-11-
"expires_at": "2018-11-
"self": "/v2/tasks/
"result": null,
"owner": "47441f261db046
"input": {
"name": "test-create2xxx"
},
},
"message": "Task failed due to Internal Error",
"type": "import",
"id": "2d35894f-
"schema": "/v2/schemas/task"
}
3) Log in to the VIM and view the Image :
[xxxx@undercloud (overcloudrc) ~]$ glance image-show 02503fd9- d29d-4d78- b31d-b6602a229a d1 ------- -----+- ------- ------- ------- ------- ------- --+ ------- -----+- ------- ------- ------- ------- ------- --+ 05T10:40: 10Z | d29d-4d78- b31d-b6602a229a d1 | 9967ef099877369 e4 | 05T10:40: 10Z | ------- -----+- ------- ------- ------- ------- ------- --+
+------
| Property | Value |
+------
| checksum | None |
| container_format | bare |
| created_at | 2018-11-
| disk_format | qcow |
| id | 02503fd9-
| locations | [] |
| min_disk | 0 |
| min_ram | 0 |
| name | test-create2xxx |
| owner | 47441f261db046f
| protected | False |
| size | None |
| status | saving |
| tags | [] |
| updated_at | 2018-11-
| virtual_size | None |
| visibility | private |
+------