Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Alvarez <alvajus@amazon.com>
  • Loading branch information
pendo324 committed Sep 18, 2024
1 parent d648225 commit dd962aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 28 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/e2e-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
- name: Check repo out manually
if: ${{ (startsWith(inputs.os, 'amazon') && inputs.version == '2' ) }}
run: |
pwd
echo "${GITHUB_WORKSPACE}"
ls -lah
git clone https://github.com/${GITHUB_REPOSITORY}.git .
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/prh/*"
git config --add remote.origin.fetch "+refs/pull/*/merge:refs/remotes/origin/prm/*"
Expand All @@ -75,10 +72,11 @@ jobs:
sudo systemctl stop finch-buildkit.service || true
sudo systemctl stop finch-soci.service || true
sudo sudo rpm -e runfinch-finch || true
sudo systemctl stop containerd.service
sudo systemctl daemon-reload
sudo rm -rf /etc/finch
sudo rm -rf /var/finch
sudo rm -rf /var/containerd
sudo rm -rf /var/lib/containerd
sudo rm -rf /var/soci-snapshotter
sudo rm -rf ./_output
- name: Build project
Expand All @@ -88,6 +86,7 @@ jobs:
run: |
sudo rpm -i ./_output/packages/$(ls -t ./_output/packages/ | grep runfinch-finch | head -1)
sudo systemctl daemon-reload
sudo systemctl start containerd.service
sudo systemctl start finch.service
sudo systemctl start finch-buildkit.service
sudo systemctl start finch-soci.service
Expand Down
28 changes: 5 additions & 23 deletions contrib/packaging/rpm/finch.spec
Original file line number Diff line number Diff line change
Expand Up @@ -234,32 +234,14 @@ fi
# nerdctl
%{_libexecdir}/finch/nerdctl

%pre
# Stop the agent before the upgrade
STATUS="$(systemctl is-active --quiet finch.service)"
if [ "${STATUS}" = "active" ]; then
systemctl stop finch.service
systemctl daemon-reload
fi
%post
%systemd_post finch

%preun
# Stop the agent after uninstall
STATUS="$(systemctl is-active --quiet finch.service)"
if [ "${STATUS}" = "active" ]; then
systemctl stop finch.service
systemctl daemon-reload
fi
ENABLED="$(systemctl is-enabled --quiet finch.service)"
if [ "${ENABLED}" = "enabled" ]; then
systemctl disable finch.service
fi
systemctl daemon-reload
%systemd_preun finch

%posttrans
# Start the agent after initial install or upgrade
systemctl enable finch.service
systemctl start finch.service
systemctl daemon-reload
%postun
%systemd_postun_with_restart finch

%changelog
* Fri Jul 26 2024 Justin Alvarez <alvajus@amazon.com> -
Expand Down
2 changes: 1 addition & 1 deletion e2e/container/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestContainer(t *testing.T) {
tests.Run(&tests.RunOption{BaseOpt: o, CGMode: tests.Hybrid, DefaultHostGatewayIP: hostIP})
case "darwin":
tests.Run(&tests.RunOption{BaseOpt: o, CGMode: tests.Unified, DefaultHostGatewayIP: "192.168.5.2"})
default:
case "linux":
fmt.Printf("getCGroupMode(): %d\n", getCGroupMode())
tests.Run(&tests.RunOption{BaseOpt: o, CGMode: getCGroupMode(), DefaultHostGatewayIP: ncdefaults.HostGatewayIP()})
}
Expand Down

0 comments on commit dd962aa

Please sign in to comment.