devtron icon indicating copy to clipboard operation
devtron copied to clipboard

Bug: Getting issues while using system executor for incluster

Open ajaydevtron opened this issue 2 years ago • 1 comments

📜 Description

we are getting these three issues while using system executor for incluster:

1. Artifact downloads button are not functioning properly.

Screenshot 2024-04-09 at 6 38 40 PM

2. We are not receiving logs on the Devtron UI when post/pre pods are deleted.

Screenshot 2024-04-09 at 7 11 09 PM

error logs

  ERROR   pipeline/CiLogService.go:104    err occurred while downloading logs file       {"request": {"StorageType":"","SourceKey":"staging-v1/8255PRE-cd-118-62cy/main.log","DestinationKey":"/home/devtron/8296-cd-118-62cy-s5ls2-9j2qh.log","AwsS3BaseConfig":{"accessKey":"","passkey":"","endpointUrl":"","isInSecure":false,"bucketName":"","region":"","versioningEnabled":false},"AzureBlobBaseConfig":{"enabled":true,"accountName":"","accountKey":"","blobContainerName":""},"GcpBlobBaseConfig":{"bucketName":"","credentialFileData":""}}, "err": "blob-storage  not supported"}

3. Artifacts are not visible in Devtron jobs as well, and we cannot see CI logs if CI pods are deleted.

[Apr 09 2024 19:14:38 GMT+0530] orchestrator-staging-dcd-699fd7dcbf-ffj2s: 2024-04-09T13:44:38.310Z ERROR configure/BuildPipelineRestHandler.go:1270 service err, GetBuildLogs {"err": "blob-storage not supported", "pipelineId": 677, "workflowId": 9135, "lastEventId": ""} [Apr 09 2024 19:14:38 GMT+0530] orchestrator-d7dcbf-ffj2s: github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure.(*PipelineConfigRestHandlerImpl).GetBuildLogs [Apr 09 2024 19:14:38 GMT+0530] orchestrator-dcd-699fd7dcbf-ffj2s: /go/src/github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go:1270 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-dcd-699fd7dcbf-ffj2s: net/http.HandlerFunc.ServeHTTP [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: /usr/local/go/src/net/http/server.go:2122 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: github.com/devtron-labs/common-lib/middlewares.Recovery.func1 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: /go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/common-lib/middlewares/recovery.go:26 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: net/http.HandlerFunc.ServeHTTP [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: /usr/local/go/src/net/http/server.go:2122 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-staging-dcd-699fd7dcbf-ffj2s: github.com/devtron-labs/devtron/api/util.LoggingMiddlewareImpl.LoggingMiddleware.func1 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-staging-dcd-699fd7dcbf-ffj2s: github.com/devtron-labs/authenticator/middleware.Authorizer.func1.1 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-staging-dcd-699fd7dcbf-ffj2s: /go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/authenticator/middleware/AuthMiddleware.go:89 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: net/http.HandlerFunc.ServeHTTP [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: /usr/local/go/src/net/http/server.go:2122 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: net/http.serverHandler.ServeHTTP [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: /usr/local/go/src/net/http/server.go:2936 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: net/http.(*conn).serve [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: /usr/local/go/src/net/http/server.go:1995 [Apr 09 2024 19:14:38 GMT+0530] orchestrator-699fd7dcbf-ffj2s: 2024-04-09T13:44:38.311Z INFO common/apiError.go:118 ERROR RES {"TYPE": "API-ERROR", "RES": 500, "ERROR-MSG": [{"code":"000","internalMessage":"[{blob-storage not supported}]","userMessage":"blob-storage not supported"}], "err": null}

👟 Reproduction steps

  1. Create an app and setup the incluster fro target cluster using system executor .

Create below config map for blob storage in target namespace to sent the logs and cache

apiVersion: v1
data:
  BLOB_STORAGE_PROVIDER: S3
  BLOB_STORAGE_S3_ACCESS_KEY: AKIAWPTC
  BLOB_STORAGE_S3_SECRET_KEY: Q+rWOwY
  DEFAULT_BUILD_LOGS_BUCKET: XXXXXX
  DEFAULT_CACHE_BUCKET: XXXXXX
  DEFAULT_CACHE_BUCKET_REGION: ap-south-1
  DEFAULT_CD_LOGS_BUCKET_REGION: us-west-2
kind: ConfigMap
metadata:
  name: blob-storage-cm
  namespace: system-exe
  1. Try to trigger the post deployment and delete the post deployment pod from target cluster and see the pod logs from Devtron UI and artifacts as well .

👍 Expected behavior

it should show the logs of post deployment/Pre post and jobs pods logs after its deletion .

👎 Actual Behavior

Currently it is not showing logs

☸ Kubernetes version

1.25

Cloud provider

AWS

🌍 Browser

Chrome

🧱 Your Environment

No response

✅ Proposed Solution

No response

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

AB#9256

ajaydevtron avatar Apr 09 '24 13:04 ajaydevtron

@ajaydevtron If this is fixed by configurations. please close this issue.

vikramdevtron avatar Jun 21 '24 09:06 vikramdevtron

might be duplicate of https://github.com/devtron-labs/devtron/issues/5000

vikramdevtron avatar Jul 08 '24 11:07 vikramdevtron