Prepared schema creation ignores grant errors and does not retry missing privileges
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
- #3235 de @ritojoao — cerrado sin fusionar
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 5.3k
- Forks
- 1.1k
- Merge medio
- 3 d 17 h
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de zalando/postgres-operator
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
zalando/postgres-operator#3257 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
zalando/postgres-operator#3254 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
zalando/postgres-operator#3253 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
zalando/postgres-operator#3252 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
zalando/postgres-operator#3182 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de zalando/postgres-operator
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentPosiblemente ocupada @cvas22 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
influxdata/telegraf#20264 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Standalone migration breaks existing Ingress routes using the envoy-http Service port nameAbiertoaccepted bug wg/enterprise-environment
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vllm-project/semantic-router#7483 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
stacklok/toolhive-catalog#2076 ·
Los mantenedores suelen responder en 1 día
-
vulncheck or vulndb
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
golang/go#83428 · 1 comentario ·
Los mantenedores suelen responder en 1 día