-
Notifications
You must be signed in to change notification settings - Fork 27
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
apt yum: use fluentd.service by default #461
Conversation
6de8435
to
882e893
Compare
Chekcking diff outcome.
|
Oops, it's not desired. Should we swap entity & alias, or add something other to resolve it? |
75984de
to
265c2ef
Compare
|
TODO: |
265c2ef
to
4b0c94a
Compare
Fixed to use modern macro. |
waiting CI results. |
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.
This limitation is caused by execution order of old package's
%postun maintainer script behavior. (no workaround)
There is a hacky work around to resolve it.
%posttrans
of the new package will be run after %postun
of the old one.
So that running systemctl enable fluentd
at %posttrans
will resolve it.
But I think we don't have to go that far to enable it.
We don't need to add such hacky way in this PR.
If it's really needed, we'll do it in another PR.
I'll merge this after I confirm this on my environment. |
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.
Hmm, I can't migrate it properly on Ubuntu.
We might need more work.
Sure, I'll fix it. |
On ubuntu side, dh_installsystemd assumes service_name instead of compat_service_name. |
Thanks, I've tested it again on Ubuntu. |
checking whether unexpected breaking change exists. |
me too |
b2e0353
to
f42fd56
Compare
Basically, fluentd.service should be used by default, but with considering migration from old td-agent, added alias (Alias=td-agent.service) in fluentd.service. To distinguish service name and compatible service name, it use SERVICE_NAME (fluentd) and COMPAT_SERVICE_NAME (td-agent) respectively. When upgrading from v4 package, td-agent service will be removed by default, but instead of it, fluentd.service launches. This limitation is caused by execution order of old package's maintainer scriptlet behavior (%postun). If you want to use td-agent as well, you must re-enable service via systemctl explicitly. deb: sudo systemctl unmask td-agent sudo systemctl enable fluentd (td-agent.service is masked, so need to unmask first) rpm: sudo systemctl enable fluentd (td-agent.service is inactive, so need to enable first) NOTE: service environment file is moved to /etc/default/fluentd or /etc/sysconfig/fluentd for consistency. Signed-off-by: Kentaro Hayashi <[email protected]>
Signed-off-by: Kentaro Hayashi <[email protected]>
bullseye or later can use debhelper compatibility 12 or later. so at the minimum requirement, use level 12. Newer debhelper compatibility level enables more strict checking, so newer is better as much as possible. Signed-off-by: Kentaro Hayashi <[email protected]>
Signed-off-by: Kentaro Hayashi <[email protected]>
Signed-off-by: Kentaro Hayashi <[email protected]>
Signed-off-by: Kentaro Hayashi <[email protected]>
Signed-off-by: Kentaro Hayashi <[email protected]>
When upgrading from v4 is treated like a install process ($1 -eq 1). If td-agent service is running before upgrading process, explicitly restart fluentd.service. Signed-off-by: Kentaro Hayashi <[email protected]>
f42fd56
to
f2d3bec
Compare
Updated commit message. f531fa5 |
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
Waiting for CI...
Thanks a lot! |
Basically, fluentd.service should be used by default, but with considering
migration from old td-agent, added alias (Alias=td-agent.service)
in fluentd.service.
To distinguish service name and compatible service name,
it use SERVICE_NAME (fluentd) and COMPAT_SERVICE_NAME (td-agent) respectively.
When upgrading from v4 package, td-agent service will be removed by
default, but instead of it, fluentd.service launches.
This limitation is caused by execution order of old package's
maintainer scriptlet behavior (%postun).
If you want to use td-agent as well, you must re-enable service via
systemctl explicitly.
deb:
sudo systemctl unmask td-agent
sudo systemctl enable fluentd
(td-agent.service is masked, so need to unmask first)
rpm:
sudo systemctl enable fluentd
(td-agent.service is inactive, so need to enable first)
NOTE: service environment file is moved to /etc/default/fluentd or
/etc/sysconfig/fluentd for consistency.