diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6372c47..99dfc50 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -298,8 +298,17 @@ jobs: run: | set +e cd ${{ github.workspace }}/AWS/tf-provider/ - /usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[0]) -tq 'sudo /opt/openziti/bin/zfw -V' - /usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[1]) -tq 'sudo /opt/openziti/bin/zfw -V' + zfw0_ver=`/usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[0]) -tq 'sudo /opt/openziti/bin/zfw -V'` + zfw1_ver=`/usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[1]) -tq 'sudo /opt/openziti/bin/zfw -V'` + if [ "$zfw0_ver" != "$zfw1_ver" ]; then + /usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[0]) -tq 'sudo cat /var/log/cloud-init-output.log' + /usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[1]) -tq 'sudo cat /var/log/cloud-init-output.log' + sleep 60 + zfw0_ver=`/usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[0]) -tq 'sudo /opt/openziti/bin/zfw -V'` + zfw1_ver=`/usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ./zfw_rsa ziggy@$(terraform output -json | jq -r .backend_public_ips.value[1]) -tq 'sudo /opt/openziti/bin/zfw -V'` + fi + echo "*** zfw0: $zfw0_ver ***" + echo "*** zfw1: $zfw1_ver ***" while : do sleep 900 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e463e0..890b89b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format --- ### -# [0.9.56 - 2024-12-09 +# [0.9.7] - 2024-12-16 + +- added debug option to the pr worklow for checking version tested + +### + +# [0.9.6] - 2024-12-09 - Updated zfw.c to redirect system call output to /dev/null for set_tc_filter() diff --git a/src/zfw.c b/src/zfw.c index 2b7a2c7..33d5cb2 100644 --- a/src/zfw.c +++ b/src/zfw.c @@ -263,7 +263,7 @@ char *direction_string; char *masq_interface; char check_alt[IF_NAMESIZE]; -const char *argp_program_version = "0.9.6"; +const char *argp_program_version = "0.9.7"; struct ring_buffer *ring_buffer; __u32 if_list[MAX_IF_LIST_ENTRIES]; diff --git a/src/zfw_monitor.c b/src/zfw_monitor.c index 1505a37..32b84a0 100644 --- a/src/zfw_monitor.c +++ b/src/zfw_monitor.c @@ -87,7 +87,7 @@ char check_alt[IF_NAMESIZE]; char doc[] = "zfw_monitor -- ebpf firewall monitor tool"; const char *rb_map_path = "/sys/fs/bpf/tc/globals/rb_map"; const char *tproxy_map_path = "/sys/fs/bpf/tc/globals/zt_tproxy_map"; -const char *argp_program_version = "0.9.6"; +const char *argp_program_version = "0.9.7"; union bpf_attr rb_map; int rb_fd = -1;