Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-43659

edit operation of the CR etcd default Backup doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.18
    • Etcd
    • None
    • Moderate
    • None
    • ETCD Sprint 261
    • 1
    • False
    • Hide

      None

      Show
      None

      Description of problem:

          editing the CR for default etcd Backup doesn't work

      Version-Release number of selected component (if applicable):

          pre-merge test -> 4.18.0-0.test-2024-10-22-063925-ci-ln-gq41mft-latest

      How reproducible:

          always

      Steps to Reproduce:

          1.enable the AutomatedBackup featuregate 
      oc apply -f openshift/cluster-etcd-operator/hack/featuregate_backup.yaml 
      
      
          2.apply the CR
      
      apiVersion: config.openshift.io/v1alpha1
      kind: Backup
      metadata:
        name: default
      spec:
        etcd:
          schedule: "* * * * *"
          timeZone: "UTC"
          retentionPolicy:
            retentionType: RetentionNumber
            retentionNumber:
              maxNumberOfBackups: 2
      
      
      
           3. verify that two bakups are created in the node.
      
      oc debug no/ip-10-0-121-85.ec2.internal
      Starting pod/ip-10-0-121-85ec2internal-debug-gvvcf ...
      To use host binaries, run `chroot /host`
      Pod IP: 10.0.121.85
      If you don't see a command prompt, try pressing enter.
      sh-5.1# chroot /host
      sh-5.1# cd var/lib/etcd-auto-backup/
      sh-5.1# ls -lrt total 0
      drwxr-xr-x. 2 root root 96 Oct 22 08:40 2024-10-22_084000
      drwxr-xr-x. 2 root root 96 Oct 22 08:41 2024-10-22_084100
            
      
      4. edit the CR.
      oc edit Backup default
      and change the maxNumberOfBackups from 2 to 3.
      backup.config.openshift.io/default edited
      
      oc get Backup default -oyaml
      ................
      spec:
        etcd:
          retentionPolicy:
            retentionNumber:
              maxNumberOfBackups: 3
            retentionType: RetentionNumber
          schedule: '* * * * *'
          timeZone: UTC
      
      
      
      
      
      

      Actual results:

          Only two backups continue to be present.
      
      sh-5.1# ls -lrt
      total 0
      drwxr-xr-x. 2 root root 96 Oct 22 08:48 2024-10-22_084800
      drwxr-xr-x. 2 root root 96 Oct 22 08:49 2024-10-22_084900
      

      Expected results:

          Was expecting 3 backups to be present after the edit operation is successfully performed. 

      Additional info:

          

              melbeher@redhat.com Mustafa Elbehery
              rhn-support-skundu Sandeep Kundu
              Sandeep Kundu Sandeep Kundu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: