-
Notifications
You must be signed in to change notification settings - Fork 82
Implement Snapshot Config #1228
base: master
Are you sure you want to change the base?
Conversation
@prashanthpai , As far as I understand Metadata can only use as a tag. It cannot have different states, or in other words, it can not perform collective actions of its own. Using metadata, We can list all snapshots, delete all snapshots. But it cannot take intelligent decisions like when should we delete. For that reason, extending metadata won't be a feasible solution at the moment. |
"tags" should be key=value pairs. While they aren't to be interpreted by "core", it's fair game for plugins and peripheral entities to use them. For example, the operator will communicate w/ IVP and auto volume balancing (I need a new name) via the value of node-level tags. Is key=value sufficient for your purposes? |
@rafikc30 What is generally referred as tags or labels in other projects, we call them metadata (key-value pairs). They are not meant to be interpreted by core. There is no inherent meaning (or actions) attached to these arbitrary strings in the core glusterd2. If you wish to implement snapshot scheduler as an external entity/daemon or a glusterd2 plugin, you can use the metadata infrastructure.
The core is not supposed to - regardless of whether you call them labels, tags or metadata. On the issue you mention:
You can use metadata for all of these usecases. These higher level actions are performed by user or some external entity. For example:
The core of glusterd2 will not be doing these automatic operations. You can do it as an external daemon or a plugin. As snapshot is considered core in glusterd2, if you want these automatic operations to be done as core, you might as well make these operations concrete with a well-defined API to schedule+prune snapshots and not use metadata which is arbitrary. What other specific and real-world usecase does your labels proposal solve beyond snapshot for it to be a generic infrastructure ? As pointed out earlier, this discussion is best done over the issue. |
@aravindavk @kshlm Would like to get this picked up for GCS/0.4 milestone |
Labels are used to tag different object, and perform collective operation based on label configuration values More information on #issue:1094 Signed-off-by: Mohammed Rafi KC <[email protected]>
This PR contains glustercli and client implementation for labels Signed-off-by: Mohammed Rafi KC <[email protected]>
This PR contains changes to support auto delete and activate on create Signed-off-by: Mohammed Rafi KC <[email protected]>
Signed-off-by: Mohammed Rafi KC <[email protected]>
With this PR, snapshot delete all can be performed on a volume name, label or both volume name and lable name. If both volume name and lable name has not given, then it will delete all snapshots in the cluster Signed-off-by: Mohammed Rafi KC <[email protected]>
@kshlm can you please add this to your review backlog ? |
@rafikc30 was there any further discussion about metadata vs labels between you and @prashanthpai? The conversation seems to have stopped in between. |
The discussion were moved to the issue #1094. Initially the PR was submitted as labels being a general use case api where it can be used for volumes,snapshots, etc. But then we decided to move to snapshot alone (please see the issue 1094), because at the moment snapshot were the only consumer. |
Labels are used to tag different object, and perform
collective operation based on label configuration values
More information on issue #1094
Signed-off-by: Mohammed Rafi KC [email protected]