-
Notifications
You must be signed in to change notification settings - Fork 290
Description
We want to get rid of things like SdAddress or SdPort, so these should be replaced by Address and Port leaving Aliases behind to still be able to load older configurations.
There might be cases where the prefixes are still meaningful and there may be cases that still need to be discussed, but most can probably just be changed.
Since the merge of #2159 FD,SD,DIR concerning configuration alias,
Port Alias should be history.
When I rebase an old work in progress branch
I detected something that seems really inconsistent or at least really inconvenient:
If you try to use only PORT in the different resources, you get fatal error ???
if you let the previous alias, you get warnings ???
Starting the Bareos Storage daemon
Checking Configuration for sd
bareos-sd: CONFIG ERROR at lib/parse_conf_state_machine.cc:161
Config error: Keyword "Port" not permitted in this resource.
Perhaps you left the trailing brace off of the previous resource.
: line 4, col 7 of file /ioda/bareos/git/build/test/systemtests/tests/py3plug-fd-contrib-mariadb-dump/etc/bareos/bareos-sd.d/storage/bareos-sd.conf
Port = 30463
Checking Configuration for dir
bareos-dir: CONFIG ERROR at lib/parse_conf_state_machine.cc:161
Config error: Keyword "Port" not permitted in this resource.
Perhaps you left the trailing brace off of the previous resource.
: line 10, col 7 of file /ioda/bareos/git/build/test/systemtests/tests/py3plug-fd-contrib-mariadb-dump/etc/bareos/bareos-dir.d/director/bareos-dir.conf
Port = 30461
Checking Configuration for fd
bareos-fd: CONFIG ERROR at lib/parse_conf_state_machine.cc:161
Config error: Keyword "Port" not permitted in this resource.
Perhaps you left the trailing brace off of the previous resource.
: line 12, col 7 of file /ioda/bareos/git/build/test/systemtests/tests/py3plug-fd-contrib-mariadb-dump/etc/bareos/bareos-fd.d/client/myself.conf
Port = 30462
We are now is a state where you don't know what you have to put in
Fail: There are configuration warnings for the director when running /ioda/bareos/git/build/test/systemtests/tests/py3plug-fd-contrib-mariadb-dump/sbin//bareos_dir-py3plug-fd-contrib-mariadb-dump -t -c /ioda/bareos/git/build/test/systemtests/tests/py3plug-fd-contrib-mariadb-dump/etc/bareos, see below.
There are configuration warnings:
* Found alias usage "SdPort" in configuration which is discouraged, consider using "Port" instead.
* Found alias usage "FdPort" in configuration which is discouraged, consider using "Port" instead.
bareos_dir-py3plug-fd-contrib-mariadb-dump is stopped
This need improvements, as it will be harder to explain that all resources defined in the director that need a port should use only port except director itself...
I'm afraid this is creating more confusion, that solving real issues.
Couldn't we recheck, and apply the following suggested rule to all ressources:
ressource{
Name=
Address=
Port=
-- or with the alternative syntax
Addresses = {
ipv6 = {
addr = ::
port = 9101
}
ipv4 = {
addr = 0.0.0.0
port = 9101
}
}
}