Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Nov 12, 2024
1 parent 3990f5e commit 997be4d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion fluent-package/apt/systemd-test/downgrade-to-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,19 @@ 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

echo "DEBUG: after remove fluent-package td-agent"
ls -la /usr/lib/systemd/system/ |grep -E 'td-agent|fluent-package'
ls -la /etc/systemd/system
ls -la /usr/lib/systemd/system/multi-user.target.wants/

# fluentd.service is already masked (link to /dev/null), then remove it.
sudo systemctl unmask fluentd

echo "DEBUG: after unmask fluentd"
ls -la /usr/lib/systemd/system/ |grep -E 'td-agent|fluent-package'
ls -la /etc/systemd/system
ls -la /usr/lib/systemd/system/multi-user.target.wants/

# Drop symbolic links and recreate real directory.
sudo rm -f /var/log/td-agent
sudo rm -f /etc/td-agent
Expand All @@ -46,8 +56,9 @@ sudo mv /etc/fluent/td-agent.conf /etc/td-agent/
curl -fsSL https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_name}-td-agent4.sh | sh

# Show .service
ls -la /etc/systemd/system
echo "DEBUG: after downgrade"
ls -la /usr/lib/systemd/system/ |grep -E 'td-agent|fluent-package'
ls -la /etc/systemd/system
ls -la /usr/lib/systemd/system/multi-user.target.wants/

# Test: service status
Expand Down

0 comments on commit 997be4d

Please sign in to comment.