Skip to content

Commit

Permalink
Backport: ci: install transitional package (#731)
Browse files Browse the repository at this point in the history
Usually, transitional package (td-agent) will be installed when
upgrading from v4. so it should be installed at the same time  to test
in practical use case.

ref. #709
 #711

---------

Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys authored Nov 11, 2024
1 parent 556a3cd commit 4d409aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions fluent-package/apt/systemd-test/downgrade-to-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ systemctl status --no-pager td-agent

# Ensure to install the current
sudo apt install -V -y \
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb
/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
sudo apt remove -y fluent-package td-agent

# fluentd.service is already masked (link to /dev/null), then remove it.
sudo systemctl unmask fluentd
Expand Down
8 changes: 6 additions & 2 deletions fluent-package/apt/systemd-test/update-from-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ done

# Install the current
sudo apt install -V -y \
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb \
/host/${distribution}/pool/${code_name}/${channel}/*/*/td-agent_*_all.deb

# Test: service status
systemctl status --no-pager fluentd
(! systemctl status --no-pager td-agent)
# BUG: v4 service restart logic will not launched usually because the
# existence check of td-agent.service will always fail.
# As a result, old service is still alive here.
systemctl status --no-pager td-agent

# Test: restoring td-agent service alias
sudo systemctl stop fluentd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ done

# Install the current
sudo apt install -V -y \
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb \
/host/${distribution}/pool/${code_name}/${channel}/*/*/td-agent_*_all.deb
systemctl status --no-pager fluentd

sudo systemctl stop fluentd
Expand Down

0 comments on commit 4d409aa

Please sign in to comment.