Project

General

Profile

Bug #2597

Import of image from file appears to succeed, but image not present in the pool

Added by Sam Zaydel almost 12 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I have been testing with storing an image file, a basic QCOW2 image of latest Ubuntu distro on a pool, which is used by OpenStack's Glance component to validate my ability to store images both with Glance, using glance's cli tools and with the `rbd` cli tool. It appears that I succeed with import of the image, and yet I cannot see the image in the pool, nor can I remove the image, because it is seemingly not there. However, I cannot repeat the import with the same name of the image, resulting in an error that suggests presence of the image in the pool.

# sudo rbd --pool=glance import ./precise-server-cloudimg-amd64-disk1.img test-precise-001
Importing image: 9% complete...2012-06-15 10:10:43.206187 7fe7ca9c3700  0 client.5354.objecter  pinging osd that serves lingering tid 1 (osd.0)
Importing image: 14% complete...2012-06-15 10:10:48.209384 7fe7ca9c3700  0 client.5354.objecter  pinging osd that serves lingering tid 1 (osd.0)
... snipped ...
2012-06-15 10:19:28.264340 7fe7ca9c3700  0 client.5354.objecter  pinging osd that serves lingering tid 1 (osd.0)
Importing image: 88% complete...2012-06-15 10:19:33.265043 7fe7ca9c3700  0 client.5354.objecter  pinging osd that serves lingering tid 1 (osd.0)
Importing image: 100% complete...done.

# sudo rbd --pool=glance import devstack/precise-server-cloudimg-amd64-disk1.img test-precise-001
image creation failed
import failed: (17) File exists
2012-06-15 10:31:47.757517 7f871a1c6780 -1 librbd: rbd image header test-precise-001.rbd already exists

# sudo rbd --pool=glance rm test-precise-001
Removing image: 0% complete...failed.
delete error: (2) No such file or directory
2012-06-15 10:33:38.158712 7ffe11baa780 -1 librbd: error removing img from directory: (2) No such file or directory

Seemingly, this fails in a very interesting way. As a test, I went ahead and deleted the pool `glance` which I then proceeded to re-create and repeated the test. My attempt to store image failed in the same way, suggesting that there is some persistent reference to the data that I stored, or attempted to store even after a pool is removed.

# rados --name client.admin --keyfile=./secret.key rmpool glance 
successfully deleted pool glance

# rados --name client.admin --keyfile=./secret.key mkpool glance
successfully created pool glance

# sudo rbd --pool=glance import devstack/precise-server-cloudimg-amd64-disk1.img test-precise-001
image creation failed
import failed: (17) File exists
2012-06-15 11:44:50.718552 7f967272a780 -1 librbd: rbd image header test-precise-001.rbd already exists

History

#1 Updated by Sage Weil over 11 years ago

  • Project changed from Ceph to rbd
  • Category deleted (librbd)

#2 Updated by Josh Durgin over 11 years ago

  • Status changed from New to Resolved
  • Assignee set to Josh Durgin

This was unintentionally solved by commit:fd4b294280cc2238289dbd7b37236d8a8cb10160. The --pool parameter to rbd import was being ignored.

Also available in: Atom PDF