Tendrl / gluster-integration

Extracts all data from a Gluster cluster for consumption by Tendrl
GNU Lesser General Public License v2.1
6 stars 20 forks source link

Sync cycle resets the profiling status of volumes to the value selected during the import #592

Closed nthomas-redhat closed 6 years ago

nthomas-redhat commented 6 years ago

Steps:

  1. Import the cluster with profiling enabled
  2. Go to the cli and disable the profiling a volume

Result: After a while when the sync happens, the volume profiling is set as enabled

Expected result: We should not alter the profiling status during the sync cycle. Cluster level profiling status will be set to: enabled - if all volumes in the cluster are with profiling enabled disabled - if all volumes in the cluster are with profiling disbaled Mixed - if mixed configuration is found

shtripat commented 6 years ago

Cluster level flag set is always given priority. This is correct behaviour as per logic. If cluster level it is selected as leave-as-is then only volume level individual values are considered and if for few volumes only it's enabled cluster level it's marked as mixed.

This we had discussed in detail when we talked about enable disable profiling at volume level and then only it was coded.

nthomas-redhat commented 6 years ago

@shtripat , This is not what we discussed , if I remember correctly. If that is the case what is the meaning of mixed mode? if someone wants to enable the profiling of a single volume to debug something where the global status is 'disabled', in the next sync cycle , it will be reset. I don't think this is the right behavior.

In my opinion sync should not make any auto updates during the sync. It should be purely based on the user interaction.

https://github.com/Tendrl/gluster-integration/issues/553#issuecomment-366257806, covers what I am trying to explain here.

shtripat commented 6 years ago

If individual volumes to be enabled cluster import time user needs to select leave-as-is and suring gluster integration sync based on volume profiling enabled for few volumes, cluster level volume_profiling_state would be set as mixed.

If while while import enable/disable is selected every sync time cluster would try to apply the same for all the volumes. That's how it is at the moment.

shtripat commented 6 years ago

After the above mentioned flow, the actions enable/disable volume profiling from cluster level should invoke the flow for setting at cluster level. Once job completes, it will take a sync to reflect all the details properly in UI.