Uploaded image for project: 'OpenShift Service Mesh'
  1. OpenShift Service Mesh
  2. OSSM-2374

Deleting a SMM also deletes the SMMR in OpenShift Service Mesh

XMLWordPrintable

      Bug description:

      Service Mesh operator is deleting a ServiceMeshMemberRoll (smmr) when a ServiceMeshMember (smm) is removed manually. This an unexpected behaviour because there are more ServiceMeshMember objects created.

      Bug reproducer:

      • Initially there's no SMMR and SMM created, only a SMCP.

       

      #  oc get smcp,smm,smmr -A
      NAMESPACE      NAME         READY   STATUS            PROFILES      VERSION   AGE

      istio-system   servicemeshcontrolplane.maistra.io/basic   9/9     ComponentsReady   ["default"]   2.3.0     29m

       

      • Creating 2 SMMs (files attached)

       

      #  oc apply -f smm01.yaml 

      #  oc apply -f smm02.yaml

      NOTE: SMM can not be created with a name different of "default" because the Operator got an error like this

      Error from server: error when creating "smmr01.yaml": admission webhook "smm.validation.maistra.io" denied the request: the ServiceMeshMember resource must be named "default"

      Source: https://github.com/maistra/istio-operator/blob/maistra-2.3/pkg/controller/servicemesh/webhooks/validation/member.go#L52

      // verify name == default
          if common.MemberName != smm.Name
      Unknown macro: {         return admission.Errored(http.StatusBadRequest, fmt.Errorf("the ServiceMeshMember resource must be named %q", common.MemberName))     }

       

      • Check the current status in order to verify SMM and SMMR have been created sucessfully:

       

       

      #  oc get smm,smmr -A
      NAMESPACE            NAME                                   CONTROL PLANE        READY   AGE
      bookinfo             servicemeshmember.maistra.io/default   istio-system/basic   True    16s
      my-awesome-project   servicemeshmember.maistra.io/default   istio-system/basic   True    12s

      NAMESPACE      NAME                                       READY   STATUS       AGE
      istio-system   servicemeshmemberroll.maistra.io/default   2/2     Configured   16s

       

      • Deleting one of the SMM created previously

       

      #  oc delete smm default -n bookinfo
      servicemeshmember.maistra.io "default" deleted

       

      • Verify that SMMR has been deleted, remains the second SMM

       

      #  oc get smm,smmr -A
      NAMESPACE            NAME                                   CONTROL PLANE        READY   AGE
      my-awesome-project   servicemeshmember.maistra.io/default   istio-system/basic   True    5m10s

       

      Once SMMR is deleted, the dataplane stops working.

      Behaviour tested in OSSM 2.1, OSSM 2.2 and OSSM 2.3. As a workaround, it does not happen if the SMMR is created manually before creating SMM

        1. smmr01.yaml
          0.2 kB
        2. smmr02.yaml
          0.2 kB

          There are no Sub-Tasks for this issue.

              mluksa@redhat.com Marko Luksa
              rhn-support-jclaretm Jorge Claret Membrado
              Praneeth Bajjuri
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: