Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate paas to 4 0 env #75

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

PixarV
Copy link
Collaborator

@PixarV PixarV commented Feb 3, 2025

No description provided.

Margarita Fedotova added 7 commits February 3, 2025 17:50
Parameters update:
- password: remove len validation according to the bootstrap schema
- version: remove version value validation. Possible versions depend on
the installation and the env version
- new parameters: allow_anonymous, anonymous_role. Add computed
because api sets default values for these parameters
Parameters update:
- innodb_buffer_pool_size, innodb_log_file_size, max_connections: update
 and comment out boundary validation to save compatibility with created
clusters
- innodb_io_capacity, innodb_io_capacity_max, max_connect_errors: add
comment about the actual max value
- max_heap_table_size, tmp_table_size: fix max value in boundary
validation
- user.password: add not empty validation

Remove extra validation from database user schema for data source.
Parameters update:
- autovacuum_analyze_scale_factor, autovacuum_vacuum_scale_factor: fix
type in data source: int -> float
- effective_cache_size, shared_buffers:
-- update and comment out boundary validation to save compatibility
with created clusters
-- support parsing as int or byte parameter to save compatibility with
created clusters
-- change type to nullable int to hold big ints
- max_wal_size, min_wal_size: parameters are marked as deprecated
- user.password: update len validation according to the bootstrap schema
Parameters update:
- password: update validation according to the bootstrap schema
- version: remove version value validation. Possible versions depend on
the installation and the env version
Parameters update:
- password: update validation according to the bootstrap schema
- persistence_rdb: update default value to true
- version: remove version value validation. Possible versions depend on
the installation and the env version
Parameters update:
- password: add not empty validation
- version: remove version value validation. Possible versions depend on
the installation and the env version
st2 volume type is not supported for paas volumes on some installations.

The owner of the pgsql database cannot be a user of this database.
@PixarV PixarV self-assigned this Feb 3, 2025
@PixarV PixarV requested review from CrocBomber and DiGa66 February 3, 2025 15:58
Copy link

@RockBomber RockBomber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Немного покомментировал. Но в целом - это конечно адочек всё это поддерживать в актуальном состоянии. И это ведь еще не все сервисы: ELK, Prometheus и Kafka пока не были добавлены.

Comment on lines +32 to +45
"allow_anonymous": {
Type: nullable.TypeNullableBool,
Optional: true,
ForceNew: true,
Computed: true,
ValidateFunc: nullable.ValidateTypeStringNullableBool,
},
"anonymous_role": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"viewer", "editor"}, false),
},
Copy link

@RockBomber RockBomber Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для allow_anonymous и anonymous_role добавились дефолтные значения, возможно надо добавить их и сюда

"monitoring.#": "0",
"options.%": "0",
"password": "",
"version": "8.2.2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну нужно ли сдесь поправить версию на 8.12 ?
allow_anonymous и anonymous_role тут тоже имеют невалидные значения. Если это конечно не негативный тест)

Optional: true,
ForceNew: true,
// FIXME: uncomment the validation after all paas clusters are on v4.0
// ValidateFunc: nullable.ValidateTypeStringNullableIntBetween(4*Megabyte, 4*Gigabyte),
Copy link

@RockBomber RockBomber Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вопрос по параметру ниже innodb_thread_concurrency
Для него прописан Default: mySQLInnodbThreadConcurrencyDefault со значением -1,
но у нас в шаблонах дефолта нет для него. На странице по MySQL в блоге описан дефолт со стороны самого MySql = 0, и валидация от 0 до 1000.
Какбуд то бы что-то где-то не сходится, или я пока не понял концепцию этого дефолтного значения)

@@ -141,6 +147,9 @@ func (s postgreSQLManager) serviceParametersSchema() map[string]*schema.Schema {
nullable.ValidateTypeStringNullableIntBetween(32*Megabyte, 2147483647*Megabyte),
nullable.ValidateTypeStringNullableIntDivisibleBy(Megabyte),
),
// FIXME: remove parameter after all paas clusters are on v4.0
Deprecated: "The min_wal_size parameter is unsupported for PostgreSQL services " +
"starting with the paas_v4_0 environment version.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У параметра ниже replication_mode у нас в шаблонах появилось дефолтное значение asynchronous, это если нужно это отображать в терраформе.
У нас чуть сменился смысл дефолтных значений: раньше это был параметер, который необходимо указать, теперь он стал необязательным для указания, но код облака сам добавляет дефолтное значение, если оно не было указано пользователем.

@@ -6,14 +6,22 @@ description: |-
Manages a PaaS service.
---

[doc-effective_cache_size]: https://postgresqlco.nf/doc/en/param/effective_cache_size/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

просто интересно, почему тут и ниже сайт postgresqlco.nf, а не официальный https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-EFFECTIVE-CACHE-SIZE

@@ -614,18 +630,18 @@ This parameter is relevant for Percona 8.0, MySQL 8.0, and MariaDB 10.4, 10.5, 1
when `innodb_buffer_pool_size` > 1 GiB. This parameter is relevant for Percona 5.7, 8.0 и MariaDB 10.2, 10.3, 10.4.
Valid values are from 1 to 64.
* `innodb_buffer_pool_size` - (Optional) The size in bytes of the buffer pool used to cache table data and indexes.
Valid values are from 5242880 (5 MiB) to 9223372036854775807.
Valid values are from 128 MiB.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чуть выше у параметров gcs_fc_master_slave и gcs_fc_single_primary можно обновить релевантные версии вендоров

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants