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
hazelcast.config is ignored if given file does not have file extension "xml", "yaml" or "yml" #14924
Labels
Module: Config
Priority: Medium
Source: Internal
PR or issue was opened by an employee
Team: Core
Type: Defect
Milestone
Comments
blazember
added a commit
to blazember/hazelcast
that referenced
this issue
Apr 26, 2019
3.12 introduced a regression that configuration files with suffixes not in [xml,yaml,yml] passed in system property are ignored silently and the config resolution continues following the resolution priority, most likely resolving the default XML configuration shipped with the jar. The expected behavior is: - if the system property is set we fail fast if we can't load the config from the referenced resource/file - if the file in the system property has a suffix [yaml,yml], we treat it as YAML config - if the file in the system property has any other suffix (or don't have suffix), we treat it as XML config Note that in 4.0 the fix will be different, we enforce the config files to have suffix from the [xml,yaml,yml] list. This commit fixes this behavior in member, client and client-failover config resolution, with additional tests verifying the resolution logic. Fixes hazelcast#14924
blazember
added a commit
to blazember/hazelcast
that referenced
this issue
Apr 28, 2019
3.12 introduced a regression that configuration files with suffixes not in [xml,yaml,yml] passed in system property are ignored silently and the config resolution continues following the resolution priority, most likely resolving the default XML configuration shipped with the jar. The expected behavior is: - if the system property is set we fail fast if we can't load the config from the referenced resource/file - if the file in the system property has a suffix [yaml,yml], we treat it as YAML config - if the file in the system property has any other suffix (or don't have suffix), we fail fast enforcing to use suffixes from the [xml,yaml,yml] list. This commit fixes this behavior in member, client and client-failover config resolution, with additional tests verifying the resolution logic. Fixes hazelcast#14924
blazember
added a commit
to blazember/hazelcast
that referenced
this issue
Apr 29, 2019
3.12 introduced a regression that configuration files with suffixes not in [xml,yaml,yml] passed in system property are ignored silently and the config resolution continues following the resolution priority, most likely resolving the default XML configuration shipped with the jar. The expected behavior is: - if the system property is set we fail fast if we can't load the config from the referenced resource/file - if the file in the system property has a suffix [yaml,yml], we treat it as YAML config - if the file in the system property has any other suffix (or don't have suffix), we fail fast enforcing to use suffixes from the [xml,yaml,yml] list. This commit fixes this behavior in member, client and client-failover config resolution, with additional tests verifying the resolution logic. Fixes hazelcast#14924
blazember
added a commit
that referenced
this issue
May 6, 2019
3.12 introduced a regression that configuration files with suffixes not in [xml,yaml,yml] passed in system property are ignored silently and the config resolution continues following the resolution priority, most likely resolving the default XML configuration shipped with the jar. The expected behavior is: - if the system property is set we fail fast if we can't load the config from the referenced resource/file - if the file in the system property has a suffix [yaml,yml], we treat it as YAML config - if the file in the system property has any other suffix (or don't have suffix), we treat it as XML config Note that in 4.0 the fix will be different, we enforce the config files to have suffix from the [xml,yaml,yml] list. This commit fixes this behavior in member, client and client-failover config resolution, with additional tests verifying the resolution logic. Fixes #14924
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Module: Config
Priority: Medium
Source: Internal
PR or issue was opened by an employee
Team: Core
Type: Defect
When HZ configuration is set by
hazelcast.config
and given file does not have extension "xml", "yaml" or "yml" then locator of configuration file silently ignorehazelcast.config
and continue in lookup to another stepA file named hazelcast.xml located in the application's working directory
.It can be confusing for users since configuration file in
hazelcast.config
is set deliberately but Hazelcast can be started with different configuration without throwing any exception.In HZ version older than
3.12
every file passed to Hazelcast byhazelcast.config
was considered as xml file and tried to be parsed. It means that valid xml file with namehazelcast-config.whatever
passed byhazelcast.config
property was correctly used as HZ configuration file. It is regression in3.12
since in current implementation filehazelcast-config.whatever
is silently ignored and different file is used as Hazelcast configuration.The text was updated successfully, but these errors were encountered: