Introduce GD_OP_VERSION_5_10 and increase GD_OP_VERSION_MAX to this version

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Introduce GD_OP_VERSION_5_10 and increase GD_OP_VERSION_MAX to this version

David Spisla-3
Dear Gluster Devels,
i am using gluster 5.10 and want to introduce a new volume option. Therefore I want to set a proper GD_OP_VERSION for it. In gluster 5.10 source code there is no macro defined for 51000.

But concurrently the GD_OP_VERSION_MAX is set to 50400. I would do something like this:

1. Change in libglusterfs/src/globals-h (line 47)
#define GD_OP_VERSION_MAX                                                      \
    GD_OP_VERSION_5_10
2. Add line to same Header file:
#define GD_OP_VERSION_5_10 51000 /* Op-version for GlusterFS 5.10 */

Do you think this is fine?

3. libglusterfs/src/common-utils.c (line 2036):
On the other side there is a if-branch which uses GD_OP_VERSION_5_4 which is currently the GD_OP_VERSION_MAX. Why it is used here and should I increase it also to GD_OP_VERSION_5_10?

Regards
David Spisla

_______________________________________________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968


NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-devel mailing list
[hidden email]
https://lists.gluster.org/mailman/listinfo/gluster-devel

Reply | Threaded
Open this post in threaded view
|

Re: Introduce GD_OP_VERSION_5_10 and increase GD_OP_VERSION_MAX to this version

RAFI KC

On 1/29/20 2:28 PM, David Spisla wrote:

> Dear Gluster Devels,
> i am using gluster 5.10 and want to introduce a new volume option.
> Therefore I want to set a proper GD_OP_VERSION for it. In gluster 5.10
> source code there is no macro defined for 51000.
>
> But concurrently the GD_OP_VERSION_MAX is set to 50400. I would do
> something like this:
>
> 1. Change in libglusterfs/src/globals-h (line 47)
> #define GD_OP_VERSION_MAX                    \
>     GD_OP_VERSION_5_10
> 2. Add line to same Header file:
> #define GD_OP_VERSION_5_10 51000 /* Op-version for GlusterFS 5.10 */
>
> Do you think this is fine?

This should be fine. Also, define the new volume set command with the
newly introduced op-version.

>
> 3. libglusterfs/src/common-utils.c (line 2036):
> On the other side there is a if-branch which uses GD_OP_VERSION_5_4
> which is currently the GD_OP_VERSION_MAX. Why it is used here and
> should I increase it also to GD_OP_VERSION_5_10?

In Gluster5.4, the checksum calculation has been changed to a new
method. Hence if it is a heterogeneous cluster (Not every node is in the
same version, usually happens when you upgrade) the peer will go to the
rejected state as one of the cluster compute checksum with new method
and rest uses the old. So this check prevents doing so.


Keep the op-version as GD_OP_VERSION_5_4 for this check. Because let's
say you have a heterogeneous cluster where op-version is 5.4 or higher
then it is completely fine to do the checksum calculation with new method.

Regards

Rafi KC


>
> Regards
> David Spisla

_______________________________________________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968


NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-devel mailing list
[hidden email]
https://lists.gluster.org/mailman/listinfo/gluster-devel

Reply | Threaded
Open this post in threaded view
|

Re: Introduce GD_OP_VERSION_5_10 and increase GD_OP_VERSION_MAX to this version

Atin Mukherjee-2
In reply to this post by David Spisla-3
There’s no hard requirement to have an op-version tagged against a release until and unless you introduce a new volume option. What you need to do is introduce a new macro with a higher value than max op version and set the max op version value to the same - just like how a new volume option is introduced. If you introduce a new macro with a value lower than max op version you’re calling for a trouble with backward compatibility and managing heterogeneous cluster.

HTH

On Wed, 29 Jan 2020 at 14:28, David Spisla <[hidden email]> wrote:
Dear Gluster Devels,
i am using gluster 5.10 and want to introduce a new volume option. Therefore I want to set a proper GD_OP_VERSION for it. In gluster 5.10 source code there is no macro defined for 51000.

But concurrently the GD_OP_VERSION_MAX is set to 50400. I would do something like this:

1. Change in libglusterfs/src/globals-h (line 47)
#define GD_OP_VERSION_MAX                                                      \
    GD_OP_VERSION_5_10
2. Add line to same Header file:
#define GD_OP_VERSION_5_10 51000 /* Op-version for GlusterFS 5.10 */

Do you think this is fine?

3. libglusterfs/src/common-utils.c (line 2036):
On the other side there is a if-branch which uses GD_OP_VERSION_5_4 which is currently the GD_OP_VERSION_MAX. Why it is used here and should I increase it also to GD_OP_VERSION_5_10?

Regards
David Spisla
_______________________________________________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968


NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-devel mailing list
[hidden email]
https://lists.gluster.org/mailman/listinfo/gluster-devel

--
--Atin

_______________________________________________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968


NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-devel mailing list
[hidden email]
https://lists.gluster.org/mailman/listinfo/gluster-devel

Reply | Threaded
Open this post in threaded view
|

Re: Introduce GD_OP_VERSION_5_10 and increase GD_OP_VERSION_MAX to this version

David Spisla-3
Hello Atin,
thank you. It working fine!
Regards
David

Am Mi., 29. Jan. 2020 um 10:15 Uhr schrieb Atin Mukherjee <[hidden email]>:
There’s no hard requirement to have an op-version tagged against a release until and unless you introduce a new volume option. What you need to do is introduce a new macro with a higher value than max op version and set the max op version value to the same - just like how a new volume option is introduced. If you introduce a new macro with a value lower than max op version you’re calling for a trouble with backward compatibility and managing heterogeneous cluster.

HTH

On Wed, 29 Jan 2020 at 14:28, David Spisla <[hidden email]> wrote:
Dear Gluster Devels,
i am using gluster 5.10 and want to introduce a new volume option. Therefore I want to set a proper GD_OP_VERSION for it. In gluster 5.10 source code there is no macro defined for 51000.

But concurrently the GD_OP_VERSION_MAX is set to 50400. I would do something like this:

1. Change in libglusterfs/src/globals-h (line 47)
#define GD_OP_VERSION_MAX                                                      \
    GD_OP_VERSION_5_10
2. Add line to same Header file:
#define GD_OP_VERSION_5_10 51000 /* Op-version for GlusterFS 5.10 */

Do you think this is fine?

3. libglusterfs/src/common-utils.c (line 2036):
On the other side there is a if-branch which uses GD_OP_VERSION_5_4 which is currently the GD_OP_VERSION_MAX. Why it is used here and should I increase it also to GD_OP_VERSION_5_10?

Regards
David Spisla
_______________________________________________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968


NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-devel mailing list
[hidden email]
https://lists.gluster.org/mailman/listinfo/gluster-devel

--
--Atin

_______________________________________________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968


NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-devel mailing list
[hidden email]
https://lists.gluster.org/mailman/listinfo/gluster-devel