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

The statefulset thanos-ruler-user-workload lacks serviceName

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Minor Minor
    • 4.14.0
    • 4.14.0
    • Monitoring
    • +
    • Informational
    • No
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required

      Description of problem:

      The statefulset thanos-ruler-user-workload no serviceName. As the document described, the serviceName is a must for Statefulset. I'm not sure if we need service here, but one question, if we don't need service, why not use a regular Deployment? Thanks!

      MacBook-Pro:k8sgpt jianzhang$ oc explain statefulset.spec.serviceName 
      KIND:     StatefulSet
      VERSION:  apps/v1FIELD:    serviceName <string>DESCRIPTION:
           serviceName is the name of the service that governs this StatefulSet. This
           service must exist before the StatefulSet, and is responsible for the
           network identity of the set. Pods get DNS/hostnames that follow the
           pattern: pod-specific-string.serviceName.default.svc.cluster.local where
           "pod-specific-string" is managed by the StatefulSet controller.
      
      MacBook-Pro:k8sgpt jianzhang$ oc get statefulset -n openshift-user-workload-monitoring -o=jsonpath={.spec.serviceName}
      MacBook-Pro:k8sgpt jianzhang$ 
      
      MacBook-Pro:k8sgpt jianzhang$ oc get statefulset -n openshift-user-workload-monitoring
      NAME                         READY   AGE
      prometheus-user-workload     2/2     4h44m
      thanos-ruler-user-workload   2/2     4h44m
      
      MacBook-Pro:k8sgpt jianzhang$ oc get svc -n openshift-user-workload-monitoring
      NAME                                      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                       AGE
      prometheus-operated                       ClusterIP   None            <none>        9090/TCP,10901/TCP            4h44m
      prometheus-operator                       ClusterIP   None            <none>        8443/TCP                      4h44m
      prometheus-user-workload                  ClusterIP   172.30.46.204   <none>        9091/TCP,9092/TCP,10902/TCP   4h44m
      prometheus-user-workload-thanos-sidecar   ClusterIP   None            <none>        10902/TCP                     4h44m
      thanos-ruler                              ClusterIP   172.30.110.49   <none>        9091/TCP,9092/TCP,10901/TCP   4h44m
      thanos-ruler-operated                     ClusterIP   None            <none>        10902/TCP,10901/TCP           4h44m
      
      
      

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

      MacBook-Pro:k8sgpt jianzhang$ oc get clusterversion
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.14.0-0.nightly-2023-05-31-080250   True        False         7h30m   Cluster version is 4.14.0-0.nightly-2023-05-31-080250

      How reproducible:

      always

      Steps to Reproduce:

      1. Install OCP 4.14 cluster.
      2. Check cluster's statefulset instances or run `k8sgpt analyze -d`
      3.
      

      Actual results:

      MacBook-Pro:k8sgpt jianzhang$ k8sgpt analyze -d
      Service nfs-provisioner/example.com-nfs does not exist
      AI Provider: openai
      
      
      0 openshift-user-workload-monitoring/thanos-ruler-user-workload(thanos-ruler-user-workload)
      - Error: StatefulSet uses the service openshift-user-workload-monitoring/ which does not exist.
        Kubernetes Doc: serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller.

      Expected results:

      There is the serviceName for statefulset.

      Additional info:

       

            rh-ee-amrini Ayoub Mrini
            rhn-support-jiazha Jian Zhang
            Junqi Zhao Junqi Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: