From 8c0de31115efcbde3d555d13f633b9f972539aab Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Wed, 4 Mar 2026 09:30:08 +0000 Subject: [PATCH 1/7] (MAINT) Test alternative retry logic --- .github/workflows/module_acceptance.yml | 50 +++++++++++++++---------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index 769a338..8827a28 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -132,26 +132,36 @@ jobs: bundle env echo ::endgroup:: - - name: "Provision environment" - run: | - if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then - DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}" - else - DOCKER_RUN_OPTS='' - fi - bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]" - # Redact password - FILE='spec/fixtures/litmus_inventory.yaml' - sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true - - - name: "Install Puppet agent" - run: | - if [[ "${{ matrix.collection.version }}" ]] ; then - export PUPPET_VERSION=${{ matrix.collection.version }} - bundle exec rake 'litmus:install_agent[${{ matrix.collection.collection }}]' - else - bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' - fi + - name: "Provision environment and install Puppet agent" + uses: nick-fields/retry@v3 + with: + timeout_minutes: 15 + max_attempts: 5 + retry_wait_seconds: 10 + on_retry_command: | + echo "Cleaning up failed environment before retry..." + if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then + bundle exec rake 'litmus:tear_down' || true + fi + command: | + # Provision environment + if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then + DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}" + else + DOCKER_RUN_OPTS='' + fi + bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]" + # Redact password + FILE='spec/fixtures/litmus_inventory.yaml' + sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true + + # Install Puppet agent + if [[ "${{ matrix.collection.version }}" ]] ; then + export PUPPET_VERSION=${{ matrix.collection.version }} + bundle exec rake 'litmus:install_agent[${{ matrix.collection.collection }}]' + else + bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' + fi - name: "Install module" run: | From effec06e7088c8402a0b2f6ea61f802da6f03378 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Wed, 4 Mar 2026 09:43:10 +0000 Subject: [PATCH 2/7] fix bash --- .github/workflows/module_acceptance.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index 8827a28..5c4389a 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -138,6 +138,7 @@ jobs: timeout_minutes: 15 max_attempts: 5 retry_wait_seconds: 10 + shell: bash on_retry_command: | echo "Cleaning up failed environment before retry..." if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then From 15ab775ad03748d5779f9182fc78505d363e13e4 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Wed, 4 Mar 2026 09:57:16 +0000 Subject: [PATCH 3/7] add twingate fixup and address bash issue --- .github/workflows/module_acceptance.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index 5c4389a..b124517 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -107,6 +107,9 @@ jobs: echo "=== Test DNS resolution ===" nslookup artifactory.delivery.puppetlabs.net + Adjust resolv.conf to address Twingate-Docker issues + sed '/^nameserver 168.63.129.16$/d; /^search/d' /etc/resolv.conf > /tmp/resolv.conf && cat /tmp/resolv.conf > /etc/resolv.conf + - name: "Checkout" uses: "actions/checkout@v4" @@ -141,7 +144,7 @@ jobs: shell: bash on_retry_command: | echo "Cleaning up failed environment before retry..." - if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then + if test -f spec/fixtures/litmus_inventory.yaml; then bundle exec rake 'litmus:tear_down' || true fi command: | From 73224e1cc40b72a4351884f4d069b9ad0dd37ff1 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Wed, 4 Mar 2026 10:00:19 +0000 Subject: [PATCH 4/7] fix comment --- .github/workflows/module_acceptance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index b124517..2c98c32 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -107,7 +107,7 @@ jobs: echo "=== Test DNS resolution ===" nslookup artifactory.delivery.puppetlabs.net - Adjust resolv.conf to address Twingate-Docker issues + echo "=== Adjust resolv.conf to address Twingate-Docker issues ===" sed '/^nameserver 168.63.129.16$/d; /^search/d' /etc/resolv.conf > /tmp/resolv.conf && cat /tmp/resolv.conf > /etc/resolv.conf - name: "Checkout" From 89715e85ecd32df9ecee8e652b3229707d03c998 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Wed, 4 Mar 2026 10:05:45 +0000 Subject: [PATCH 5/7] move twingate-docker fix to retry block --- .github/workflows/module_acceptance.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index 2c98c32..cf5dc0f 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -107,9 +107,6 @@ jobs: echo "=== Test DNS resolution ===" nslookup artifactory.delivery.puppetlabs.net - echo "=== Adjust resolv.conf to address Twingate-Docker issues ===" - sed '/^nameserver 168.63.129.16$/d; /^search/d' /etc/resolv.conf > /tmp/resolv.conf && cat /tmp/resolv.conf > /etc/resolv.conf - - name: "Checkout" uses: "actions/checkout@v4" @@ -159,6 +156,10 @@ jobs: FILE='spec/fixtures/litmus_inventory.yaml' sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true + # Fix DNS inside the provisioned container + echo "=== Adjusting resolv.conf inside provisioned container ===" + bundle exec bolt command run "sed -i '/^nameserver 168.63.129.16$/d; /^search/d' /etc/resolv.conf" --targets all --inventoryfile spec/fixtures/litmus_inventory.yaml + # Install Puppet agent if [[ "${{ matrix.collection.version }}" ]] ; then export PUPPET_VERSION=${{ matrix.collection.version }} From 7085f7924f353b9a79217f8b6ad0242cac067496 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Wed, 4 Mar 2026 10:16:59 +0000 Subject: [PATCH 6/7] alt version of resolv.conf resolution --- .github/workflows/module_acceptance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index cf5dc0f..1e90102 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -158,7 +158,7 @@ jobs: # Fix DNS inside the provisioned container echo "=== Adjusting resolv.conf inside provisioned container ===" - bundle exec bolt command run "sed -i '/^nameserver 168.63.129.16$/d; /^search/d' /etc/resolv.conf" --targets all --inventoryfile spec/fixtures/litmus_inventory.yaml + bundle exec bolt command run "sed '/^nameserver 168.63.129.16\$/d; /^search/d' /etc/resolv.conf > /tmp/resolv.conf && cat /tmp/resolv.conf > /etc/resolv.conf" --targets all --inventoryfile spec/fixtures/litmus_inventory.yaml # Install Puppet agent if [[ "${{ matrix.collection.version }}" ]] ; then From d24f94886ed3fee6dd0d206c2a5e6d0a78540edd Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Wed, 4 Mar 2026 10:33:35 +0000 Subject: [PATCH 7/7] remove retry function, keep resolv.conf resolution --- .github/workflows/module_acceptance.yml | 60 +++++++++++-------------- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/.github/workflows/module_acceptance.yml b/.github/workflows/module_acceptance.yml index 1e90102..1fd17e5 100644 --- a/.github/workflows/module_acceptance.yml +++ b/.github/workflows/module_acceptance.yml @@ -132,41 +132,31 @@ jobs: bundle env echo ::endgroup:: - - name: "Provision environment and install Puppet agent" - uses: nick-fields/retry@v3 - with: - timeout_minutes: 15 - max_attempts: 5 - retry_wait_seconds: 10 - shell: bash - on_retry_command: | - echo "Cleaning up failed environment before retry..." - if test -f spec/fixtures/litmus_inventory.yaml; then - bundle exec rake 'litmus:tear_down' || true - fi - command: | - # Provision environment - if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then - DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}" - else - DOCKER_RUN_OPTS='' - fi - bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]" - # Redact password - FILE='spec/fixtures/litmus_inventory.yaml' - sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true - - # Fix DNS inside the provisioned container - echo "=== Adjusting resolv.conf inside provisioned container ===" - bundle exec bolt command run "sed '/^nameserver 168.63.129.16\$/d; /^search/d' /etc/resolv.conf > /tmp/resolv.conf && cat /tmp/resolv.conf > /etc/resolv.conf" --targets all --inventoryfile spec/fixtures/litmus_inventory.yaml - - # Install Puppet agent - if [[ "${{ matrix.collection.version }}" ]] ; then - export PUPPET_VERSION=${{ matrix.collection.version }} - bundle exec rake 'litmus:install_agent[${{ matrix.collection.collection }}]' - else - bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' - fi + - name: "Provision environment" + run: | + if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then + DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}" + else + DOCKER_RUN_OPTS='' + fi + bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]" + # Redact password + FILE='spec/fixtures/litmus_inventory.yaml' + sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true + + - name: "Resolve Twingate-Docker DNS conflict" + run: | + echo "=== Adjusting resolv.conf inside provisioned container ===" + bundle exec bolt command run "sed '/^nameserver 168.63.129.16\$/d; /^search/d' /etc/resolv.conf > /tmp/resolv.conf && cat /tmp/resolv.conf > /etc/resolv.conf" --targets all --inventoryfile spec/fixtures/litmus_inventory.yaml + + - name: "Install Puppet agent" + run: | + if [[ "${{ matrix.collection.version }}" ]] ; then + export PUPPET_VERSION=${{ matrix.collection.version }} + bundle exec rake 'litmus:install_agent[${{ matrix.collection.collection }}]' + else + bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' + fi - name: "Install module" run: |