fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 25 forks source link

apt: Fix an unstable systemd test #524

Closed ashie closed 1 year ago

ashie commented 1 year ago

Add --now to systemctl enable in update-from-v4.sh to make sure to start the service before checking the status.

daipom commented 1 year ago

Wow! Thanks! I will merge this after

daipom commented 1 year ago

Certainly, it looks like we need --now option.

Note: man systemctl

 Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the [Install] sections of the indicated unit files. After the symlinks have been created, the system manager configuration is
           reloaded (in a way equivalent to daemon-reload), in order to ensure the changes are taken into account immediately. Note that this does not have the effect of also starting any of the units being enabled. If this is
           desired, combine this command with the --now switch, or invoke start with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of the form foo@bar.service), symlinks named
           the same as instances are created in the unit configuration directory, however they point to the single template unit file they are instantiated from.

I wonder why it sometimes works as expected without this setting or without systemctl start...