Bug 1696868 - Order of the hosts are not preserved, when creating the volume
Summary: Order of the hosts are not preserved, when creating the volume
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhhi
Version: rhhiv-1.6
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: RHHI-V 1.6.z Async Update
Assignee: Sahina Bose
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On: 1696867 1697965
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-05 19:44 UTC by SATHEESARAN
Modified: 2019-06-25 10:13 UTC (History)
8 users (show)

Fixed In Version: cockpit-ovirt-dashboard-0.12.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1696867
: 1697965 (view as bug list)
Environment:
Last Closed: 2019-05-20 04:28:18 UTC
Embargoed:


Attachments (Terms of Use)

Description SATHEESARAN 2019-04-05 19:44:47 UTC
Description of problem:
------------------------
Order of the hosts is not preserved and it won't be the problem for replicated volume, but for the arbitrated volume, gluster-ansible role would place the arbiter brick on any of the host against the users expectation.

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
gluster-ansible-roles-1.0.4-4

How reproducible:
-----------------
Always

Steps to Reproduce:
--------------------
1. Create the vars file with hostnames in order host1, host2, host3
2. Create volumes

Actual results:
---------------
volumes are created with different order of bricks - say host2, host3, host1

Expected results:
-----------------
Volume should be created in the same order as listed in the vars file


Additional info:

Comment 1 Sachidananda Urs 2019-04-07 06:44:33 UTC
When I tested I see the bricks are created in the order provided:

Vars:
     gluster_features_hci_volumes:
        - { volname: 'data', brick: '/data-1/data' }
        - { volname: 'engine', brick: '/data-1/engine' }
        - { volname: 'store', brick: '/data-1/store' }
     gluster_features_hci_cluster:
        - host2
        - host3
        - host1


Result:

Volume Name: store
Type: Replicate
Volume ID: 7b03f1d3-8dac-4235-a6a6-fb2e650a6f57
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: host2:/data-1/store
Brick2: host3:/data-1/store
Brick3: host1:/data-1/store
Options Reconfigured:

Volume Name: engine                                                                                                               
Type: Replicate                                                                                                                   
Volume ID: acc4b7a9-2eec-4116-819b-ae8f51d19ed3                                                                                   
Status: Started                                                                                                                   
Snapshot Count: 0                                                                                                                 
Number of Bricks: 1 x 3 = 3                                                                                                       
Transport-type: tcp                                                                                                               
Bricks:                                                                                                                           
Brick1: host2:/data-1/engine                                                                                                      
Brick2: host3:/data-1/engine                                                                                                      
Brick3: host1:/data-1/engine                                                                                                      
Options Reconfigured:                                    

Volume Name: data                                                                                                                 
Type: Replicate                                                                                                                   
Volume ID: aeeb2cd5-6c53-4365-baaa-016ab07059d8                                                                                   
Status: Started                                                                                                                   
Snapshot Count: 0                                                                                                                 
Number of Bricks: 1 x 3 = 3                                                                                                       
Transport-type: tcp                                                                                                               
Bricks:                                                                                                                           
Brick1: host2:/data-1/data                                                                                                        
Brick2: host3:/data-1/data                                                                                                        
Brick3: host1:/data-1/data                                                                                                        
Options Reconfigured:                                                                                                             
cluster.granular-entry-heal: enable       

======================================================

There is no sorting happening.

Comment 2 Sachidananda Urs 2019-04-07 06:44:53 UTC
The same bug was raised in earlier version and please see my comment below:

https://bugzilla.redhat.com/show_bug.cgi?id=1636427#c3

If this is still happening, could be a regression in cockpit plugin.
Please attach the generated variable file as well.


The reason for this is using groups['hosts'] and we should not be using that till
Ansible fixes the bug: https://github.com/ansible/ansible/issues/34861

Comment 3 SATHEESARAN 2019-04-08 08:51:45 UTC
(In reply to Sachidananda Urs from comment #1)
> When I tested I see the bricks are created in the order provided:
> 
> Vars:
>      gluster_features_hci_volumes:
>         - { volname: 'data', brick: '/data-1/data' }
>         - { volname: 'engine', brick: '/data-1/engine' }
>         - { volname: 'store', brick: '/data-1/store' }
>      gluster_features_hci_cluster:
>         - host2
>         - host3
>         - host1

Sac,

vars file is generated as:

<snip>
    cluster_nodes:
      - host10.lab.eng.blr.redhat.com
      - host11.lab.eng.blr.redhat.com
      - host12.lab.eng.blr.redhat.com
    gluster_features_hci_cluster: '{{ cluster_nodes }}'
    gluster_features_hci_volumes:
      - volname: engine
        brick: /gluster_bricks/engine/engine
        arbiter: 0
      - volname: data
        brick: /gluster_bricks/data/data
        arbiter: 1
      - volname: vmstore
        brick: /gluster_bricks/vmstore/vmstore
        arbiter: 0
      - volname: extravol1
        brick: /gluster_bricks/extravol1/extravol1
        arbiter: false
</snip>

In this case the order of the host is not preserved.

Sac, Could you help finding the actual problem ?

Comment 7 SATHEESARAN 2019-04-10 12:48:11 UTC
@Gobinda,

The workaround for now is to remove the volume altogether and create it fresh from RHV Manager UI.
I don't think there exists a mechanism to remove the arbiter brick from some node and add to someother node

Comment 8 Gobinda Das 2019-04-10 13:02:25 UTC
Thanks sas

Comment 15 SATHEESARAN 2019-04-19 11:07:56 UTC
The dependent bug is ON_QA and also moving this bug ON_QA

Comment 16 SATHEESARAN 2019-04-19 11:08:19 UTC
Tested with cockpit-ovirt-dashboard 0.12.8

The bricks are created on the hosts in the given order.

Volume Name: engine
Type: Replicate
Volume ID: 8b81d419-6994-48d3-993b-95a99e9a07f2
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: host1:/gluster_bricks/engine/engine
Brick2: host2:/gluster_bricks/engine/engine
Brick3: host3:/gluster_bricks/engine/engine

Comment 17 SATHEESARAN 2019-04-19 11:10:05 UTC
As this bug is fixed, the known_issue related to this bug becomes void.
Also no doc_text required for this bug fix, as this problem popped-up in the interim
builds and not from previous version of release


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