yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #49500
[Bug 1570801] [NEW] tasks: disk_format ignored when 'work_dir' is set
Public bug reported:
If, in glance-api.conf work_dir is not defined:
[task]
#work_dir
The following API call (with disk_format=qcow2):
POST /v2/tasks HTTP/1.1.
User-Agent: curl/7.38.0.
Host: localhost:9292.
Accept: */*.
x-auth-token: 1acdf9b1f89f4aaf983079250fcefb3d.
Content-Length: 232.
Content-Type: application/x-www-form-urlencoded.
.
{
"type": "import",
"input": {
"import_from": "http://localhost:54321/hi.txt",
"import_from_format": "bare",
"image_properties": {
"name": "imgx",
"disk_format": "qcow2",
"container_format": "bare"
}
}
}
results in an image with disk_format qcow2:
$ glance image-show e315a86f-5b58-478a-9f34-c99f2d6e8365
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 764efa883dda1e11db47671c4a3bbd9e |
| container_format | bare |
| created_at | 2016-04-15T11:01:52Z |
| disk_format | qcow2 |
| id | e315a86f-5b58-478a-9f34-c99f2d6e8365 |
| min_disk | 0 |
| min_ram | 0 |
| name | imgx |
| owner | 3f2ce9bf40a443f2b072a69ff10bba92 |
| protected | False |
| size | 3 |
| status | active |
| tags | [] |
| updated_at | 2016-04-15T11:01:54Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
If the work_dir is defined
[task]
work_dir = /tmp/work
and the same API call is made, the disk_format is not qcow2, but 'raw':
$ glance image-show 5d6c4437-c7c2-4e95-aa81-c973fed2f2bd
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 764efa883dda1e11db47671c4a3bbd9e |
| container_format | bare |
| created_at | 2016-04-15T11:03:01Z |
| disk_format | raw | <<<<<<<<<<<<<<<
| id | 5d6c4437-c7c2-4e95-aa81-c973fed2f2bd |
| min_disk | 0 |
| min_ram | 0 |
| name | imgx |
| owner | 3f2ce9bf40a443f2b072a69ff10bba92 |
| protected | False |
| size | 3 |
| status | active |
| tags | [] |
| updated_at | 2016-04-15T11:03:03Z |
| virtual_size | 512 |
| visibility | private |
+------------------+--------------------------------------+
** Affects: glance
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1570801
Title:
tasks: disk_format ignored when 'work_dir' is set
Status in Glance:
New
Bug description:
If, in glance-api.conf work_dir is not defined:
[task]
#work_dir
The following API call (with disk_format=qcow2):
POST /v2/tasks HTTP/1.1.
User-Agent: curl/7.38.0.
Host: localhost:9292.
Accept: */*.
x-auth-token: 1acdf9b1f89f4aaf983079250fcefb3d.
Content-Length: 232.
Content-Type: application/x-www-form-urlencoded.
.
{
"type": "import",
"input": {
"import_from": "http://localhost:54321/hi.txt",
"import_from_format": "bare",
"image_properties": {
"name": "imgx",
"disk_format": "qcow2",
"container_format": "bare"
}
}
}
results in an image with disk_format qcow2:
$ glance image-show e315a86f-5b58-478a-9f34-c99f2d6e8365
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 764efa883dda1e11db47671c4a3bbd9e |
| container_format | bare |
| created_at | 2016-04-15T11:01:52Z |
| disk_format | qcow2 |
| id | e315a86f-5b58-478a-9f34-c99f2d6e8365 |
| min_disk | 0 |
| min_ram | 0 |
| name | imgx |
| owner | 3f2ce9bf40a443f2b072a69ff10bba92 |
| protected | False |
| size | 3 |
| status | active |
| tags | [] |
| updated_at | 2016-04-15T11:01:54Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
If the work_dir is defined
[task]
work_dir = /tmp/work
and the same API call is made, the disk_format is not qcow2, but
'raw':
$ glance image-show 5d6c4437-c7c2-4e95-aa81-c973fed2f2bd
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 764efa883dda1e11db47671c4a3bbd9e |
| container_format | bare |
| created_at | 2016-04-15T11:03:01Z |
| disk_format | raw | <<<<<<<<<<<<<<<
| id | 5d6c4437-c7c2-4e95-aa81-c973fed2f2bd |
| min_disk | 0 |
| min_ram | 0 |
| name | imgx |
| owner | 3f2ce9bf40a443f2b072a69ff10bba92 |
| protected | False |
| size | 3 |
| status | active |
| tags | [] |
| updated_at | 2016-04-15T11:03:03Z |
| virtual_size | 512 |
| visibility | private |
+------------------+--------------------------------------+
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1570801/+subscriptions