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

Upgrade of fd fails on Ubuntu Xenial #25

Closed
amorphina opened this issue May 15, 2018 · 5 comments · Fixed by #26
Closed

Upgrade of fd fails on Ubuntu Xenial #25

amorphina opened this issue May 15, 2018 · 5 comments · Fixed by #26
Labels
bug Something isn't working

Comments

@amorphina
Copy link

Upgrade from 16.2 to 17.2 fails because of an existing client config in the /etc/bareos/bareos-fd.d/client, whose name is $(hostname).conf
During the upgrade the file myself.conf is created in that directory and in this case 2 files have one and the same client definition, thus the bareos-fd process does not start and the install does not complete successfully.
Maybe it is possible to make the file bareos/manifests/client/client.pp to have variable name for the bottom part:

file { "${::bareos::client::config_dir}/${_resource_dir}/${name_client}.conf":
->
file { "${::bareos::client::config_dir}/${_resource_dir}/myself.conf":

...or use a variable for it.

Error that is produced:

root@server:/etc/bareos/bareos-fd.d/client # ll
total 16K
drwxr-xr-x 2 bareos bareos 4.0K May 15 09:09 ./
drwxr-xr-x 5 bareos bareos 4.0K May 14 16:12 ../
-rw-r----- 1 bareos bareos 64 May 15 09:08 hostname.conf
-rw-rw---- 1 bareos bareos 85 May 14 16:12 myself.conf

root@server:/etc/bareos/bareos-fd.d/client # bareos-fd -t
15-May 09:11 bareos-fd: Fatal Error at filed.c:371 because:
Only one Client resource permitted in /etc/bareos/bareos-fd.d//.conf
15-May 09:11 hostname: ERROR in filed.c:251 Please correct configuration file: /etc/bareos/bareos-fd.d//.conf

@project0 project0 added the bug Something isn't working label May 15, 2018
@project0
Copy link
Collaborator

I did a quick look into the debian package sources of bareos. Seems they just install default config files (f they dont exists), wheter the service is already configured or not.
I guess it can happen that the setup will screw up the whole current configuration. In my opinion this is a problem of the way how bareos deploy default configs.

Anyway, i think we can set the default file name to myself.conf, the resulting config should not be affected of this change.

@amorphina did you observed problems of other bareos packages as well on upgrade?

@project0
Copy link
Collaborator

This problem might affects director::director and storage::storage as well.

@amorphina
Copy link
Author

I have upgraded ~60 clients + the director + the storage node, the only issues were with the filedaemon packages on all clients, director and storage. The other packages installed with no issues.

I know that it is not the best handling from BareOS team for the installation of default configs, regardless if they are present or not but it is much easyer to communicate with someone who worked in the same environment as I do ;), Maybe we will also submit a bugreport to the guys at BareOS.

@project0
Copy link
Collaborator

Probably you can open a bug report at bareos. I found this old bug related to the issue: https://bugs.bareos.org/view.php?id=738

project0 added a commit that referenced this issue May 16, 2018
The bareos package deploy default configs if they dont exist. This can
lead to conflicts with the config and the package fails to upgrade.
We just set the file names fix for those resources which are only
allowed to exist once.
Fix #25
project0 added a commit that referenced this issue May 16, 2018
The bareos package deploy default configs if they dont exist. This can
lead to conflicts with the config and the package fails to upgrade.
We just set the file names fix for those resources which are only
allowed to exist once.
Fix #25
@amorphina
Copy link
Author

Hi,

I opened a bug with them:
https://bugs.bareos.org/view.php?id=948

Thanks!

Kind Regards,
Atanas

@project0 project0 reopened this May 16, 2018
project0 added a commit that referenced this issue May 16, 2018
The bareos package deploy default configs if they dont exist. This can
lead to conflicts with the config and the package fails to upgrade.
We just set the file names fix for those resources which are only
allowed to exist once.
Fix #25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants