Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-1703

Loki Stack pods are in not running after Loki operator is deployed successfully

XMLWordPrintable

    • False
    • False
    • NEW
    • NEW
    • undefined

      Deployed Loki Operator under lokistack namespace along with updated test secret.

      Created loki stack components but the stack pods are not up and running.

      Steps to recreate:
      1) Clone the loki operator on local https://github.com/ViaQ/loki-operator
      2) Change the CLUSTER_LOGGING_NS on line 17 in Makefile to a namespace for e.g. lokistack
      3) Run make olm-deploy REGISTRY_ORG=<quay_id> VERSION=v0.0.5
      4) Check that the Loki operator is deployed on the lokistack namespace
      5) Create the secret

      #!/bin/bash

      set -eou pipefail

      NAMESPACE=$1

      REGION=""
      ENDPOINT=""
      ACCESS_KEY_ID=""
      SECRET_ACCESS_KEY=""
      LOKI_BUCKET_NAME="kbharti-loki-bucket"

      set_credentials_from_aws() {
      REGION="$(aws configure get region)"
      ACCESS_KEY_ID="$(aws configure get aws_access_key_id)"
      SECRET_ACCESS_KEY="$(aws configure get aws_secret_access_key)"
      ENDPOINT="https://s3.${REGION}.amazonaws.com"
      }

      create_secret()

      { kubectl -n $NAMESPACE delete secret test ||: kubectl -n $NAMESPACE create secret generic test \ --from-literal=endpoint=$(echo -n "$ENDPOINT") \ --from-literal=region=$(echo -n "$REGION") \ --from-literal=bucketnames=$(echo -n "$LOKI_BUCKET_NAME") \ --from-literal=access_key_id=$(echo -n "$ACCESS_KEY_ID") \ --from-literal=access_key_secret=$(echo -n "$SECRET_ACCESS_KEY") }

      main()

      { set_credentials_from_aws create_secret }

      main
      5) Deploy the LokiStack components
      apiVersion: loki.openshift.io/v1beta1
      kind: LokiStack
      metadata:
      name: lokistack-dev
      spec:
      size: 1x.extra-small
      replicationFactor: 1
      storage:
      secret:
      name: test
      storageClassName: standard

      6) Deploy Cluster logging operator and ClusterLogging instance with fluentd

      Actual Result:
      [kbharti@cube ~]$ oc get pods
      NAME READY STATUS RESTARTS AGE
      b84a4d95536ded4f54a636c0a123b618f5a9de93997a0afd5319670fea5bxz4 0/1 Completed 0 3h20m
      loki-compactor-lokistack-dev-0 0/1 Running 14 72m
      loki-distributor-lokistack-dev-b77886694-wh6z8 0/1 Running 16 72m
      loki-ingester-lokistack-dev-0 0/1 Running 13 72m
      loki-operator-controller-manager-7c58c95c7-4tzq4 2/2 Running 0 3h19m
      loki-querier-lokistack-dev-0 0/1 Error 16 72m
      loki-query-frontend-lokistack-dev-956498f75-4qktf 0/1 Running 14 72m
      quay-io-rhn-support-kbharti-loki-operator-bundle-v0-0-5 1/1 Running 0 3h20m

      Error:
      ts=2021-08-18T16:25:13.134878614Z caller=memberlist_logger.go:74 level=warn msg="Failed to resolve loki-gossip-ring-lokistack-dev.lokicluster.svc.cluster.local:7946: lookup loki-gossip-ring-lokistack-dev.lokicluster.svc.cluster.local on 172.30.0.10:53: no such host"

              Unassigned Unassigned
              rhn-support-kbharti Kabir Bharti
              Kabir Bharti Kabir Bharti
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: