Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-5621

Quay 3.9.0 APP upgrade POD was crashed with error "Session is not logged in" for Splunk Integration

XMLWordPrintable

    • False
    • None
    • False

      Description:

      This is an issue found in Quay 3.9.0, when configuring Quay to use Splunk as Logs Model, the Quay APP Upgrade POD was crashed, checked the POD logs, get error message "splunklib.binding.AuthenticationError: Request failed: Session is not logged in.", pls review this issue.

      Splunk issue: https://community.splunk.com/t5/Splunk-Cloud-Platform/Request-failed-Session-is-not-logged-in-Error-while-running/m-p/474698 

      Quay:  quay-operator-bundle-container-v3.9.0-113

      Quay config.yaml:

      LOGS_MODEL: splunk
      LOGS_MODEL_CONFIG:
        producer: splunk
        splunk_config:
          host: quaysplunk.qe.devcluster.openshift.com
          port: 8089
          url_scheme: https
          verify_ssl: false
          bearer_token: 'eyJraWQiOiJzcGx1bmsuc2VjcmV0IiwiYWxnIjoiSFM1MTIiLCJ2ZXIiOiJ2MiIsInR0eXAiOiJzdGF0aWMifQ.eyJpc3MiOiJhZG1pbiBmcm9tIGlwLTEwLTAtMS0yMTYudXMtZWFzdC0yLmNvbXB1dGUuaW50ZXJuYWwiLCJzdWIiOiJhZG1pbiIsImF1ZCI6InF1YXkzOTAiLCJpZHAiOiJTcGx1bmsiLCJqdGkiOiJhZjhlMmQ4N2I0OTI2ZDFkOTJjZGFlMjg5MDA2OWJmNzhjYTVkZWIxYmY1OGEwZDAzYmI5MDYzMmM0YzIxYTIxIiwiaWF0IjoxNjg2MjE3ODgxLCJleHAiOjE2ODg4MDk4ODEsIm5iciI6MTY4ODgwOTg4MX0.A8vEy-wHcxjxlR6lo8ogHUefsY4dgYeMJNNMICzgvyi1YKK7X7juBCgbFN3UtUipmfN4tx5EE5JFFHxU_8GMqQ'
          index_prefix: quay390113 

      Quay Upgrade POD logs:

      oc get pod
      NAME                                             READY   STATUS     RESTARTS      AGE
      quay-operator.v3.9.0-dbdb9c5cb-rqkqh             1/1     Running    0             8h
      quay390113-clair-app-5958b87f45-mn7b2            1/1     Running    0             73s
      quay390113-clair-app-5958b87f45-wctmw            1/1     Running    0             73s
      quay390113-clair-postgres-c58467574-rqjps        1/1     Running    1 (56s ago)   73s
      quay390113-quay-app-upgrade-9qxb7                0/1     Error      3 (35s ago)   64s
      quay390113-quay-config-editor-6848df97b7-4pzc9   1/1     Running    0             64s
      quay390113-quay-database-64f7c7d885-r8k95        1/1     Running    0             73s
      quay390113-quay-mirror-6965fc7699-hb4md          0/1     Init:0/1   0             33s
      quay390113-quay-mirror-6965fc7699-lwwzb          0/1     Init:0/1   0             33s
      quay390113-quay-redis-57d994945-jtd2f            1/1     Running    0             73s
      
      
      oc logs quay390113-quay-app-upgrade-9qxb7
         __   __
        /  \ /  \     ______   _    _     __   __   __
       / /\ / /\ \   /  __  \ | |  | |   /  \  \ \ / /
      / /  / /  \ \  | |  | | | |  | |  / /\ \  \   /
      \ \  \ \  / /  | |__| | | |__| | / ____ \  | |
       \ \/ \ \/ /   \_  ___/  \____/ /_/    \_\ |_|
        \__/ \__/      \ \__
                        \___\ by Red Hat
       Build, Store, and Distribute your Containers
      
      
      Startup timestamp: 
      Thu Jun  8 10:06:24 UTC 2023
      
      
      Entering migration mode to version: head
      /app/lib/python3.9/site-packages/tzlocal/unix.py:141: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        while start is not 0:
      /app/lib/python3.9/site-packages/magic.py:193: SyntaxWarning: "is" with a literal. Did you mean "=="?
        if result is -1:
      Traceback (most recent call last):
        File "/app/lib/python3.9/site-packages/splunklib/binding.py", line 292, in wrapper
          return request_fun(self, *args, **kwargs)
        File "/app/lib/python3.9/site-packages/splunklib/binding.py", line 73, in new_f
          val = f(*args, **kwargs)
        File "/app/lib/python3.9/site-packages/splunklib/binding.py", line 699, in get
          response = self.http.get(path, all_headers, **query)
        File "/app/lib/python3.9/site-packages/splunklib/binding.py", line 1232, in get
          return self.request(url, { 'method': "GET", 'headers': headers })
        File "/app/lib/python3.9/site-packages/splunklib/binding.py", line 1304, in request
          raise HTTPError(response)
      splunklib.binding.HTTPError: HTTP 401 Unauthorized -- call not properly authenticated
      
      
      During handling of the above exception, another exception occurred:
      
      
      Traceback (most recent call last):
        File "/app/bin/alembic", line 8, in <module>
          sys.exit(main())
        File "/app/lib/python3.9/site-packages/alembic/config.py", line 575, in main
          CommandLine(prog=prog).main(argv=argv)
        File "/app/lib/python3.9/site-packages/alembic/config.py", line 569, in main
          self.run_cmd(cfg, options)
        File "/app/lib/python3.9/site-packages/alembic/config.py", line 546, in run_cmd
          fn(
        File "/app/lib/python3.9/site-packages/alembic/command.py", line 298, in upgrade
          script.run_env()
        File "/app/lib/python3.9/site-packages/alembic/script/base.py", line 489, in run_env
          util.load_python_file(self.dir, "env.py")
        File "/app/lib/python3.9/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
          module = load_module_py(module_id, path)
        File "/app/lib/python3.9/site-packages/alembic/util/compat.py", line 173, in load_module_py
          spec.loader.exec_module(module)
        File "<frozen importlib._bootstrap_external>", line 850, in exec_module
        File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
        File "data/migrations/env.py", line 13, in <module>
          from app import app
        File "/quay-registry/app.py", line 344, in <module>
          logs_model.configure(app.config)
        File "/quay-registry/data/logs_model/__init__.py", line 67, in configure
          logs_model.initialize(_LOG_MODELS[model_name](**model_config))
        File "/quay-registry/data/logs_model/splunk_logs_model.py", line 26, in __init__
          self._logs_producer.initialize(SplunkLogsProducer(**splunk_config))
        File "/quay-registry/data/logs_model/logs_producer/splunk_logs_producer.py", line 54, in __init__
          self.index = service.indexes[index_prefix]
        File "/app/lib/python3.9/site-packages/splunklib/client.py", line 1376, in __getitem__
          response = self.get(key)
        File "/app/lib/python3.9/site-packages/splunklib/client.py", line 1804, in get
          return super(Collection, self).get(name, owner, app, sharing, **query)
        File "/app/lib/python3.9/site-packages/splunklib/client.py", line 862, in get
          return self.service.get(path,
        File "/app/lib/python3.9/site-packages/splunklib/binding.py", line 304, in wrapper
          raise AuthenticationError(
      splunklib.binding.AuthenticationError: Request failed: Session is not logged in. 

              Unassigned Unassigned
              lzha1981 luffy zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: