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

Fixes #21293: Allow overriding rudder-web.properties parameters with files in rudder-web.properties.d #4337

Conversation

fanf
Copy link
Member

@fanf fanf commented Jun 20, 2022

https://issues.rudder.io/issues/21293

Add the use of an overriding configuration directory. By default, it is the name of the config file with d. appended to it but can be overridden if needed with a JVM parameter.

Log info for such things are important, they looks like:

[2022-06-20 10:42:57+0200] INFO  application - Use configuration file defined by JVM property -Drudder.configFile : /home/fanf/java/workspaces/rudder-project/static-config/configuration-rudder-7.1.properties
[2022-06-20 10:42:57+0200] INFO  application - JVM property -Drudder.configDir is not defined: using /home/fanf/java/workspaces/rudder-project/static-config/configuration-rudder-7.1.properties.d directory
[2022-06-20 10:42:57+0200] DEBUG application - Overriding configuration files in '/home/fanf/java/workspaces/rudder-project/static-config/configuration-rudder-7.1.properties.d': 10-low-override.properties, 90-high-override.properties
[2022-06-20 10:42:57+0200] DEBUG application - loading configuration from FileSystemResource(/home/fanf/java/workspaces/rudder-project/static-config/configuration-rudder-7.1.properties.d/90-high-override.properties)
[2022-06-20 10:42:57+0200] DEBUG application - loading configuration from FileSystemResource(/home/fanf/java/workspaces/rudder-project/static-config/configuration-rudder-7.1.properties.d/10-low-override.properties)
[2022-06-20 10:42:57+0200] DEBUG application - loading configuration from FileSystemResource(/home/fanf/java/workspaces/rudder-project/static-config/configuration-rudder-7.1.properties)
[2022-06-20 10:42:57+0200] DEBUG application - Writing resolved configuration file to /home/fanf/java/workspaces/rudder-project/static-config/configuration-rudder-7.1.properties.d/rudder-web.properties-resolved-debug

The rudder-web.properties-resolved-debug file is a debbuging file with origin info looking like:

...
            },
            # merge of /.../configuration-rudder-7.1.properties.d/90-high-override.properties,/.../configuration-rudder-7.1.properties
            "reportscleaner" : {
                # /.../configuration-rudder-7.1.properties.d/90-high-override.properties
                "archive" : {
                    # /.../configuration-rudder-7.1.properties.d/90-high-override.properties
                    "TTL" : "2"
                },
                # /.../configuration-rudder-7.1.properties
                "compliancelevels" : {
                    # /.../configuration-rudder-7.1.properties
                    "delete" : {
                        # /.../configuration-rudder-7.1.properties
                        "TTL" : "8"
                    }
                },
...

@fanf fanf requested a review from VinceMacBuche June 20, 2022 09:16
@fanf fanf force-pushed the bug_21293/allow_overriding_rudder_web_properties_parameters_with_files_in_rudder_web_properties_d branch from 045d356 to a1fba20 Compare June 20, 2022 09:17
@fanf
Copy link
Member Author

fanf commented Jun 20, 2022

PR updated with a new commit

2 similar comments
@fanf
Copy link
Member Author

fanf commented Jun 20, 2022

PR updated with a new commit

@fanf
Copy link
Member Author

fanf commented Jun 20, 2022

PR updated with a new commit

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/4337
-- Your faithful QA
Kant merge: "It is beyond a doubt that all our knowledge begins with experience."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/56443/console)

@fanf
Copy link
Member Author

fanf commented Jul 1, 2022

OK, squash merging this PR

@fanf fanf force-pushed the bug_21293/allow_overriding_rudder_web_properties_parameters_with_files_in_rudder_web_properties_d branch from 3baf2d6 to 6838a49 Compare July 1, 2022 13:38
@fanf fanf merged commit 6838a49 into Normation:master Jul 1, 2022
@fanf fanf deleted the bug_21293/allow_overriding_rudder_web_properties_parameters_with_files_in_rudder_web_properties_d branch March 15, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants