Uploaded image for project: 'Data Foundation Bugs'
  1. Data Foundation Bugs
  2. DFBUGS-2579

Prefix should not append /

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • odf-4.19
    • noobaa-nc
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • Critical
    • Proposed
    • None

      Build Version:

       

      1. rpm -qa | grep nooba

      *nooba*a-core-5.19.0-20250519.el9.x86_64

      1. mms3 account create may20acc1 --uid 1000 --gid 1000 --newBucketsPath /mnt/gpfs0/may20acc1

       

      Account may20acc1 created successfully

      1. mms3 bucket create may20buc1 --accountName may20acc1 --filesystemPath /mnt/gpfs0/may20acc1/may20buc1

      Bucket may20buc1 created successfully

      1. s3may20ac1 s3 ls

       

      2025-05-20 08:49:31 may20buc1

      1. s3may20ac1 s3 ls s3://may20buc1

       

      1. s3may20ac1 s3 cp anaconda-ks.cfg s3://may20buc1

      upload: ./anaconda-ks.cfg to s3://may20buc1/anaconda-ks.cfg 

      1. s3may20ac1 s3 ls s3://may20buc1

       

      2025-05-20 08:54:12       5447 anaconda-ks.cfg

       

      #s3may20ac1 s3api put-bucket-lifecycle-configuration   --bucket may20buc1  --lifecycle-configuration file://expirtationRules1.json

       

      1. s3may20ac1 s3api put-bucket-lifecycle-configuration   --bucket may20buc1  --lifecycle-configuration file://expirtationRules1.json

       

      1. s3may20ac1 s3api get-bucket-lifecycle-configuration --bucket may20buc1

       

      {

          "Rules": [

              {

                  "Expiration":

      {                 "Days": 4             }

      ,

                  "ID": "expire-data",

                  "Filter":

      {                 "Prefix": "data"             }

      ,

                  "Status": "Enabled"

              },

       

              {

                  "Expiration":

      {                 "Days": 2             }

      ,

                  "ID": "expire-logs",

                  "Filter":

      {                 "Prefix": "logs/"             }

      ,

                  "Status": "Enabled"

              }

          ]

      }

       

      1. s3may20ac1 s3api put-bucket-lifecycle-configuration   --bucket may20buc1  --lifecycle-configuration file://expirtationRules1.json

       

      1. s3may20ac1 s3api get-bucket-lifecycle-configuration --bucket may20buc1

       

      {

          "Rules": [

              {

                  "Expiration":

      {                 "Days": 4             }

      ,

                  "ID": "expire-data",

                  "Filter":

      {                 "Prefix": "data/"             }

      ,

                  "Status": "Enabled"

              },

              {

                  "Expiration":

      {                 "Days": 2             }

      ,

                  "ID": "expire-logs",

                  "Filter":

      {                 "Prefix": "logs/"             }

      ,

                  "Status": "Enabled"

              }

          ]

      }

      1. cd /mnt/gpfs0/may20acc1/may20buc1/
      1. cd data/

      #  for i in {1..10}; do touch -d "10 days ago" file$i.txt; done

      1. ls -lrt

      total 0

      rw-rr-. 1 root root 0 May 10 08:58 file1.txt

      rw-rr-. 1 root root 0 May 10 08:58 file2.txt

      rw-rr-. 1 root root 0 May 10 08:58 file3.txt

      rw-rr-. 1 root root 0 May 10 08:58 file4.txt

      rw-rr-. 1 root root 0 May 10 08:58 file5.txt

      rw-rr-. 1 root root 0 May 10 08:58 file6.txt

      rw-rr-. 1 root root 0 May 10 08:58 file7.txt

      rw-rr-. 1 root root 0 May 10 08:58 file8.txt

      rw-rr-. 1 root root 0 May 10 08:58 file9.txt

      rw-rr-. 1 root root 0 May 10 08:58 file10.txt

       

      1. cd logs

      #  for i in {1..10}; do touch -d "10 days ago" file$i.txt; done

      1. ls -lrt

      total 0

      rw-rr-. 1 root root 0 May 10 08:58 file1.txt

      rw-rr-. 1 root root 0 May 10 08:58 file2.txt

      rw-rr-. 1 root root 0 May 10 08:58 file3.txt

      rw-rr-. 1 root root 0 May 10 08:58 file4.txt

      rw-rr-. 1 root root 0 May 10 08:58 file5.txt

      rw-rr-. 1 root root 0 May 10 08:58 file6.txt

      rw-rr-. 1 root root 0 May 10 08:58 file7.txt

      rw-rr-. 1 root root 0 May 10 08:58 file8.txt

      rw-rr-. 1 root root 0 May 10 08:58 file9.txt

      rw-rr-. 1 root root 0 May 10 08:58 file10.txt

      1. s3may20ac1 s3 ls s3://may20buc1/data/

       

      2025-05-10 08:58:21          0 file1.txt

      2025-05-10 08:58:21          0 file10.txt

      2025-05-10 08:58:21          0 file2.txt

      2025-05-10 08:58:21          0 file3.txt

      2025-05-10 08:58:21          0 file4.txt

      2025-05-10 08:58:21          0 file5.txt

      2025-05-10 08:58:21          0 file6.txt

      2025-05-10 08:58:21          0 file7.txt

      2025-05-10 08:58:21          0 file8.txt

      2025-05-10 08:58:21          0 file9.txt

      1. s3may20ac1 s3 ls s3://may20buc1/logs/

       

      2025-05-10 08:58:34          0 file1.txt

      2025-05-10 08:58:34          0 file10.txt

      2025-05-10 08:58:34          0 file2.txt

      2025-05-10 08:58:34          0 file3.txt

      2025-05-10 08:58:34          0 file4.txt

      2025-05-10 08:58:34          0 file5.txt

      2025-05-10 08:58:34          0 file6.txt

      2025-05-10 08:58:34          0 file7.txt

      2025-05-10 08:58:34          0 file8.txt

      2025-05-10 08:58:34          0 file9.txt

       Actual output:

       

      {

          "Rules": [

              {

                  "Expiration":

      {                 "Days": 4             }

      ,

                  "ID": "expire-data",

                  "Filter":

      {                 "Prefix": "data/"             }

      ,

                  "Status": "Enabled"

              },

              {

                  "Expiration":

      {                 "Days": 2             }

      ,

                  "ID": "expire-logs",

                  "Filter":

      {                 "Prefix": "logs/"             }

      ,

                  "Status": "Enabled"

              }

          ]

      }

       

      Expected Output:

       

       

      {

          "Rules": [

              {

                  "Expiration":

      {                 "Days": 4             }

      ,

                  "ID": "expire-data",

                  "Filter":

      {                 "Prefix": "data"             }

      ,

                  "Status": "Enabled"

              },

              {

                  "Expiration":

      {                 "Days": 2             }

      ,

                  "ID": "expire-logs",

                  "Filter":

      {                 "Prefix": "logs/"             }

      ,

                  "Status": "Enabled"

              }

          ]

      }

              rayalon@redhat.com Rom Ayalon (Inactive)
              ramya.c3 Ramya MC (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: