[Tendrl-devel] Regarding some additional data points in the state output

Shubhendu Tripathi shtripat at redhat.com
Wed Nov 30 07:31:15 UTC 2016


The ini parser is a generic utility in tendrl and I prefer not to tweak 
it only for this reason.
I would rather prefer option two mentioned below.

Regards,
Shubhendu

On 11/30/2016 12:43 PM, Rohan Kanade wrote:
> 2 ways to tackle this:
>
> 1) Tweak our ini parser such that, when it sees section like
>   "[Volume<index>.options]", take the "Volume<index>.options" text and
> prefix it to the options given below until we find another
> "Volume<index>.*" key/value.
>
> This will basically transform the output file to what it looked like as the
> option 1 presented by gluster folks to us
>
> 2) If this can be patched and output can be changed to look like below, we
> are good with that too.
>
> [Volumes]
> Volume1.name: tv1
> Volume1.id: 0242f875-24ad-480d-a605-06de2e0f3842
> Volume1.type: Distribute
> <snip>
> Volume1.rebalance.files: 0
> Volume1.rebalance.data: 0Bytes
> Volume1.options.nfs.disable: on
> Volume1.options.performance.readdir-ahead: on
> Volume1.options.transport.address-family: inet
> Volume1.options.features.uss: on
> Volume2.name: tv2
> Volume2.id: 937ad30c-bc08-4928-85e4-ece49235037aVolume2.type: Distribute
>
> On Wed, Nov 30, 2016 at 9:35 AM, Shubhendu Tripathi <shtripat at redhat.com>
> wrote:
>
>> Dear Rohan,
>>
>> I accept that the below format is a valid ini file format syntactically,
>> but semantically its screwing up volumes listing.
>> The "Volumes" list returns
>>
>> [Volumes]
>> Volume1.name: test-vol
>> Volume1.id: 7942d008-e300-4fd9-8af0-5a118afd8d3d
>> Volume1.type: Distribute
>> Volume1.transport_type: tcp
>> Volume1.status: Started
>> Volume1.brickcount: 1
>> Volume1.Brick1.path: 172.17.0.2:/tmp/b1
>> Volume1.Brick1.hostname: 172.17.0.2
>> Volume1.Brick1.port: 49153
>> Volume1.Brick1.rdma_port: 0
>> Volume1.Brick1.status: Started
>> Volume1.Brick1.signedin: True
>> Volume1.snap_count: 0
>> Volume1.stripe_count: 1
>> Volume1.replica_count: 1
>> Volume1.subvol_count: 1
>> Volume1.arbiter_count: 0
>> Volume1.disperse_count: 0
>> Volume1.redundancy_count: 0
>> Volume1.quorum_status: not_applicable
>> Volume1.snapd_svc.online_status: Offline
>> Volume1.snapd_svc.inited: TrueVolume1.rebalance.id: 00000000-0000-0000-0000-000000000000
>> Volume1.rebalance.status: not_started
>> Volume1.rebalance.failures: 0
>> Volume1.rebalance.skipped: 0
>> Volume1.rebalance.lookedup: 0
>> Volume1.rebalance.files: 0
>> Volume1.rebalance.data: 0Bytes
>>
>> Also the "Volume1.options" returns the volume2 details mingled within as
>> below
>>
>>
>> features.barrier: on
>> transport.address-family: inet
>> performance.readdir-ahead: on
>> nfs.disable: on
>>
>> Volume2.name: test-vol1
>> Volume2.id: 35854708-bb72-45a5-bdbd-77c51e5ebfb9
>> Volume2.type: Distribute
>> Volume2.transport_type: tcp
>> Volume2.status: Started
>> Volume2.brickcount: 1
>> Volume2.Brick1.path: 172.17.0.2:/tmp/b2
>> Volume2.Brick1.hostname: 172.17.0.2
>> Volume2.Brick1.port: 49152
>> Volume2.Brick1.rdma_port: 0
>> Volume2.Brick1.status: Started
>> Volume2.Brick1.signedin: True
>> Volume2.snap_count: 0
>> Volume2.stripe_count: 1
>> Volume2.replica_count: 1
>> Volume2.subvol_count: 1
>> Volume2.arbiter_count: 0
>> Volume2.disperse_count: 0
>> Volume2.redundancy_count: 0
>> Volume2.quorum_status: not_applicable
>> Volume2.snapd_svc.online_status: Offline
>> Volume2.snapd_svc.inited: TrueVolume2.rebalance.id: 00000000-0000-0000-0000-000000000000
>> Volume2.rebalance.status: not_started
>> Volume2.rebalance.failures: 0
>> Volume2.rebalance.skipped: 0
>> Volume2.rebalance.lookedup: 0
>> Volume2.rebalance.files: 0
>> Volume2.rebalance.data: 0Bytes
>>
>> Tried debugging a little the parser for this ini file and it looks like
>> sector/sections are formed based on [] brackets and anything below one
>> section (till next [] found) is treated as one section.
>>
>> Instead, the flatted structure like "Volume1.options.nfs.disable: on"
>> would have been an easier option to parse and code change tendrl side.
>>
>> At the moment I dont find a way to resolve this mingled sections and
>> handling within tendrl parser. I have tried some tweaking in parser but
>> looks like sections are formed underneath using the library for ini parser.
>>
>> Comments??
>>
>> Regards,
>> Shubhendu
>>
>>
>>
>> On 11/22/2016 08:16 PM, Rohan Kanade wrote:
>>
>> Sample:
>> START>>>
>>
>> [Global]
>> MYUUID: 6bbf8ac2-22a0-4f08-b986-fe75aea9f654
>> op-version: 40000
>>
>> [Global options]
>>
>> [Peers]
>>
>> [Volumes]
>> Volume1.name: test-vol
>> Volume1.id: 7942d008-e300-4fd9-8af0-5a118afd8d3d
>> Volume1.type: Distribute
>> Volume1.transport_type: tcp
>> Volume1.status: Started
>> Volume1.brickcount: 1
>> Volume1.Brick1.path: 172.17.0.2:/tmp/b1
>> Volume1.Brick1.hostname: 172.17.0.2
>> Volume1.Brick1.port: 49153
>> Volume1.Brick1.rdma_port: 0
>> Volume1.Brick1.status: Started
>> Volume1.Brick1.signedin: True
>> Volume1.snap_count: 0
>> Volume1.stripe_count: 1
>> Volume1.replica_count: 1
>> Volume1.subvol_count: 1
>> Volume1.arbiter_count: 0
>> Volume1.disperse_count: 0
>> Volume1.redundancy_count: 0
>> Volume1.quorum_status: not_applicable
>> Volume1.snapd_svc.online_status: Offline
>> Volume1.snapd_svc.inited: TrueVolume1.rebalance.id: 00000000-0000-0000-0000-000000000000
>> Volume1.rebalance.status: not_started
>> Volume1.rebalance.failures: 0
>> Volume1.rebalance.skipped: 0
>> Volume1.rebalance.lookedup: 0
>> Volume1.rebalance.files: 0
>> Volume1.rebalance.data: 0Bytes
>> [Volume1.options]
>> features.barrier: on
>> transport.address-family: inet
>> performance.readdir-ahead: on
>> nfs.disable: on
>>
>> Volume2.name: test-vol1
>> Volume2.id: 35854708-bb72-45a5-bdbd-77c51e5ebfb9
>> Volume2.type: Distribute
>> Volume2.transport_type: tcp
>> Volume2.status: Started
>> Volume2.brickcount: 1
>> Volume2.Brick1.path: 172.17.0.2:/tmp/b2
>> Volume2.Brick1.hostname: 172.17.0.2
>> Volume2.Brick1.port: 49152
>> Volume2.Brick1.rdma_port: 0
>> Volume2.Brick1.status: Started
>> Volume2.Brick1.signedin: True
>> Volume2.snap_count: 0
>> Volume2.stripe_count: 1
>> Volume2.replica_count: 1
>> Volume2.subvol_count: 1
>> Volume2.arbiter_count: 0
>> Volume2.disperse_count: 0
>> Volume2.redundancy_count: 0
>> Volume2.quorum_status: not_applicable
>> Volume2.snapd_svc.online_status: Offline
>> Volume2.snapd_svc.inited: TrueVolume2.rebalance.id: 00000000-0000-0000-0000-000000000000
>> Volume2.rebalance.status: not_started
>> Volume2.rebalance.failures: 0
>> Volume2.rebalance.skipped: 0
>> Volume2.rebalance.lookedup: 0
>> Volume2.rebalance.files: 0
>> Volume2.rebalance.data: 0Bytes
>> [Volume2.options]
>> transport.address-family: inet
>> performance.readdir-ahead: on
>> nfs.disable: on
>>
>>
>> [Services]svc1.name: glustershd
>> svc1.online_status: Offline
>> svc2.name: nfs
>> svc2.online_status: Offline
>> svc3.name: bitd
>> svc3.online_status: Offline
>> svc4.name: scrub
>> svc4.online_status: Offline
>> svc5.name: quotad
>> svc5.online_status: Offline
>>
>>
>> [Misc]
>> Base port: 49152
>> Last allocated port: 49153
>>
>> <<END
>>
>> On Tue, Nov 22, 2016 at 2:06 PM, Rohan Kanade <rkanade at redhat.com> <rkanade at redhat.com> wrote:
>>
>> Also, please provide a full state dump example with this patch included,
>>
>> easier for Tendrl devs to get started without deploying this patch
>>
>> On Tue, Nov 22, 2016 at 1:44 PM, Rohan Kanade <rkanade at redhat.com> <rkanade at redhat.com> wrote:
>>
>> Id prefer the first option
>>
>>
>> [Volumes]
>> Volume1.name: tv1
>> Volume1.id: 0242f875-24ad-480d-a605-06de2e0f3842
>> Volume1.type: Distribute
>> <snip>
>> Volume1.rebalance.files: 0
>> Volume1.rebalance.data: 0Bytes
>> [Volume1.options]
>> nfs.disable: on
>> performance.readdir-ahead: on
>> transport.address-family: inet
>> features.uss: on
>>
>> Volume2.name: tv2
>> Volume2.id: 937ad30c-bc08-4928-85e4-ece49235037a
>> Volume2.type: Distribute
>> .........
>> .........
>>
>>
>> This would require minor changes to tendrl/gluster-integration
>>
>> definition files and code. I will draw up a spec on Tendrl/specifications
>> to document the changes required. Please go ahead with your patch
>>
>> Thanks
>>
>> On Tue, Nov 22, 2016 at 9:18 AM, Atin Mukherjee <amukherj at redhat.com> <amukherj at redhat.com>
>>
>> wrote:
>>
>> We are awaiting final confirmation from Rohan. Samikshan has kept the
>> changes ready and will push it to gerrit once we hear from Rohan.
>>
>> On Mon, Nov 21, 2016 at 12:54 PM, Shubhendu Tripathi <
>>
>> shtripat at redhat.com>
>>
>> wrote:
>>
>>
>> Looking at options, I feel option-2 would be more feasible and might
>>
>> not
>>
>> need code changes in tendrl.
>> But still lets wait for the confirmation from Rohan.
>>
>> Regards,
>> Shubhendu
>>
>>
>>
>> On 11/21/2016 12:43 PM, Atin Mukherjee wrote:
>>
>>
>> +tendrl-devel
>>
>> On Mon, Nov 21, 2016 at 12:41 PM, Samikshan Bairagya <
>>
>> sbairagy at redhat.com
>>
>> wrote:
>>
>> Hey Rohan,
>>
>> So the current get-state CLI misses volume specific options in its
>> output.
>> Somehow I missed it while coming up with the implementation. This
>>
>> patch
>>
>> by
>> Atin is a fix for that: http://review.gluster.org/#/c/15889/1. The
>> following example shows how this patch would add these new data
>>
>> points
>>
>> and
>> how that would change the existing format:
>>
>> [Volumes]
>> Volume1.name: tv1
>> Volume1.id: 0242f875-24ad-480d-a605-06de2e0f3842
>> Volume1.type: Distribute
>> <snip>
>> Volume1.rebalance.files: 0
>> Volume1.rebalance.data: 0Bytes
>> [Volume1.options]
>> nfs.disable: on
>> performance.readdir-ahead: on
>> transport.address-family: inet
>> features.uss: on
>>
>> Volume2.name: tv2
>> Volume2.id: 937ad30c-bc08-4928-85e4-ece49235037a
>> Volume2.type: Distribute
>> .........
>> .........
>>
>> So essentially there would be a new section for every volume that
>>
>> would
>>
>> list the option names and corresponding values. Would adding this
>>
>> change
>>
>> still keep the get-state output parseable from Tendrl POV?
>>
>> Or would an output like the following make more sense? Let us know.
>> Thanks.
>>
>> [Volumes]
>> Volume1.name: tv1
>> Volume1.id: 0242f875-24ad-480d-a605-06de2e0f3842
>> Volume1.type: Distribute
>> <snip>
>> Volume1.rebalance.files: 0
>> Volume1.rebalance.data: 0Bytes
>> Volume1.options.nfs.disable: on
>> Volume1.options.performance.readdir-ahead: on
>> Volume1.options.transport.address-family: inet
>> Volume1.options.features.uss: on
>>
>> Volume2.name: tv2
>> Volume2.id: 937ad30c-bc08-4928-85e4-ece49235037a
>> Volume2.type: Distribute
>> .........
>> .........
>>
>>
>> ~ Samikshan
>>
>>
>>
>> _______________________________________________
>> Tendrl-devel mailing listTendrl-devel at redhat.comhttps://www.redhat.com/mailman/listinfo/tendrl-devel
>>
>> --
>>
>> ~ Atin (atinm)
>> _______________________________________________
>> Tendrl-devel mailing listTendrl-devel at redhat.comhttps://www.redhat.com/mailman/listinfo/tendrl-devel
>>
>> _______________________________________________
>> Tendrl-devel mailing listTendrl-devel at redhat.comhttps://www.redhat.com/mailman/listinfo/tendrl-devel
>>
>>
>>
> _______________________________________________
> Tendrl-devel mailing list
> Tendrl-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/tendrl-devel




More information about the Tendrl-devel mailing list