[heketi-devel] Remove Device: Used to distribute all the bricks from device to other devices

Raghavendra Talur rtalur at redhat.com
Thu Mar 9 22:14:57 UTC 2017


On Fri, Mar 10, 2017 at 3:01 AM, Michael Adam <obnox at samba.org> wrote:
> On 2017-03-09 at 16:17 -0500, Luis Pabon wrote:
>> This looks great.  Thanks for the state machine diagram.
>
> Indeed!
>
>> On Thu, Mar 9, 2017 at 11:06 AM, Raghavendra Talur <rtalur at redhat.com>
>> wrote:
>>
>> > The PR now has the API changes requested.
>> >
>> > Before review, here is the current state diagram
>> >
>> >
>> >
>> > +-----------------+     disable/offline  +------------------+
>> > |                 |--------------------->|                  |
>> > |                 |                      | Offline/Disabled |
>> > | Online/Enabled  |<---------------------|                  |
>> > |                 |      enable/online   |                  |
>> > +-----------------+                      +------------------+
>> >       ^                                          ^        |
>> >       |                                          |        |remove
>> >       |                                   offline|        |
>> >       |add                                       |        |
>> >       |                                          |        |
>> >       |                                          |        |
>> >       |                                          |        v
>> > +------------------+                     +-------------------+
>> > |                  |                     |                   |
>> > | Deleted          |                     |   Failed/Removed  |
>> > |                  |<--------------------|                   |
>> > |                  |          delete     |                   |
>> > +------------------+                     +-------------------+
>> >
>> >
>> >
>> > The current implementation *requires* the device to be in "Offline" state
>> > before it can be removed. Some of the operations shown above aren't
>> > implemented yet.
>
> I was wondering if some of those should or can
> be implemented at all:
>
> * deleted        ----[add]----> online
> * failed/removed --[offline]--> offline/disabled
>
> I assume that these are the ops not implemented (yet).
yes, that's right.

>
> I think remove should be a one-way operation.
> And similar for deletion. Or is the 'deleted' state
> something that is equivalent to a new disk not being
> used at all in any volume?
yes, I considered it as a new disk which can be added.
But, on testing I learnt: as the device is not completely cleaned up
on a delete, heketi does not consider it as *new* and add fails. Needs
a little work here.

regarding *failed*-->*offline* state
current status: not implemented
I propose that we should implement it.

I have more questions:
1. Prasanth asked us to give cli aliases for enable/disable as
online/offline. I would like to do it. Any objections?
2. What should be the state name, *failed* or *removed*? In the code,
it is failed everywhere. The operation is called *remove*, but the
device info output has *failed*. We really need to choose one of them
here and be consistent.

Raghavendra Talur

>
> Apart from these questions -- great!
>
> Thanks - Michael


More information about the heketi-devel mailing list