Skip to content

Commit

Permalink
ci deb: tweak downgrade test case
Browse files Browse the repository at this point in the history
After removing fluent-package and td-agent,
fluentd.service file is linked to nonexistent file (masked),
but td-agent service is still active unexpectedly, so
explicitly stop that service.

Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys committed Nov 11, 2024
1 parent 4d409aa commit a255baa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fluent-package/apt/systemd-test/downgrade-to-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ sudo apt install -V -y \
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb \
/host/${distribution}/pool/${code_name}/${channel}/*/*/td-agent_*_all.deb

# td-agent.service is already masked (link to /dev/null), and remove td-agent.service alias not to conflict with v4
sudo systemctl unmask td-agent

# Even though removing fluent-package, log and .conf are kept. dpkg reports "rc fluent-package" and "rc td-agent" status.
sudo apt remove -y fluent-package td-agent

# fluentd.service is already masked (link to /dev/null), then remove it.
# fluentd.service is already masked (link to nonexistent /lib/systemd/system/fluentd.service), then remove it.
sudo systemctl unmask fluentd
# td-agent.service is already removed, but still active, so stop it
sudo systemctl stop td-agent

# Drop symbolic links and recreate real directory.
sudo rm -f /var/log/td-agent
Expand Down

0 comments on commit a255baa

Please sign in to comment.