harbor icon indicating copy to clipboard operation
harbor copied to clipboard

Jobservice: GC logs blank page when using DB logging

Open nickhyoti opened this issue 1 year ago • 0 comments

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior:

Go to 'Clean up', you will see a table of GC runs (or if not you can run one manually) When the GC task has completed, click on 'show logs' in the table. What I would expect to see is a page showing the steps of the GC task - as you get if you set to FILE What I actually see is a blank page

Steps to reproduce the problem: Set logging on jobservice config to log to DB and set the max_retrieve_size_mb to 10MB As above, select the GC logs from the 'clean up' page

Versions: Please specify the versions of following systems.

  • harbor version: 2.8.0 onwards
  • docker engine version: 26.1.3
  • docker-compose version: 1.29.2

Additional context:

  • Harbor config files: jobservice.yml config
#Protocol used to serve
protocol: "http"

#Server listening port
port: 8080

#Worker pool
worker_pool:
  #Worker concurrency
  workers: 10
  backend: "redis"
  #Additional config if use 'redis' backend
  redis_pool:
    #redis://[arbitrary_username:password@]ipaddress:port/database_index
    redis_url: redis://redis:6379/2?idle_timeout_seconds=30
    namespace: "harbor_job_service_namespace"
    idle_timeout_second: 3600
#Loggers for the running job
job_loggers:
  # The jobLoggers backend name, only support "STD_OUTPUT", "FILE" and/or "DB"
  - name: "STD_OUTPUT"
    level: "INFO" # INFO/DEBUG/WARNING/ERROR/FATAL
  - name: "DB"
    level: "INFO"
    sweeper:
      duration: 1 #days

#Loggers for the job service
loggers:
  - name: "STD_OUTPUT" # Same with above
    level: "INFO"


reaper:
  # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24,
  max_update_hours: 24
  # the max time for execution in running state without new task created
  max_dangling_hours: 168

# the max size of job log returned by API, default is 10M
max_retrieve_size_mb: 10

nickhyoti avatar Jun 04 '24 13:06 nickhyoti