monasca / monasca-agents-installer

Apache License 2.0
1 stars 6 forks source link

Properly create backup of metrics agent config files #42

Closed matrixik closed 6 years ago

matrixik commented 6 years ago

Bug make the code exit from function that was creating backups of files after first file.

haruki-yamanashi commented 6 years ago

I checked backup of metric agent files are created properly and the files are not overwritten when execute installer without --overwrite_conf.

But supervisor.conf and monasca-agent.service are not created with 664 permission when execute installer without --overwrite_conf.

ll /etc/systemd/system/monasca-agent.service
-rw-r--r--. 1 root root 238 Mar 28 11:32 /etc/systemd/system/monasca-agent.service
ll /etc/monasca/agent/ | grep supervisor
-rw-r-----. 1 mon-agent mon-agent 1031 Mar 28 11:43 supervisor.conf

On the other hand, when execute installer with --overwrite_conf, permission is set as 664 properly

matrixik commented 6 years ago

@haruki-yamanashi thx for spotting, fixed.

haruki-yamanashi commented 6 years ago

I checked permission of metric agent files are stable in my test env and metric agent works well. @witekest please double check (mainly, from the source code point of view)