Skip to content

Commit

Permalink
[7570] Bump server_config.json schema version for GenQuery2 log categ…
Browse files Browse the repository at this point in the history
…ory.
  • Loading branch information
korydraughn committed Apr 11, 2024
1 parent 3af6690 commit f533e0f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packaging/server_config.json.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_name": "server_config",
"schema_version": "v4",
"schema_version": "v5",
"advanced_settings": {
"agent_factory_watcher_sleep_time_in_seconds": 5,
"default_number_of_transfer_threads": 4,
Expand Down Expand Up @@ -49,6 +49,7 @@
"authentication": "info",
"database": "info",
"delay_server": "info",
"genquery2": "info",
"legacy": "info",
"microservice": "info",
"network": "info",
Expand Down
1 change: 1 addition & 0 deletions schemas/configuration/v4/server_config.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"authentication": {"enum": ["trace", "debug", "info", "warn", "error", "critical"], "maxItems": 1},
"database": {"enum": ["trace", "debug", "info", "warn", "error", "critical"], "maxItems": 1},
"delay_server": {"enum": ["trace", "debug", "info", "warn", "error", "critical"], "maxItems": 1},
"genquery2": {"enum": ["trace", "debug", "info", "warn", "error", "critical"], "maxItems": 1},
"legacy": {"enum": ["trace", "debug", "info", "warn", "error", "critical"], "maxItems": 1},
"microservice": {"enum": ["trace", "debug", "info", "warn", "error", "critical"], "maxItems": 1},
"network": {"enum": ["trace", "debug", "info", "warn", "error", "critical"], "maxItems": 1},
Expand Down
7 changes: 7 additions & 0 deletions scripts/irods/upgrade_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ def run_schema_update(config_dict, schema_name, next_schema_version):
merge_hosts_config_into_server_config(config_dict)
merge_host_access_control_config_into_server_config(config_dict)

if next_schema_version == 5:
if schema_name == 'server_config':
# Build a new server_config.json file using server_config.json.template as a base.
# Overwrite all configuration properties in the template with the properties from
# "config_dict" (i.e. the local server's server_config.json).
config_dict = convert_to_v4_schema_and_add_missing_properties(config_dict)

config_dict['schema_version'] = 'v%d' % (next_schema_version)

return config_dict
Expand Down

0 comments on commit f533e0f

Please sign in to comment.