Glance image conversion fails

Bug #1805765 reported by Abhishek Kekane
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Abhishek Kekane

Bug Description

It is not possible to convert glance images as it fails with error, NoSuchOptError: no such option conversion_plugin_options in group [DEFAULT].

Steps to reproduce:
Ensure 'image_conversion' plugin is enabled in glance-image-import.conf as shown below:

[image_import_opts]
image_import_plugins = ['image_conversion']

[image_conversion]
output_format = raw

Run below command to create image:
$ glance image-create-via-import --disk-format qcow2 --container-format bare --name cirros --import-method web-download --uri http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img

Expected result:
Image should be converted to raw format on the fly.

Actual result:
Conversion fails

Glance API logs:
2018-11-28 16:26:46.502 24 INFO eventlet.wsgi.server [-] 172.17.1.201 - - [28/Nov/2018 16:26:46] "GET /healthcheck HTTP/1.0" 200 137 0.003688
2018-11-28 16:26:46.870 25 WARNING glance.async.taskflow_executor [-] Task 'api_image_import-Convert_Image-f8822a30-4980-451d-bbed-d73fd48736a8' (ba9729e1-9069-40fd-a3fd-496072765936) transitioned into state 'FAILURE' from state 'RUNNING'
5 predecessors (most recent first):
  Flow 'api_image_import'
  |__Atom 'api_image_import-ConfigureStaging-f8822a30-4980-451d-bbed-d73fd48736a8' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': 'file:///var/lib/glance/staging/7b317981-81a6-4839-8bc3-a138ddb4472d'}
     |__Flow 'api_image_import'
        |__Atom 'api_image_import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': [(None, {})]}
           |__Flow 'api_image_import': NoSuchOptError: no such option conversion_plugin_options in group [DEFAULT]
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor Traceback (most recent call last):
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor result = task.execute(**arguments)
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor File "/usr/lib/python2.7/site-packages/glance/async/flows/plugins/image_conversion.py", line 78, in execute
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor target_format = CONF.conversion_plugin_options.output_format
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2644, in __getattr__
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor raise NoSuchOptError(name)
2018-11-28 16:26:46.870 25 ERROR glance.async.taskflow_executor NoSuchOptError: no such option conversion_plugin_options in group [DEFAULT]

Changed in glance:
status: New → Confirmed
importance: Undecided → High
tags: added: rocky-backport-potential
Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

To test this with devstack, use one of the following workaround:

Workaround:
Change ExecStart mentioned in /<email address hidden> unit file to

ExecStart = /usr/local/bin/glance-api --config-dir /etc/glance

or

Make changes in glance/cmd/api.py as mentioned in [1] and then changing ExecStart mentioned in /<email address hidden> unit file to

ExecStart = /usr/local/bin/glance-api

NOTE:
After modifying <email address hidden> we need to relaod deamon using "sudo systemctl daemon-reload" command

[1] http://paste.openstack.org/show/722963/

Changed in glance:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :
Changed in glance:
status: Confirmed → In Progress
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :
Changed in glance:
milestone: none → stein-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to glance (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/626905

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/620781
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8ee37b7d7ca7d5d2d5e8ef2adc61306f3b57a0a2
Submitter: Zuul
Branch: master

commit 8ee37b7d7ca7d5d2d5e8ef2adc61306f3b57a0a2
Author: Abhishek Kekane <email address hidden>
Date: Thu Nov 29 06:05:41 2018 +0000

    Image conversion fails

    It is not possible to convert glance images as it fails with error,
    NoSuchOptError: no such option 'conversion_plugin_options' in group
    [DEFAULT] as there is no 'conversion_plugin_options' option or group
    in glance-image-import.conf file.

    Used correct option group 'image_conversion' to fetch the image
    'output_format' option.

    Change-Id: Ia7ced170bcddcd3639b7edfb644deef3018b11a8
    Closes-Bug: #1805765

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/627337

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (master)

Reviewed: https://review.openstack.org/626905
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=a22f02b653399bc495b85db1d6106c0e790edfe7
Submitter: Zuul
Branch: master

commit a22f02b653399bc495b85db1d6106c0e790edfe7
Author: Brian Rosmaita <email address hidden>
Date: Fri Dec 21 09:29:17 2018 -0500

    Correct typo in config option choices

    A typo in the oslo.config 'choices' for the output_format config
    option definition for the image conversion plugin in the
    interoperable image import workflow prevents conversion to the
    vmdk format. This patch corrects the typo and regenerates the
    sample image import conf file.

    Change-Id: I1836a46d969aab8ce09967db63d66f215d2cc920
    Closes-bug: #1809462
    Related-bug: #1805765

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to glance (stable/rocky)

Related fix proposed to branch: stable/rocky
Review: https://review.openstack.org/628204

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (stable/rocky)

Reviewed: https://review.openstack.org/628204
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=92fb3c1b955a168d989b0c6ed594217295491226
Submitter: Zuul
Branch: stable/rocky

commit 92fb3c1b955a168d989b0c6ed594217295491226
Author: Brian Rosmaita <email address hidden>
Date: Fri Dec 21 09:29:17 2018 -0500

    Correct typo in config option choices

    A typo in the oslo.config 'choices' for the output_format config
    option definition for the image conversion plugin in the
    interoperable image import workflow prevents conversion to the
    vmdk format. This patch corrects the typo and regenerates the
    sample image import conf file.

    Change-Id: I1836a46d969aab8ce09967db63d66f215d2cc920
    Closes-bug: #1809462
    Related-bug: #1805765
    (cherry picked from commit a22f02b653399bc495b85db1d6106c0e790edfe7)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/rocky)

Reviewed: https://review.openstack.org/627337
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=f3a584ffa6c008f58ccf4f944fd21391dc3be1a9
Submitter: Zuul
Branch: stable/rocky

commit f3a584ffa6c008f58ccf4f944fd21391dc3be1a9
Author: Abhishek Kekane <email address hidden>
Date: Thu Nov 29 06:05:41 2018 +0000

    Image conversion fails

    It is not possible to convert glance images as it fails with error,
    NoSuchOptError: no such option 'conversion_plugin_options' in group
    [DEFAULT] as there is no 'conversion_plugin_options' option or group
    in glance-image-import.conf file.

    Used correct option group 'image_conversion' to fetch the image
    'output_format' option.

    Change-Id: Ia7ced170bcddcd3639b7edfb644deef3018b11a8
    Closes-Bug: #1805765
    (cherry picked from commit 8ee37b7d7ca7d5d2d5e8ef2adc61306f3b57a0a2)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 18.0.0.0b1

This issue was fixed in the openstack/glance 18.0.0.0b1 development milestone.

Erno Kuvaja (jokke)
Changed in glance:
milestone: stein-2 → stein-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 17.0.1

This issue was fixed in the openstack/glance 17.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.