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

No indication of error when deploying an IstioCNI resource to non-existent namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • OSSM 3.0-TP1
    • OSSM 3.0-TP1
    • Project Sail
    • None
    • False
    • None
    • False
    • Hide
      ❯ cat cni.yaml
      apiVersion: operator.istio.io/v1alpha1
      kind: IstioCNI
      metadata:
        name: istio-test
      spec:
        namespace: non-existent
        version: v1.21.0
        profile: openshift
      ❯ k apply -f cni.yaml
      istiocni.operator.istio.io/istio-test created
      ❯ k get istiocnis.operator.istio.io
      NAME         READY   STATUS   VERSION   AGE
      istio-test                    v1.21.0   9s
      ❯ k describe istiocnis.operator.istio.io istio-test
      Name:         istio-test
      Namespace:
      Labels:       <none>
      Annotations:  <none>
      API Version:  operator.istio.io/v1alpha1
      Kind:         IstioCNI
      Metadata:
        Creation Timestamp:  2024-03-21T10:35:53Z
        Finalizers:
          operator.istio.io/sail-operator
        Generation:        1
        Resource Version:  855247
        UID:               c5781b33-3aa0-40bf-b171-228316412df5
      Spec:
        Namespace:  non-existent
        Profile:    openshift
        Version:    v1.21.0
      Events:       <none>
      ❯ k logs -n openshift-operators deployments/servicemesh-operator3 | grep ERROR | tail -n1
      2024-03-21T10:36:37Z    ERROR    ctrlr.istiocni    Reconciler error    {"IstioCNI": "istio-test", "reconcileID": "ece55233-3139-4293-80d9-ca40b82dcfff", "error": "failed to install helm chart cni: create: failed to create: namespaces \"non-existent\" not found"}
      Show
      ❯ cat cni.yaml apiVersion: operator .istio.io/v1alpha1 kind: IstioCNI metadata:   name: istio-test spec:   namespace: non-existent   version: v1.21.0   profile: openshift ❯ k apply -f cni.yaml istiocni. operator .istio.io/istio-test created ❯ k get istiocnis. operator .istio.io NAME         READY   STATUS   VERSION   AGE istio-test                    v1.21.0   9s ❯ k describe istiocnis. operator .istio.io istio-test Name:         istio-test Namespace: Labels:       <none> Annotations:  <none> API Version:   operator .istio.io/v1alpha1 Kind:         IstioCNI Metadata:   Creation Timestamp:  2024-03-21T10:35:53Z   Finalizers:     operator .istio.io/sail- operator   Generation:        1   Resource Version:  855247   UID:               c5781b33-3aa0-40bf-b171-228316412df5 Spec:   Namespace:  non-existent   Profile:    openshift   Version:    v1.21.0 Events:       <none> ❯ k logs -n openshift-operators deployments/servicemesh-operator3 | grep ERROR | tail -n1 2024-03-21T10:36:37Z    ERROR    ctrlr.istiocni    Reconciler error    { "IstioCNI" : "istio-test" , "reconcileID" : "ece55233-3139-4293-80d9-ca40b82dcfff" , "error" : "failed to install helm chart cni: create: failed to create: namespaces \" non-existent\ " not found" }

      When creating an IstioCNI resource with .spec.namespace set to a namespace that does not exist, the resource does not get any status, which requires the user to look through the operator logs for the cause.

      Cf the same situation with Istio resource, which does get a ReconcileError with message failed to create: namespaces "non-existent" not found

            mluksa@redhat.com Marko Luksa
            asmigala@redhat.com Andrej Smigala
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: