docker에서 실행되는 redash 문제 및 대책
개요
redash는 복수의 컨테이너로 구성된다.
싹둑 역할은 다음과 같다.
redash_worker_1
데이터의 결과 취득에 시간이 걸리는 경우가 많기 때문에,
실제의 쿼리를 실행하는 처리는 이 컨테이너가 실시한다.
celery라는 Python의 job queue 처리를 하기 위한 프레임워크가 사용되고 있다.
이하의 2종류 존재하고 있다
adhoc workers
임시로 실행한 쿼리 처리
scheduled queries workers
예약된 대로 쿼리 실행
전환은 cellery worker 기동시에 -Q 옵션으로 제어된다.
1개의 worker로 양쪽의 기능을 담당하는 것도, 별도의 worker로 나누는 것도 가능.
redash_nginx_1
웹 서버 역방향 프록시로 실행
redash_server_1
파이썬으로 구현된 웹 콘솔 화면.
기본적으로이 화면을 이용하여 사용자는 쿼리를 발행하고 데이터를 시각화합니다.
Application Server로서 gunicorn이 사용되고 있다.
redash_redis_1
celery에서는 쿼리를 모아두는 장소로 redis를 이용할 수 있다.
이 redis 내에 server로부터 job가 queue에 등록되어, worker가 인출해 실행을 실시한다.
redash_postgres_1
사용자 정보와 작성한 Query/Dashboard의 정보가 저장됩니다.
문제해결
컨테이너의 리소스 상태를 확인하고 싶습니다.
redash라고 할까, docker에서의 관리의 이야기가 되지만,
ctop이라는 명령을 사용하면 관리하기 쉽습니다.
htps : // m / S-T / ms / d5 A 43076 A 51f5814 예 32
쿼리가 반환되지 않음
test connection은 OK에서도 쿼리를 발행하면 돌아오지 않을 때가 있다.
컨테이너 하나하나 살펴보면 worker에서 처리가 오지 않은 것으로 나타났다.
일정에 등록된 쿼리가 너무 많습니까? 라는 가설에 이르렀다.
생각해보면 스케줄되어 있어야 할 필요성도 없다.
QUEUES마다 worker 프로세스를 나누어 보기로 했다.
를 끄기로 결정했다.
appears only in the queue list of "redash_celery_scheduled"
before
worker:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery"
WORKERS_COUNT: 1
restart: always
after
worker 컨테이너를 3분할했다
worker-queries:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries"
WORKERS_COUNT: 1
restart: always
worker-scheduled_queries:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "scheduled_queries"
WORKERS_COUNT: 1
restart: always
worker-celery:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "celery"
WORKERS_COUNT: 1
restart: always
컨테이너를 분리한 후 ctop에서 리소스를 다시 확인한 결과
worker-celery가 극단적으로 CPU를 사용하기 시작했습니다.
celery라는 Python의 job queue 처리로 뭔가 막힌 것 같다.
잠시 후 해소했다.
redash의 versionUP
다음의 흐름으로 실시한다
0. Postgress 데이터 백업
1. 컨테이너를 멈추고 삭제
2. docker-compose 파일 수정
3. DB의 스키마 변경 처리를 한다
4. redash 시작
Postgres 데이터 백업
docker ps
docker exec -it redash_postgres_1 /bin/bash
pg_dump -U postgres postgres | gzip > /tmp/redash_backup.gz
exit
docker cp redash_postgres_1:/tmp/redash_backup.gz .
컨테이너를 멈추고 삭제
docker stop redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
docker rm redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
docker-compose 파일 수정
#image: redash/redash:latest
image: redash/redash:4.0.0-rc.1
DB 스키마 변경 처리
htps : // r. 이 m/게 t레다 sh/레다 sh/아
에서 @arikfr 씨가 제안해 주는 명령을 실시했지만,
에러가 나오는 것도 아니고, 무슨 일이 일어났는지 모른다.
그러나 브라우저에서 화면을 확인하면 500error가 되고 있다.
# docker-compose run --rm server manage db upgrade
Starting redash_redis_1
[2018-03-29 05:52:16,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 05:52:16,586][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
#
잘 생각하면,
compose를 시작할 때 yml 파일을 지정하지 않았습니다. .
# docker-compose -f docker-compose.production.yml run --rm server manage db upgrade
[2018-03-29 06:05:30,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 06:05:30,585][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 06:05:32,423][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 06:05:32,424][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
[2018-03-29 06:05:32,433][PID:1][INFO][alembic.runtime.migration] Running upgrade d1eae8b9893e -> 7671dca4e604, empty message
[2018-03-29 06:05:32,439][PID:1][INFO][alembic.runtime.migration] Running upgrade 7671dca4e604 -> 5ec5c84ba61e, Add Query.search_vector field for full text search.
[2018-03-29 06:05:32,565][PID:1][INFO][alembic.runtime.migration] Running upgrade 5ec5c84ba61e -> 6b5be7e0a0ef, Re-index Query.search_vector with existing queries.
[2018-03-29 06:05:32,661][PID:1][INFO][alembic.runtime.migration] Running upgrade 6b5be7e0a0ef -> 969126bd800f, Update widget's position data based on dashboard layout.
Updating dashboards position data:
Updating dashboard: 1
Building widgets map:
Widget: 1
Widget: 2
Iterating over layout:
Row: 0 - [1, 2]
Column: 0 - 1
Column: 1 - 2
Updating dashboard: 2
Building widgets map:
Widget: 3
Iterating over layout:
Row: 0 - [3]
Column: 0 - 3
Updating dashboard: 4
Building widgets map:
Widget: 18
Iterating over layout:
Row: 0 - [18]
Column: 0 - 18
Updating dashboard: 5
Building widgets map:
Widget: 21
Widget: 22
Widget: 31
Widget: 32
Widget: 41
Widget: 42
Widget: 82
Widget: 93
Iterating over layout:
Row: 0 - [93]
Column: 0 - 93
Row: 1 - [21]
Column: 0 - 21
Row: 2 - [22]
Column: 0 - 22
Row: 3 - [31]
Column: 0 - 31
Row: 4 - [32]
Column: 0 - 32
Row: 5 - [41]
Column: 0 - 41
Row: 6 - [42]
Column: 0 - 42
Row: 7 - [82]
Column: 0 - 82
Updating dashboard: 9
Building widgets map:
Widget: 53
Widget: 94
Iterating over layout:
Row: 0 - [94]
Column: 0 - 94
Row: 1 - [53]
Column: 0 - 53
Updating dashboard: 7
Building widgets map:
Widget: 38
Widget: 40
Widget: 95
Iterating over layout:
Row: 0 - [95]
Column: 0 - 95
Row: 1 - [38]
Column: 0 - 38
Row: 2 - [40]
Column: 0 - 40
Updating dashboard: 11
Building widgets map:
Widget: 71
Widget: 67
Widget: 70
Iterating over layout:
Row: 0 - [67]
Column: 0 - 67
Row: 1 - [70]
Column: 0 - 70
Row: 2 - [71]
Column: 0 - 71
Updating dashboard: 3
Building widgets map:
Widget: 5
Widget: 11
Widget: 13
Widget: 14
Widget: 15
Widget: 16
Widget: 17
Widget: 28
Widget: 51
Widget: 77
Widget: 78
Widget: 80
Iterating over layout:
Row: 0 - [14, 15]
Column: 0 - 14
Column: 1 - 15
Row: 1 - [17, 16]
Column: 0 - 17
Column: 1 - 16
Row: 2 - [11, 13]
Column: 0 - 11
Column: 1 - 13
Row: 3 - [28]
Column: 0 - 28
Row: 4 - [5]
Column: 0 - 5
Row: 5 - [77, 78]
Column: 0 - 77
Column: 1 - 78
Row: 6 - [51, 80]
Column: 0 - 51
Column: 1 - 80
Updating dashboard: 13
Building widgets map:
Widget: 83
Iterating over layout:
Row: 0 - [83]
Column: 0 - 83
Updating dashboard: 14
Building widgets map:
Iterating over layout:
Updating dashboard: 12
Building widgets map:
Iterating over layout:
Row: 0 - [
Column: 0 - [
Row: 1 - ]
Column: 0 - ]
Updating dashboard: 16
Building widgets map:
Widget: 102
Widget: 103
Widget: 104
Widget: 105
Iterating over layout:
Row: 0 - [102, 103]
Column: 0 - 102
Column: 1 - 103
Row: 1 - [104, 105]
Column: 0 - 104
Column: 1 - 105
Updating dashboard: 6
Building widgets map:
Widget: 25
Widget: 26
Widget: 29
Widget: 30
Widget: 33
Widget: 34
Widget: 43
Widget: 45
Widget: 46
Widget: 47
Widget: 48
Widget: 91
Iterating over layout:
Row: 0 - [91, 48]
Column: 0 - 91
Column: 1 - 48
Row: 1 - [47, 45]
Column: 0 - 47
Column: 1 - 45
Row: 2 - [46]
Column: 0 - 46
Row: 3 - [43]
Column: 0 - 43
Row: 4 - [25]
Column: 0 - 25
Row: 5 - [26]
Column: 0 - 26
Row: 6 - [29]
Column: 0 - 29
Row: 7 - [30]
Column: 0 - 30
Row: 8 - [33]
Column: 0 - 33
Row: 9 - [34]
Column: 0 - 34
Updating dashboard: 10
Building widgets map:
Widget: 57
Widget: 59
Widget: 61
Widget: 63
Widget: 65
Widget: 62
Widget: 92
Iterating over layout:
Row: 0 - [92]
Column: 0 - 92
Row: 1 - [62]
Column: 0 - 62
Row: 2 - [57]
Column: 0 - 57
Row: 3 - [63]
Column: 0 - 63
Row: 4 - [59]
Column: 0 - 59
Row: 5 - [65]
Column: 0 - 65
Row: 6 - [61]
Column: 0 - 61
Updating dashboard: 17
Building widgets map:
Widget: 108
Widget: 107
Widget: 109
Widget: 110
Widget: 111
Iterating over layout:
Row: 0 - [108]
Column: 0 - 108
Row: 1 - [109]
Column: 0 - 109
Row: 2 - [107]
Column: 0 - 107
Row: 3 - [110, 111]
Column: 0 - 110
Column: 1 - 111
Updating dashboard: 15
Building widgets map:
Widget: 98
Widget: 99
Widget: 100
Widget: 101
Iterating over layout:
Row: 0 - [99, 100]
Column: 0 - 99
Column: 1 - 100
Row: 1 - [98, 101]
Column: 0 - 98
Column: 1 - 101
Updating dashboard: 18
Building widgets map:
Widget: 112
Widget: 113
Widget: 114
Iterating over layout:
Row: 0 - [112, 113]
Column: 0 - 112
Column: 1 - 113
Row: 1 - [114]
Column: 0 - 114
Updating dashboard: 8
Building widgets map:
Widget: 68
Widget: 85
Widget: 86
Widget: 87
Widget: 88
Widget: 89
Widget: 115
Widget: 116
Iterating over layout:
Row: 0 - [68, 116]
Column: 0 - 68
Column: 1 - 116
Row: 1 - [115]
Column: 0 - 115
Row: 2 - [85]
Column: 0 - 85
Row: 3 - [86, 89]
Column: 0 - 86
Column: 1 - 89
Row: 4 - [87]
Column: 0 - 87
Row: 5 - [88]
Column: 0 - 88
Updating dashboard: 20
Building widgets map:
Iterating over layout:
Updating dashboard: 21
Building widgets map:
Widget: 122
Iterating over layout:
Row: 0 - [122]
Column: 0 - 122
Updating dashboard: 19
Building widgets map:
Widget: 120
Widget: 121
Widget: 124
Widget: 118
Iterating over layout:
Row: 0 - [118]
Column: 0 - 118
Row: 1 - [124]
Column: 0 - 124
Row: 2 - [120]
Column: 0 - 120
Row: 3 - [121]
Column: 0 - 121
작업 전과 작업 후 스키마를 비교해 보았지만,
이번에 새롭게 추가된 컬럼이 상당히 있었으므로, 본 처리는 필수.
무사 업데이트가 완료되었다.
참고 정보
Reference
이 문제에 관하여(docker에서 실행되는 redash 문제 및 대책), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/S-T/items/bee0ae9c8c0acbd940cc
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
컨테이너의 리소스 상태를 확인하고 싶습니다.
redash라고 할까, docker에서의 관리의 이야기가 되지만,
ctop이라는 명령을 사용하면 관리하기 쉽습니다.
htps : // m / S-T / ms / d5 A 43076 A 51f5814 예 32
쿼리가 반환되지 않음
test connection은 OK에서도 쿼리를 발행하면 돌아오지 않을 때가 있다.
컨테이너 하나하나 살펴보면 worker에서 처리가 오지 않은 것으로 나타났다.
일정에 등록된 쿼리가 너무 많습니까? 라는 가설에 이르렀다.
생각해보면 스케줄되어 있어야 할 필요성도 없다.
QUEUES마다 worker 프로세스를 나누어 보기로 했다.
를 끄기로 결정했다.
appears only in the queue list of "redash_celery_scheduled"
before
worker:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery"
WORKERS_COUNT: 1
restart: always
after
worker 컨테이너를 3분할했다
worker-queries:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries"
WORKERS_COUNT: 1
restart: always
worker-scheduled_queries:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "scheduled_queries"
WORKERS_COUNT: 1
restart: always
worker-celery:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "celery"
WORKERS_COUNT: 1
restart: always
컨테이너를 분리한 후 ctop에서 리소스를 다시 확인한 결과
worker-celery가 극단적으로 CPU를 사용하기 시작했습니다.
celery라는 Python의 job queue 처리로 뭔가 막힌 것 같다.
잠시 후 해소했다.
redash의 versionUP
다음의 흐름으로 실시한다
0. Postgress 데이터 백업
1. 컨테이너를 멈추고 삭제
2. docker-compose 파일 수정
3. DB의 스키마 변경 처리를 한다
4. redash 시작
Postgres 데이터 백업
docker ps
docker exec -it redash_postgres_1 /bin/bash
pg_dump -U postgres postgres | gzip > /tmp/redash_backup.gz
exit
docker cp redash_postgres_1:/tmp/redash_backup.gz .
컨테이너를 멈추고 삭제
docker stop redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
docker rm redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
docker-compose 파일 수정
#image: redash/redash:latest
image: redash/redash:4.0.0-rc.1
DB 스키마 변경 처리
htps : // r. 이 m/게 t레다 sh/레다 sh/아
에서 @arikfr 씨가 제안해 주는 명령을 실시했지만,
에러가 나오는 것도 아니고, 무슨 일이 일어났는지 모른다.
그러나 브라우저에서 화면을 확인하면 500error가 되고 있다.
# docker-compose run --rm server manage db upgrade
Starting redash_redis_1
[2018-03-29 05:52:16,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 05:52:16,586][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
#
잘 생각하면,
compose를 시작할 때 yml 파일을 지정하지 않았습니다. .
# docker-compose -f docker-compose.production.yml run --rm server manage db upgrade
[2018-03-29 06:05:30,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 06:05:30,585][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 06:05:32,423][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 06:05:32,424][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
[2018-03-29 06:05:32,433][PID:1][INFO][alembic.runtime.migration] Running upgrade d1eae8b9893e -> 7671dca4e604, empty message
[2018-03-29 06:05:32,439][PID:1][INFO][alembic.runtime.migration] Running upgrade 7671dca4e604 -> 5ec5c84ba61e, Add Query.search_vector field for full text search.
[2018-03-29 06:05:32,565][PID:1][INFO][alembic.runtime.migration] Running upgrade 5ec5c84ba61e -> 6b5be7e0a0ef, Re-index Query.search_vector with existing queries.
[2018-03-29 06:05:32,661][PID:1][INFO][alembic.runtime.migration] Running upgrade 6b5be7e0a0ef -> 969126bd800f, Update widget's position data based on dashboard layout.
Updating dashboards position data:
Updating dashboard: 1
Building widgets map:
Widget: 1
Widget: 2
Iterating over layout:
Row: 0 - [1, 2]
Column: 0 - 1
Column: 1 - 2
Updating dashboard: 2
Building widgets map:
Widget: 3
Iterating over layout:
Row: 0 - [3]
Column: 0 - 3
Updating dashboard: 4
Building widgets map:
Widget: 18
Iterating over layout:
Row: 0 - [18]
Column: 0 - 18
Updating dashboard: 5
Building widgets map:
Widget: 21
Widget: 22
Widget: 31
Widget: 32
Widget: 41
Widget: 42
Widget: 82
Widget: 93
Iterating over layout:
Row: 0 - [93]
Column: 0 - 93
Row: 1 - [21]
Column: 0 - 21
Row: 2 - [22]
Column: 0 - 22
Row: 3 - [31]
Column: 0 - 31
Row: 4 - [32]
Column: 0 - 32
Row: 5 - [41]
Column: 0 - 41
Row: 6 - [42]
Column: 0 - 42
Row: 7 - [82]
Column: 0 - 82
Updating dashboard: 9
Building widgets map:
Widget: 53
Widget: 94
Iterating over layout:
Row: 0 - [94]
Column: 0 - 94
Row: 1 - [53]
Column: 0 - 53
Updating dashboard: 7
Building widgets map:
Widget: 38
Widget: 40
Widget: 95
Iterating over layout:
Row: 0 - [95]
Column: 0 - 95
Row: 1 - [38]
Column: 0 - 38
Row: 2 - [40]
Column: 0 - 40
Updating dashboard: 11
Building widgets map:
Widget: 71
Widget: 67
Widget: 70
Iterating over layout:
Row: 0 - [67]
Column: 0 - 67
Row: 1 - [70]
Column: 0 - 70
Row: 2 - [71]
Column: 0 - 71
Updating dashboard: 3
Building widgets map:
Widget: 5
Widget: 11
Widget: 13
Widget: 14
Widget: 15
Widget: 16
Widget: 17
Widget: 28
Widget: 51
Widget: 77
Widget: 78
Widget: 80
Iterating over layout:
Row: 0 - [14, 15]
Column: 0 - 14
Column: 1 - 15
Row: 1 - [17, 16]
Column: 0 - 17
Column: 1 - 16
Row: 2 - [11, 13]
Column: 0 - 11
Column: 1 - 13
Row: 3 - [28]
Column: 0 - 28
Row: 4 - [5]
Column: 0 - 5
Row: 5 - [77, 78]
Column: 0 - 77
Column: 1 - 78
Row: 6 - [51, 80]
Column: 0 - 51
Column: 1 - 80
Updating dashboard: 13
Building widgets map:
Widget: 83
Iterating over layout:
Row: 0 - [83]
Column: 0 - 83
Updating dashboard: 14
Building widgets map:
Iterating over layout:
Updating dashboard: 12
Building widgets map:
Iterating over layout:
Row: 0 - [
Column: 0 - [
Row: 1 - ]
Column: 0 - ]
Updating dashboard: 16
Building widgets map:
Widget: 102
Widget: 103
Widget: 104
Widget: 105
Iterating over layout:
Row: 0 - [102, 103]
Column: 0 - 102
Column: 1 - 103
Row: 1 - [104, 105]
Column: 0 - 104
Column: 1 - 105
Updating dashboard: 6
Building widgets map:
Widget: 25
Widget: 26
Widget: 29
Widget: 30
Widget: 33
Widget: 34
Widget: 43
Widget: 45
Widget: 46
Widget: 47
Widget: 48
Widget: 91
Iterating over layout:
Row: 0 - [91, 48]
Column: 0 - 91
Column: 1 - 48
Row: 1 - [47, 45]
Column: 0 - 47
Column: 1 - 45
Row: 2 - [46]
Column: 0 - 46
Row: 3 - [43]
Column: 0 - 43
Row: 4 - [25]
Column: 0 - 25
Row: 5 - [26]
Column: 0 - 26
Row: 6 - [29]
Column: 0 - 29
Row: 7 - [30]
Column: 0 - 30
Row: 8 - [33]
Column: 0 - 33
Row: 9 - [34]
Column: 0 - 34
Updating dashboard: 10
Building widgets map:
Widget: 57
Widget: 59
Widget: 61
Widget: 63
Widget: 65
Widget: 62
Widget: 92
Iterating over layout:
Row: 0 - [92]
Column: 0 - 92
Row: 1 - [62]
Column: 0 - 62
Row: 2 - [57]
Column: 0 - 57
Row: 3 - [63]
Column: 0 - 63
Row: 4 - [59]
Column: 0 - 59
Row: 5 - [65]
Column: 0 - 65
Row: 6 - [61]
Column: 0 - 61
Updating dashboard: 17
Building widgets map:
Widget: 108
Widget: 107
Widget: 109
Widget: 110
Widget: 111
Iterating over layout:
Row: 0 - [108]
Column: 0 - 108
Row: 1 - [109]
Column: 0 - 109
Row: 2 - [107]
Column: 0 - 107
Row: 3 - [110, 111]
Column: 0 - 110
Column: 1 - 111
Updating dashboard: 15
Building widgets map:
Widget: 98
Widget: 99
Widget: 100
Widget: 101
Iterating over layout:
Row: 0 - [99, 100]
Column: 0 - 99
Column: 1 - 100
Row: 1 - [98, 101]
Column: 0 - 98
Column: 1 - 101
Updating dashboard: 18
Building widgets map:
Widget: 112
Widget: 113
Widget: 114
Iterating over layout:
Row: 0 - [112, 113]
Column: 0 - 112
Column: 1 - 113
Row: 1 - [114]
Column: 0 - 114
Updating dashboard: 8
Building widgets map:
Widget: 68
Widget: 85
Widget: 86
Widget: 87
Widget: 88
Widget: 89
Widget: 115
Widget: 116
Iterating over layout:
Row: 0 - [68, 116]
Column: 0 - 68
Column: 1 - 116
Row: 1 - [115]
Column: 0 - 115
Row: 2 - [85]
Column: 0 - 85
Row: 3 - [86, 89]
Column: 0 - 86
Column: 1 - 89
Row: 4 - [87]
Column: 0 - 87
Row: 5 - [88]
Column: 0 - 88
Updating dashboard: 20
Building widgets map:
Iterating over layout:
Updating dashboard: 21
Building widgets map:
Widget: 122
Iterating over layout:
Row: 0 - [122]
Column: 0 - 122
Updating dashboard: 19
Building widgets map:
Widget: 120
Widget: 121
Widget: 124
Widget: 118
Iterating over layout:
Row: 0 - [118]
Column: 0 - 118
Row: 1 - [124]
Column: 0 - 124
Row: 2 - [120]
Column: 0 - 120
Row: 3 - [121]
Column: 0 - 121
작업 전과 작업 후 스키마를 비교해 보았지만,
이번에 새롭게 추가된 컬럼이 상당히 있었으므로, 본 처리는 필수.
무사 업데이트가 완료되었다.
참고 정보
Reference
이 문제에 관하여(docker에서 실행되는 redash 문제 및 대책), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/S-T/items/bee0ae9c8c0acbd940cc
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
docker ps
docker exec -it redash_postgres_1 /bin/bash
pg_dump -U postgres postgres | gzip > /tmp/redash_backup.gz
exit
docker cp redash_postgres_1:/tmp/redash_backup.gz .
docker stop redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
docker rm redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
#image: redash/redash:latest
image: redash/redash:4.0.0-rc.1
# docker-compose run --rm server manage db upgrade
Starting redash_redis_1
[2018-03-29 05:52:16,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 05:52:16,586][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
#
# docker-compose -f docker-compose.production.yml run --rm server manage db upgrade
[2018-03-29 06:05:30,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 06:05:30,585][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 06:05:32,423][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 06:05:32,424][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
[2018-03-29 06:05:32,433][PID:1][INFO][alembic.runtime.migration] Running upgrade d1eae8b9893e -> 7671dca4e604, empty message
[2018-03-29 06:05:32,439][PID:1][INFO][alembic.runtime.migration] Running upgrade 7671dca4e604 -> 5ec5c84ba61e, Add Query.search_vector field for full text search.
[2018-03-29 06:05:32,565][PID:1][INFO][alembic.runtime.migration] Running upgrade 5ec5c84ba61e -> 6b5be7e0a0ef, Re-index Query.search_vector with existing queries.
[2018-03-29 06:05:32,661][PID:1][INFO][alembic.runtime.migration] Running upgrade 6b5be7e0a0ef -> 969126bd800f, Update widget's position data based on dashboard layout.
Updating dashboards position data:
Updating dashboard: 1
Building widgets map:
Widget: 1
Widget: 2
Iterating over layout:
Row: 0 - [1, 2]
Column: 0 - 1
Column: 1 - 2
Updating dashboard: 2
Building widgets map:
Widget: 3
Iterating over layout:
Row: 0 - [3]
Column: 0 - 3
Updating dashboard: 4
Building widgets map:
Widget: 18
Iterating over layout:
Row: 0 - [18]
Column: 0 - 18
Updating dashboard: 5
Building widgets map:
Widget: 21
Widget: 22
Widget: 31
Widget: 32
Widget: 41
Widget: 42
Widget: 82
Widget: 93
Iterating over layout:
Row: 0 - [93]
Column: 0 - 93
Row: 1 - [21]
Column: 0 - 21
Row: 2 - [22]
Column: 0 - 22
Row: 3 - [31]
Column: 0 - 31
Row: 4 - [32]
Column: 0 - 32
Row: 5 - [41]
Column: 0 - 41
Row: 6 - [42]
Column: 0 - 42
Row: 7 - [82]
Column: 0 - 82
Updating dashboard: 9
Building widgets map:
Widget: 53
Widget: 94
Iterating over layout:
Row: 0 - [94]
Column: 0 - 94
Row: 1 - [53]
Column: 0 - 53
Updating dashboard: 7
Building widgets map:
Widget: 38
Widget: 40
Widget: 95
Iterating over layout:
Row: 0 - [95]
Column: 0 - 95
Row: 1 - [38]
Column: 0 - 38
Row: 2 - [40]
Column: 0 - 40
Updating dashboard: 11
Building widgets map:
Widget: 71
Widget: 67
Widget: 70
Iterating over layout:
Row: 0 - [67]
Column: 0 - 67
Row: 1 - [70]
Column: 0 - 70
Row: 2 - [71]
Column: 0 - 71
Updating dashboard: 3
Building widgets map:
Widget: 5
Widget: 11
Widget: 13
Widget: 14
Widget: 15
Widget: 16
Widget: 17
Widget: 28
Widget: 51
Widget: 77
Widget: 78
Widget: 80
Iterating over layout:
Row: 0 - [14, 15]
Column: 0 - 14
Column: 1 - 15
Row: 1 - [17, 16]
Column: 0 - 17
Column: 1 - 16
Row: 2 - [11, 13]
Column: 0 - 11
Column: 1 - 13
Row: 3 - [28]
Column: 0 - 28
Row: 4 - [5]
Column: 0 - 5
Row: 5 - [77, 78]
Column: 0 - 77
Column: 1 - 78
Row: 6 - [51, 80]
Column: 0 - 51
Column: 1 - 80
Updating dashboard: 13
Building widgets map:
Widget: 83
Iterating over layout:
Row: 0 - [83]
Column: 0 - 83
Updating dashboard: 14
Building widgets map:
Iterating over layout:
Updating dashboard: 12
Building widgets map:
Iterating over layout:
Row: 0 - [
Column: 0 - [
Row: 1 - ]
Column: 0 - ]
Updating dashboard: 16
Building widgets map:
Widget: 102
Widget: 103
Widget: 104
Widget: 105
Iterating over layout:
Row: 0 - [102, 103]
Column: 0 - 102
Column: 1 - 103
Row: 1 - [104, 105]
Column: 0 - 104
Column: 1 - 105
Updating dashboard: 6
Building widgets map:
Widget: 25
Widget: 26
Widget: 29
Widget: 30
Widget: 33
Widget: 34
Widget: 43
Widget: 45
Widget: 46
Widget: 47
Widget: 48
Widget: 91
Iterating over layout:
Row: 0 - [91, 48]
Column: 0 - 91
Column: 1 - 48
Row: 1 - [47, 45]
Column: 0 - 47
Column: 1 - 45
Row: 2 - [46]
Column: 0 - 46
Row: 3 - [43]
Column: 0 - 43
Row: 4 - [25]
Column: 0 - 25
Row: 5 - [26]
Column: 0 - 26
Row: 6 - [29]
Column: 0 - 29
Row: 7 - [30]
Column: 0 - 30
Row: 8 - [33]
Column: 0 - 33
Row: 9 - [34]
Column: 0 - 34
Updating dashboard: 10
Building widgets map:
Widget: 57
Widget: 59
Widget: 61
Widget: 63
Widget: 65
Widget: 62
Widget: 92
Iterating over layout:
Row: 0 - [92]
Column: 0 - 92
Row: 1 - [62]
Column: 0 - 62
Row: 2 - [57]
Column: 0 - 57
Row: 3 - [63]
Column: 0 - 63
Row: 4 - [59]
Column: 0 - 59
Row: 5 - [65]
Column: 0 - 65
Row: 6 - [61]
Column: 0 - 61
Updating dashboard: 17
Building widgets map:
Widget: 108
Widget: 107
Widget: 109
Widget: 110
Widget: 111
Iterating over layout:
Row: 0 - [108]
Column: 0 - 108
Row: 1 - [109]
Column: 0 - 109
Row: 2 - [107]
Column: 0 - 107
Row: 3 - [110, 111]
Column: 0 - 110
Column: 1 - 111
Updating dashboard: 15
Building widgets map:
Widget: 98
Widget: 99
Widget: 100
Widget: 101
Iterating over layout:
Row: 0 - [99, 100]
Column: 0 - 99
Column: 1 - 100
Row: 1 - [98, 101]
Column: 0 - 98
Column: 1 - 101
Updating dashboard: 18
Building widgets map:
Widget: 112
Widget: 113
Widget: 114
Iterating over layout:
Row: 0 - [112, 113]
Column: 0 - 112
Column: 1 - 113
Row: 1 - [114]
Column: 0 - 114
Updating dashboard: 8
Building widgets map:
Widget: 68
Widget: 85
Widget: 86
Widget: 87
Widget: 88
Widget: 89
Widget: 115
Widget: 116
Iterating over layout:
Row: 0 - [68, 116]
Column: 0 - 68
Column: 1 - 116
Row: 1 - [115]
Column: 0 - 115
Row: 2 - [85]
Column: 0 - 85
Row: 3 - [86, 89]
Column: 0 - 86
Column: 1 - 89
Row: 4 - [87]
Column: 0 - 87
Row: 5 - [88]
Column: 0 - 88
Updating dashboard: 20
Building widgets map:
Iterating over layout:
Updating dashboard: 21
Building widgets map:
Widget: 122
Iterating over layout:
Row: 0 - [122]
Column: 0 - 122
Updating dashboard: 19
Building widgets map:
Widget: 120
Widget: 121
Widget: 124
Widget: 118
Iterating over layout:
Row: 0 - [118]
Column: 0 - 118
Row: 1 - [124]
Column: 0 - 124
Row: 2 - [120]
Column: 0 - 120
Row: 3 - [121]
Column: 0 - 121
Reference
이 문제에 관하여(docker에서 실행되는 redash 문제 및 대책), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/S-T/items/bee0ae9c8c0acbd940cc텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)