Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

Swarm Versioning is an optional feature introduced in release 8.0; it is modeled modelled on Amazon S3 Versioning to extend Gateway's support for S3.

Table of Contents
maxLevel2

Guidelines for Versioning

Review these guidelines before implementing versioning in your cluster:

  • Plan for higher disk utilization with versioning: each update to a versioned object adds a new object to the cluster (one object updated twice results in three objects stored).

  • Make use of lifepoints to of lifepoints (Lifepoint Metadata Headers) to control the lifetime - and thus the cost of storing - multiple versions of your objects.

  • For resource management, limit versioning to the specific domains and/or buckets for which it is needed.

  • For best performance, enable the the Overlay Index (Configuring the Overlay Index) on your cluster.

  • When replicating between clusters that both enable versioning, avoid unnecessary updates to versioning policies: new policies cannot take effect in the remote cluster until the domain or bucket is replicated, which may take a while.

  • Legal hold buckets cannot be versioning-enabled. If using legal hold, the ETag header value (which is the version identifier) needs to be used to hold a previous object version. 

  • Upgrades: Versioning is integrated with Swarm and available on upgrade, but take these steps before enabling versioning:

Configuring

...

Versioning

Versioning is one of several content protection features in Swarm, all are controlled by way of policies. Swarm evaluates policies for each object based on its cluster and context values:

  • Policy-related settings for the cluster (required

  • Policy-related headers on domain and bucket objects (optional)

For how to set policies at the cluster level, see Configuring Cluster Policies.

Context

The versioning state of a given object depends on its context:

  • Alias object — Object: context = cluster + domain in which it is tenanted

  • Named object — Object: context = cluster + domain + bucket

Info

Important

Untenanted alias objects cannot be versioned. Alias objects are always tenanted if cluster.enforceTenancy is enabled in the cluster (which is required for Gateway). 

Policy 

Swarm uses the versioning policy (set via cluster settings and domain/bucket headers) to determine what versioning-related operations are allowed on each object. The versioning state of the immediate context applies to every object in that context, without exception. 

Each alias or named object has one of three versioning states

disabled

(default)
No versioning exists, so no versions are created; obsolete versions are lost.

This state is the normal behavior of Swarm.

If you change the state from enabled to disabled, the health processor erases the prior versions, which are now obsolete.

suspended

No new versions are accumulated but old versions are retained.

This is a hybrid between enabled and disabled that preserves history.

If you re-enable versioning from this state, the chain of versions
resumes from where it stopped.

enabled

New versions are accumulated as they are created, starting with any version
that exists at the time versioning becomes enabled for the object.



To implement versioning, you need to enable it by setting your versioning policy across all affected container objects, starting with the cluster:

  • Cluster Cluster: set the configuration parameter policy.versioning. (This is a persisted setting Persisted Settings (SNMP), so set it via SNMP.)

  • Domain(s) : set the domain object's Policy-Versioning and Policy-Versioning-Unnamed  header values. 

  • Bucket(s) — set : set the bucket object's Policy-Versioning header value.

Info

Important

Setting a header does not necessarily enable versioning. For example, you may have added Policy-Versioning: enabled to a bucket, but it has no effect if its domain does not have versioning explicitly enabled.  

Status

...

Settings

The statuses for versioning vary by type of container object: 


Setting

Values

Description

Cluster

Config parameter:
policy.versioning

disallowed
suspended
allowed

Status of versioning within the cluster. Defaults to disallowed.

Info

Important

:

This is a

persisted setting

Persisted Settings (SNMP), so set it by SNMP, not via configuration file:

snmpset -m +CARINGO-CASTOR-MIB -v2c -M +/usr/share/snmp/mib2c-data -cPASSWORD -OQs
{swarm-ip} clusterConfig.policyVersioning s "allowed"

Domain 

Object header:
Policy-Versioning

disabled
suspended
enabled
required

Status of versioning for named objects within the domain, subject to the cluster setting.
If the header is missing, the value is considered unspecified and versioning is disabled.

Info

Important

:

To guarantee every bucket in a domain is versioned, set the domain's versioning state to required.

Add a Policy-Versioning: {value} header using an SCSP PUT or COPY request on the domain object.

Object header:
Policy-Versioning-Unnamed

disabled
suspended
enabled

Status of versioning for unnamed objects that are tenanted in the domain, subject to the cluster setting.
If the header is missing, the value is considered unspecified and versioning is disabled.

Add a Policy-Versioning-Unnamed: {value} header using an SCSP PUT or COPY request on the domain object.

Bucket

Object header:
Policy-Versioning

disabled
suspended
enabled

Status of versioning within the specific bucket, subject to the cluster and domain settings.
If the header is missing, the value is considered unspecified and versioning is disabled.

Info

Important

: If

If the domain state is enabled, no bucket is versioned until it has its state changed to enabled.

Add a Policy-Versioning: {value} header using an SCSP PUT or COPY request bucket object.

You can verify versioning is enabled within a domain or bucket by making a HEAD request and checking the policy-related headers, Policy-Versioning[-Unnamed] (which you add) and Policy-Versioning[-Unnamed]-Evaluated (which Swarm generates). You control all Policy-Versioning[-Unnamed] headers, but Swarm computes and Policy-Versioning[-Unnamed]-Evaluated based on the policy of the complete context.

The versioning state of a domain depends on the cluster's state:

Domain

Cluster


disabled


suspended


enabled


required (buckets only)

disallowed

disabled

disabled

disabled

disabled

suspended

disabled

suspended

suspended

suspended

allowed

disabled

suspended

enabled

enabled

...

Note

When the state is unspecified, it defaults to disabled. In a cluster that has versioning allowed, every newly created domain and bucket starts with an unspecified state, so object versioning is disabled until you enable it there explicitly.

The versioning state of a bucket depends on the parent domain's state:

Bucket

Domain


disabled


suspended


enabled

disabled

disabled

disabled

disabled

suspended

disabled

suspended

suspended

enabled

disabled

suspended

enabled

required

enabled

enabled

enabled

Managing Policies across Clusters

If you are using replication feedsReplication Feeds while using versioning, both the source and target clusters must run the same release of Swarm, but you choose how versioning occurs in the target:

Goal for Target

Target Cluster Policy

Effect

No versioning

(default)
policy.versioning = disallowed

In the target cluster, Swarm maintains the current versions (no versioning) and cleans up any obsolete versions that are replicated.

The domain and bucket objects replicate with the same policies, but the cluster-wide setting overrides them.

No versioning,
access to versions

policy.versioning = suspended

In the target cluster, Swarm does not accumulate versions on local updates but preserves all prior replicated versions.

Identical versioning

policy.versioning = allowed

In the target cluster, Swarm performs versioning identically to the source cluster.

The health processors in each cluster do the work of repairing the sequence of prior versions as they expand on both sides.

Info

Important

To guarantee faithful replication in your target cluster, change domain and bucket policies before changing the content they contain.

Custom versioning

policy.versioning = allowed
and
special syntax on custom policies

In the target cluster, Swarm performs versioning identically to the source cluster, except where you configured special context policies.

Contact DataCore Support for the specific syntax needed to override policies at the domain or bucket level.

Policies are carried on contexts, and a remote cluster evaluates policies locally based on the contexts it currently holds. Rapid changes to policies in a source cluster with changing content in those domains and buckets returns the correct results, but when those changes are replicated to the target cluster, results may differ.