-
Notifications
You must be signed in to change notification settings - Fork 26
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
deb:rpm: stop editing settings for migration #546
deb:rpm: stop editing settings for migration #546
Conversation
This PR is originally motivated by the idea that the main migration target should be existing user service files and we should not do complicated migration processes for our own assumption.
I assume the following script, for example. sudo sed -i /etc/systemd/system/td-agent.service -e 's /opt/td-agent/lib/libjemalloc.so /opt/fluent/lib/libjemalloc.so g'
sudo sed -i /etc/systemd/system/td-agent.service -e 's /opt/td-agent/lib/ruby/gems/2.7.0/ /opt/fluent/lib/ruby/gems/3.2.0/ g'
sudo sed -i /etc/systemd/system/td-agent.service -e 's /opt/td-agent/lib/ruby/gems/2.7.0/ /opt/fluent/lib/ruby/gems/3.2.0/ g'
sudo sed -i /etc/systemd/system/td-agent.service -e 's /opt/td-agent/bin/fluentd /opt/fluent/bin/fluentd g'
echo "Alias=fluentd.service" | sudo tee -a /etc/systemd/system/td-agent.service This should be done by users manually, I think. |
Recently, |
fluent-package/apt/systemd-test/update-from-v4-with-old-service-file.sh
Outdated
Show resolved
Hide resolved
af4331c
to
95a8559
Compare
By the way, how about testing with |
aa854f3
to
15794af
Compare
The old service file should work as before. So, we shouldn't touch the current settings by our own assumptions. Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
Thanks. I will separate the fixes about user service file tests from this PR. |
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
yum tests are all green in my fork(without serverspec test): https://github.com/daipom/fluent-package-builder/actions/runs/5666906256 The Jammy test fails because some gem paths of v450 are different from other platform. |
15794af
to
ee68fcb
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for your review! |
This fix stops editing
/etc/default/fluentd
or/etc/sysconfig/fluentd
for migration.We shouldn't touch the settings for migration.
For migration of the config file, we make a symlink:
/etc/fluent/fluent.conf
=>/etc/fluent/td-agent.conf
We stop migrating the log filename.
If need to output logs to the old filename
td-agent.log
, user needs to set the environmental variable.