Bug 1224174 - Flag of rbd image info is showing as "flags: object map invalid"
Summary: Flag of rbd image info is showing as "flags: object map invalid"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RBD
Version: 1.3.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: 1.3.1
Assignee: Jason Dillaman
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-22 10:02 UTC by Tanay Ganguly
Modified: 2022-07-09 07:45 UTC (History)
8 users (show)

Fixed In Version: ceph-0.94.2-3.el7cp
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 20:21:15 UTC
Embargoed:


Attachments (Terms of Use)
rdb create (377 bytes, application/x-shellscript)
2015-05-23 05:51 UTC, Tanay Ganguly
no flags Details
resize script (497 bytes, text/x-python)
2015-05-23 05:52 UTC, Tanay Ganguly
no flags Details
Client log (204.98 KB, text/plain)
2015-05-27 16:32 UTC, Tanay Ganguly
no flags Details
Correct log (11.02 MB, text/plain)
2015-05-27 17:03 UTC, Tanay Ganguly
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 11791 0 None None None Never
Red Hat Issue Tracker RHCEPH-4694 0 None None None 2022-07-09 07:45:55 UTC
Red Hat Product Errata RHSA-2015:2066 0 normal SHIPPED_LIVE Moderate: Red Hat Ceph Storage 1.3.1 security, bug fix, and enhancement update 2015-11-24 02:34:55 UTC
Red Hat Product Errata RHSA-2015:2512 0 normal SHIPPED_LIVE Moderate: Red Hat Ceph Storage 1.3.1 security, bug fix, and enhancement update 2016-02-03 03:15:52 UTC

Description Tanay Ganguly 2015-05-22 10:02:15 UTC
Description of problem:
flags is showing as Object Map invalid:
"flags: object map invalid"

rbd image 'OM_NEWClone_new4':
        size 11303 MB in 2826 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.77998515f007c
        format: 2
        features: layering, exclusive, object map
        flags: object map invalid
        parent: Tanay-RBD/OM_NEW4@OM_NEWsnap4
        overlap: 10240 MB

Version-Release number of selected component (if applicable):
ceph version 0.94.1
librbd1-0.94.1-10.el7cp.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Create a rbd Image with object map enabled.

rbd image 'OM_NEWClone_new5':
        size 11037 MB in 2760 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.7799c79e2a9e3
        format: 2
        features: layering, exclusive, object map
        flags: 
        parent: Tanay-RBD/OM_NEW5@OM_NEWsnap5
        overlap: 10240 MB

2. Used this script to re-size and shrink the rbd image multiple times.

#!/bin/python
import os
import random
import time
size=11000
i=0
new_size=0
sh_size=0
while i < 10:
        x=random.randint(1,500)
        new_size=size + x
        cmd1 = 'rbd resize Tanay-RBD/OM_NEWClone_new5 --size %s' %new_size
        print 'cmd is %s' %cmd1
        os.system(cmd1)
        time.sleep(5)
        x=random.randint(1,100)
        sh_size= new_size - x
        cmd2 = 'rbd resize Tanay-RBD/OM_NEWClone_new5 --size %s --allow-shrink' %sh_size
        print 'cmd2 is %s' %cmd2
        os.system(cmd2)
        i = i +1

Actual results:
I am seeing the flags is showing flags: object map invalid

Expected results:
The flags should not be shown as invalid.

Additional info:

Comment 2 Jason Dillaman 2015-05-22 17:06:56 UTC
I attempted to recreate this on RHEL7.1 and was unable to reproduce with the specified Ceph RPM version and script.  Can you please repeat with "debug rbd = 20" and "log file = /path/to/client/logs/$name.$pid.log" in your ceph.conf "[client]" section and attach the client and OSD logs?

For clarity, I issued the following rbd commands prior to running the Python script (modified for the new image name):

# rbd create --image-format 2 --image-features 13 --size 10240 parent
# rbd snap create parent@1
# rbd snap protect parent@1
# rbd clone --image-features=13 parent child
# python test.py > /dev/null 2>&1
# rbd info child
rbd image 'child':
	size 11410 MB in 2853 objects
	order 22 (4096 kB objects)
	block_name_prefix: rbd_data.371674b0dc51
	format: 2
	features: layering, exclusive, object map
	flags: 
	parent: rbd/parent@1
	overlap: 10240 MB

Thanks.

Comment 3 Tanay Ganguly 2015-05-23 05:48:15 UTC
Jason,
I have again reproduced it again 4/5 times.
I am simply re-sizing the Clone image multiple times using the given script.
PFA ( rbd creation and re-size script )

Even with "debug rbd = 20", i don's see any logs from OSD's.

There is no client involved here.

Thanks

Comment 4 Tanay Ganguly 2015-05-23 05:51:19 UTC
Created attachment 1028990 [details]
rdb create

Comment 5 Tanay Ganguly 2015-05-23 05:52:22 UTC
Created attachment 1028991 [details]
resize script

Comment 6 Jason Dillaman 2015-05-26 13:15:01 UTC
The rbd CLI is a Ceph client -- so all options under the "[client]" section of the conf file will apply to the program (and to other clients like QEMU).  I am still unable to repeat, so I need those logs from the client -- I would not expect "debug rbd = 20" to have any effect on the OSD logs since it is a 100% client-side parameter.

> Jason,
> I have again reproduced it again 4/5 times.
> I am simply re-sizing the Clone image multiple times using the given script.
> PFA ( rbd creation and re-size script )
> 
> Even with "debug rbd = 20", i don's see any logs from OSD's.
> 
> There is no client involved here.
> 
> Thanks

Comment 7 Tanay Ganguly 2015-05-27 16:31:56 UTC
PFA the client log, i was able to reproduce it in 2nd iterations.

Comment 8 Tanay Ganguly 2015-05-27 16:32:30 UTC
Created attachment 1030694 [details]
Client log

Comment 9 Tanay Ganguly 2015-05-27 16:59:48 UTC
Please find the correct log.

Comment 10 Tanay Ganguly 2015-05-27 17:03:46 UTC
Created attachment 1030713 [details]
Correct log

Comment 11 Jason Dillaman 2015-05-27 20:03:14 UTC
It appears that in addition to running the attached script, 'rbd info' was run on the image concurrently.  It was actually the 'rbd info' invocation which caused the object map to become invalidated since it opened the image mid-resize and noticed a discrepancy with the image size vs the object map size.  This explains why I was not able to reproduce the issue with the provided script.

Comment 12 kiran raje urs J 2015-05-28 10:04:00 UTC
Hi Jason/ Josh, 

what is the impact of this defect ? is this going to affect the overall functionality of system ? When will this be fixed ?

Regards,
Kiran raje urs J

Comment 13 Josh Durgin 2015-05-28 18:54:03 UTC
We'll want to fix this soon in upstream master, but I wouldn't treat this as a blocker for 1.3.0. Object map is a very useful optimization, but it is purely an optimization, so having an invalid object map is the same as not having it enabled. Some behavior will be the same speed as with it disabled (still the default) and correctness will be unaffected.

Comment 14 Ken Dreyer (Red Hat) 2015-07-30 20:09:32 UTC
The patches we need are https://github.com/ceph/ceph/pull/5279/commits

Comment 17 Tanay Ganguly 2015-10-28 10:51:18 UTC
Marking this Bug as verified, as it is working fine.

The image is not getting "flags: object map invalid"

Comment 19 errata-xmlrpc 2015-11-23 20:21:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2512

Comment 20 Siddharth Sharma 2015-11-23 21:53:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2066


Note You need to log in before you can comment on or make changes to this bug.