Closed daipom closed 1 year ago
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.
In this case, users should migrate the user service file manually. Since we provide symlinks
/etc/td-agent/
and/var/log/td-agent/
, updating some paths should work:* `LD_PRELOAD` * `GEM_HOME` * `GEM_PATH` * `/opt/td-agent/bin/fluentd`
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, ServerSpec
test for RockyLinux8 often fails and we can't confirm the results of systemd tests.
To check the results, I ran the tests without ServerSpec
test on my fork.
The tests for yum
are stable.
By the way, how about testing with /etc/systemd/system/td-agent.d/override.conf
?
By the way, how about testing with
/etc/systemd/system/td-agent.d/override.conf
?
Thanks. I will separate the fixes about user service file tests from this PR. I will consider it later!
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. It is just a problem of tests. I will separate these new tests from this PR since it is not directly related to this PR.
I will separate the fixes about user service file tests from this PR.
Done.
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.