Skip to content

Commit

Permalink
Try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Nov 12, 2024
1 parent fe7c49e commit dbc21b0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fluent-package/apt/systemd-test/downgrade-to-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ 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
sudo systemctl is-active fluentd
sudo systemctl is-active td-agent
sudo systemctl stop fluentd

# 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
Expand All @@ -39,6 +40,8 @@ debug_service_files "DEBUG: after remove fluent-package td-agent"

# fluentd.service is already masked (link to /dev/null), then remove it.
sudo systemctl unmask fluentd
# purge inacive (dead) symbolic links
sudo systemctl disable td-agent

debug_service_files "DEBUG: after unmask fluentd"

Expand All @@ -60,6 +63,9 @@ curl -fsSL https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_n

debug_service_files "DEBUG: after downgrade"

# re-create symlink to point service file again
sudo systemctl enable td-agent --now

# Test: service status
(! systemctl status --no-pager fluentd)
(systemctl status --no-pager td-agent)
Expand Down

0 comments on commit dbc21b0

Please sign in to comment.