Bug 1326645 - [RFE] If an Image have deep-flattening enabled, then disable/re-enable is not allowed
Summary: [RFE] If an Image have deep-flattening enabled, then disable/re-enable is not...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: RBD
Version: 2.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: 2.0
Assignee: Josh Durgin
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-13 09:34 UTC by Tanay Ganguly
Modified: 2017-07-30 15:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-13 11:33:51 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Tanay Ganguly 2016-04-13 09:34:29 UTC
Description of problem:
If an Image have deep-flattening enabled, then trying to disable it is allowed. But again enabling it is Failing.

"If deep-flattening is not supported to be enabled, then disabling it should also be not allowed"

Version-Release number of selected component (if applicable):
10.1.1.1

How reproducible:
Always

Steps to Reproduce:
1. Create Image with all features
rbd image 'CLOOONE2':
        size 2000 GB in 512000 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.10bf712eb141f2
        format: 2
        features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
        flags:
        parent: Tanay-RBD/BIG_Image1@t10
        overlap: 2000 GB
2. Disable Deep-Flattening
rbd feature disable Tanay-RBD/CLOOONE2 deep-flatten
2016-04-13 18:27:05.545235 7fc728ddfd80  5 librbd::AioImageRequestWQ: 0x7fc732eab870 : ictx=0x7fc732ea9fe0
2016-04-13 18:27:05.558188 7fc7098b3700  5 librbd::AioImageRequestWQ: 0x7fc6e40085a0 : ictx=0x7fc6e40078f0
2016-04-13 18:27:05.564883 7fc7090b2700  5 librbd::AioImageRequestWQ: block_writes: 0x7fc6e40078f0, num=1
2016-04-13 18:27:05.567223 7fc7098b3700  5 librbd::AioImageRequestWQ: unblock_writes: 0x7fc6e40078f0, num=0
2016-04-13 18:27:05.567233 7fc7098b3700  5 librbd::AioImageRequestWQ: block_writes: 0x7fc732ea9fe0, num=1
2016-04-13 18:27:05.579417 7fc7098b3700  5 librbd::AioImageRequestWQ: shut_down: in_flight=0
2016-04-13 18:27:05.579483 7fc7090b2700  5 librbd::AioImageRequestWQ: unblock_writes: 0x7fc732ea9fe0, num=0
2016-04-13 18:27:05.579561 7fc7090b2700  5 librbd::AioImageRequestWQ: shut_down: in_flight=0

3.It gets disabled.
rbd -p Tanay-RBD --image CLOOONE2 info
2016-04-13 18:28:01.697108 7fcba8ad0d80  5 librbd::AioImageRequestWQ: 0x7fcbb31d8b40 : ictx=0x7fcbb31d72b0
2016-04-13 18:28:01.703439 7fcb895a4700  5 librbd::AioImageRequestWQ: 0x7fcb64003e00 : ictx=0x7fcb640030a0
2016-04-13 18:28:01.710258 7fcb88da3700  5 librbd::AioImageRequestWQ: block_writes: 0x7fcb640030a0, num=1
2016-04-13 18:28:01.712508 7fcb895a4700  5 librbd::AioImageRequestWQ: unblock_writes: 0x7fcb640030a0, num=0
rbd image 'CLOOONE2':
        size 2000 GB in 512000 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.10bf712eb141f2
        format: 2
        features: layering, exclusive-lock, object-map, fast-diff
        flags:
        parent: Tanay-RBD/BIG_Image1@t10
        overlap: 2000 GB
2016-04-13 18:28:01.713213 7fcba8ad0d80  5 librbd::AioImageRequestWQ: shut_down: in_flight=0
2016-04-13 18:28:01.713328 7fcb88da3700  5 librbd::AioImageRequestWQ: shut_down: in_flight=0

4. Again try to re-enable, its Failing, saying failed to update image features

rbd feature enable Tanay-RBD/CLOOONE2 deep-flatten
2016-04-13 18:28:06.464603 7f896558dd80  5 librbd::AioImageRequestWQ: 0x7f896f4f0d50 : ictx=0x7f896f4ef4c0
2016-04-13 18:28:06.475605 7f8946061700  5 librbd::AioImageRequestWQ: 0x7f89200085a0 : ictx=0x7f89200078f0
2016-04-13 18:28:06.482352 7f8945860700  5 librbd::AioImageRequestWQ: block_writes: 0x7f89200078f0, num=1
2016-04-13 18:28:06.484378 7f8946061700  5 librbd::AioImageRequestWQ: unblock_writes: 0x7f89200078f0, num=0
2016-04-13 18:28:06.484388 7f8946061700  5 librbd::AioImageRequestWQ: block_writes: 0x7f896f4ef4c0, num=1
rbd: failed to update image features: (22) Invalid argument
2016-04-13 18:28:06.484495 7f896558dd80 -1 librbd: cannot update immutable features
2016-04-13 18:28:06.490453 7f8946061700  5 librbd::AioImageRequestWQ: shut_down: in_flight=0
2016-04-13 18:28:06.490517 7f8945860700  5 librbd::AioImageRequestWQ: unblock_writes: 0x7f896f4ef4c0, num=0
2016-04-13 18:28:06.490813 7f8945860700  5 librbd::AioImageRequestWQ: shut_down: in_flight=0

Actual results:


Expected results:


Additional info:

Comment 2 Jason Dillaman 2016-04-13 11:33:51 UTC
This is by design.  If the deep-flatten feature is disabled, it can be opened and written to by older RBD clients that don't know how to perform a deep copy-on-write.  If that were to happen and the feature re-enabled, there will be data loss after a flatten.

Comment 3 Stephan Wienczny 2016-05-29 21:35:58 UTC
Is there any way to reenable the deep-flatten feature after all older RBD clients are updated and support deep-flatten?

Comment 4 Jason Dillaman 2016-05-30 13:56:14 UTC
It's not just older clients that you have to worry about -- older cloned images would also be affected if they had *ever* been written to by an older client.  That is why we only support enabling it at image creation time.  The only reason we permit it to be disabled is to support krbd since it doesn't currently support deep-flatten.


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