Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-3816 Erasure Coding
  3. HDDS-6232

EC: Update help strings for replication config




      The help for the "ozone sh bucket create" command does not align with the validation:

      $ ozone sh bucket create -h         
      Usage: ozone sh bucket create [-ghV] [-k=<bekName>] [-l=<allowedBucketLayout>]
                                    [--quota=<quotaInBytes>] [-r=<replication>]
                                    [-t=<replicationType>] [-u=<ownerName>] <value>
      creates a bucket in a given volume
            <value>              URI of the volume/bucket.
                                 Ozone URI could start with o3:// or without prefix.
                                   URI may contain the host/serviceId and port of the
                                   OM server. Both are optional. If they are not
                                   specified it will be identified from the config
        -g, --enforcegdpr        if true, indicates GDPR enforced bucket,
                                   false/unspecified indicates otherwise
        -h, --help               Show this help message and exit.
        -k, --bucketkey=<bekName>
                                 bucket encryption key name
        -l, --layout=<allowedBucketLayout>
                                 Allowed Bucket Layouts: FILE_SYSTEM_OPTIMIZED,
                                 For volume this parameter represents the number of
                                   buckets, and for buckets represents the number of
                                   keys (eg. 5)
            --quota, --space-quota=<quotaInBytes>
                                 The maximum space quota can be used (eg. 1GB)
        -r, --replication=<replication>
                                 Replication value. Example: 3 (for Ratis type) or 1
                                   ( for standalone type). In the case of EC, pass
                                   DATA-PARITY, eg 3-2, 6-3, 10-4
        -t, --type=<replicationType>
                                 Replication type. Supported types are RATIS,
                                   STANDALONE, EC
        -u, --user=<ownerName>   Owner of the bucket. Defaults to current user if not
        -V, --version            Print version information and exit.
      bash-4.2$ ozone sh bucket create -t EC -r 3-2 /vol1/ec
      EC replication config should be defined in the form rs-3-2-1024k, rs-6-3-1024; or rs-10-4-1024k.Provided configuration was: 3-2

      Note it says "In the case of EC, pass DATA-PARITY, eg 3-2, 6-3, 10-4"

      However passing that gives an error. You need to pass "rs-3-2-1024k".

      We need to either fix the help text, or make the validation more flexible to default to RS and 1024k if they are not in the string.

      There is also a missing space in the error:

      "... or rs-10-4-1024k.Provided configuration was: 3-2"


        Issue Links



              ckj Kaijie Chen
              sodonnell Stephen O'Donnell
              0 Vote for this issue
              1 Start watching this issue