Failed to create share server cause of image not found

Bug #1844046 reported by Eric Xie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Eric Xie

Bug Description

I used 'manila-service-image-master' image to create share. The configurations in manila.conf:
[generic]
...
service_image_name = manila-service-image-master

root@ctl01:~# openstack image list | grep manila-service-image-master
| db986e3c-1a27-4506-9d00-6f2dc0abcccb | manila-service-image-master | active |
root@ctl01:~# openstack image show manila-service-image-master
+------------------+----------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------+----------------------------------------------------------------------------------------------------------+
| checksum | a06f83f16b89ea3b3a1d1bea037cc446 |
| container_format | bare |
| created_at | 2019-08-05T09:04:50Z |
| disk_format | raw |
| file | /v2/images/db986e3c-1a27-4506-9d00-6f2dc0abcccb/file |
| id | db986e3c-1a27-4506-9d00-6f2dc0abcccb |
| min_disk | 0 |
| min_ram | 0 |
| name | manila-service-image-master |
| owner | 187e1165ec2a40e9a72efab673e940d9 |
| properties | direct_url='rbd://dda6d394-a64a-4fda-aacc-01de3e9e7724/images/db986e3c-1a27-4506-9d00-6f2dc0abcccb/snap' |
| protected | False |
| schema | /v2/schemas/image |
| size | 2032992256 |
| status | active |
| tags | |
| updated_at | 2019-09-15T10:11:29Z |
| virtual_size | None |
| visibility | public |
+------------------+----------------------------------------------------------------------------------------------------------+

But share was error cause that this image was not found.
LOG:
2019-09-14 15:03:57.265 21426 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/dist-packages/manila/share/drivers/service_instance.py", line 493, in _get_service_image
2019-09-14 15:03:57.265 21426 ERROR oslo_messaging.rpc.server "'active' state.") % service_image_name)
2019-09-14 15:03:57.265 21426 ERROR oslo_messaging.rpc.server ServiceInstanceException: Image with name 'manila-service-image-master' was not found or is not in 'active' state.

I downloaded this image and upload it again. It works.

Version:
# apt list --installed | grep manila

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

manila-common/xenial,xenial,now 1:6.0.2-2~u16.04 all [installed,automatic]
manila-share/xenial,xenial,now 1:6.0.2-2~u16.04 all [installed]
python-manila/xenial,xenial,now 1:6.0.2-2~u16.04 all [installed,automatic]

Tags: driver generic
Revision history for this message
Tom Barron (tpb) wrote :

Eric, offhand this seems like a case where the image had not fully uploaded when you attempted the create of the share (if e.g. your openstack-image-show command above was issued after the create attempt that would be possible). If you are sure this isn't the case, please provide instructions how to reproduce the issue since I'm not seeing it using upstream code.

Revision history for this message
Eric Xie (eric-xie) wrote :

@Tom, no, the image had been uploaded.
I confirmed that the 'self.compute_api.image_list(context)' can not list all images.
Because 'limit_param_default = 25' was in glance-api.conf.
So i think if can use get not list for image.

Changed in manila:
assignee: nobody → Eric Xie (eric-xie)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/685886

Tom Barron (tpb)
Changed in manila:
importance: Undecided → Medium
milestone: none → ussuri-1
tags: added: driver generic
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/685886
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=a7aa8470972303ab144ed46df576569abd494c04
Submitter: Zuul
Branch: master

commit a7aa8470972303ab144ed46df576569abd494c04
Author: ericxiett <eric_xiett@163.com>
Date: Tue Oct 1 07:11:21 2019 +0000

    Fix error that failed to get image for booting server

    Glance image list API supports pagination, but `_get_service_image`
    uses novaclient.glance.list() that only return images in one page.
    When the image needed by share server is not returned in the first
    page, the exception occurs. This patch uses `find_image` method
    to get the image.
    Since latest novaclient has no proxy to lookup image, so only
    novaclient.glance.

    Change-Id: I57b15b7ebb29c545c9780a90734988565fa1f6b7
    Closes-Bug: #1844046

Changed in manila:
status: In Progress → Fix Released
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.