Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-11980

Edit an existing appsub results in creating another subscription with errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • ACM 2.11.0
    • ACM 2.11.0, ACM 2.8.6, ACM 2.10.4, ACM 2.9.5
    • Application Lifecycle
    • False
    • None
    • False
    • Important
    • +
    • No

      Description of problem:

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

      How reproducible:

      Steps to Reproduce:

      1. Have an appsub deployed with placementrule (yaml sample attached), but leaving the subscription spec name removed
      2. Appsub is created successfully but no resouces deployed -> this is expected as no placementrule name given, appsub don't know where to deploy the app
      3. Edit the appsub with selection on existing placementrule which created in step1 -> no errors 
      4. Wait more than 3mins for reconcile and sync up

      Actual results:

      Appsub has a new subscription created with errors ( no channel specified)

      Expected results:

      Appsub should be update correctly without new subsciprtion creation

      Additional info:

      apiVersion: v1                    
      kind: Namespace
      metadata:
        name: git-placementrule                            
      ---
      apiVersion: app.k8s.io/v1beta1
      kind: Application
      metadata:
        name: git-placementrule 
        namespace: git-placementrule 
      spec:
        componentKinds:
        - group: apps.open-cluster-management.io
          kind: Subscription
        descriptor: {}
        selector:
          matchExpressions:
            - key: app
              operator: In
              values: 
                - git-placementrule
      ---
      apiVersion: v1
      kind: Namespace
      metadata:
        name: ggithubcom-stolostron-application-lifecycle-samples-ns
      ---
      apiVersion: apps.open-cluster-management.io/v1
      kind: Channel
      metadata:
        annotations:
          apps.open-cluster-management.io/reconcile-rate: medium
        name: ggithubcom-stolostron-application-lifecycle-samples
        namespace: ggithubcom-stolostron-application-lifecycle-samples-ns
      spec:
        type: Git
        pathname: 'https://github.com/stolostron/application-lifecycle-samples.git'
      ---
      apiVersion: apps.open-cluster-management.io/v1
      kind: Subscription
      metadata:
        annotations:
          apps.open-cluster-management.io/git-branch: main
          apps.open-cluster-management.io/git-path: helloworld
          apps.open-cluster-management.io/reconcile-option: merge
        labels:
          app: git-placementrule 
        name: git-placementrule-subscription-1
        namespace: git-placementrule
      spec:
        channel: ggithubcom-stolostron-application-lifecycle-samples-ns/ggithubcom-stolostron-application-lifecycle-samples
        placement:
          placementRef:
            kind: PlacementRule
      ---
      apiVersion: apps.open-cluster-management.io/v1
      kind: PlacementRule
      metadata:
        labels:
          app: git-placementrule
        name: git-placementrule-placement-1
        namespace: git-placementrule
      spec:
        clusterSelector:
          matchLabels:
            name: local-cluster 

              fxiang@redhat.com Feng Xiang
              rhn-support-ruhong Ruici Hong
              Ruici Hong Ruici Hong
              ACM QE Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: