Prepared schema creation ignores grant errors and does not retry missing privileges
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
- #3235 của @ritojoao — đã đóng, không merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start with execCreateDatabaseSchema() in pkg/cluster/database.go and syncPreparedSchemas() in pkg/cluster/sync.go; trace how default privilege grant errors are handled and how existing schemas are skipped. Check nearby tests for prepared schema synchronization. Done means grant failures are reported and missing privileges are retried on later synchronizations.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When initializing a prepared schema, the operator creates the schema first and then sets its default privileges. If schema creation succeeds but the privilege grant step fails, execCreateDatabaseSchema() ignores the error from execAlterSchemaDefaultPrivileges() and returns nil (pkg/cluster/database.go:453-480).
On subsequent runs, syncPreparedSchemas() checks only whether the schema name already exists and skips existing schemas (pkg/cluster/sync.go:1660-1693). As a result, synchronizations report no errors, and the missing schema USAGE and default table SELECT privileges are never retried.
Steps to reproduce
- Configure a prepared database
schema_db(DefaultUsers=false) with a prepared schemadata(DefaultRoles=false). - Create
schema_dbalong with theschema_db_ownerandschema_db_readerroles, leavingschema_db_writerabsent. - Synchronize prepared schemas. Schema
datais created, while setting its default privileges fails becauseschema_db_writerdoes not exist (and the error is ignored). - Create the missing
schema_db_writerrole and synchronize prepared schemas three more times. - Create a new table in
dataasschema_db_owner:schema_db_readerhas neitherUSAGEon schemadatanorSELECTon the new table.
Expected behavior
Return an error when execAlterSchemaDefaultPrivileges() fails, and retry the missing schema privileges on subsequent synchronizations until setup succeeds.
- Ngôn ngữ chính
- Go
- Star
- 5.3k
- Fork
- 1.1k
- Merge trung bình
- 3 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của zalando/postgres-operator
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
zalando/postgres-operator#3257 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zalando/postgres-operator#3254 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
zalando/postgres-operator#3253 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
zalando/postgres-operator#3252 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zalando/postgres-operator#3182 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của zalando/postgres-operator
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentCó thể đã có người làm @cvas22 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
influxdata/telegraf#20264 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Standalone migration breaks existing Ingress routes using the envoy-http Service port nameĐang mởaccepted bug wg/enterprise-environment
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vllm-project/semantic-router#7483 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
stacklok/toolhive-catalog#2076 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vulncheck or vulndb
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
golang/go#83428 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày