Skip to content

(PE-43839) Add acceptance test for puppet8 to puppet9 agent upgrade#838

Open
span786 wants to merge 3 commits into
mainfrom
PE-43839-4-update-puppet-acceptance-tests-for-mac-os-26-intel
Open

(PE-43839) Add acceptance test for puppet8 to puppet9 agent upgrade#838
span786 wants to merge 3 commits into
mainfrom
PE-43839-4-update-puppet-acceptance-tests-for-mac-os-26-intel

Conversation

@span786

@span786 span786 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds acceptance/tests/test_upgrade_puppet8_to_puppet9.rb, mirroring the existing 7→8 test, with adjustments for the puppet9-nightly track (pre-release 8.99.99.x.gSHA versions, dev_builds routing for newer agent platforms like macOS 26 Intel that have no build at downloads.puppet.com/mac/puppet8/<os>).
  • acceptance/Rakefile: new UPGRADE_TARGET_COLLECTION env-var dispatch so the test selected is decoupled from MASTER_COLLECTION. Needed because puppetserver-9 nightlies aren't yet published, so the master has to stay on puppet8-nightly while still exercising the 8→9 upgrade.
  • acceptance/helpers.rb: fix dormant bug in collection_cmpSymbol#casecmp(String) returns nil on Ruby 3.2, crashing the min:/max: form of require_master_collection. The 7→8 test only uses the String form so this code path was never exercised.

Related: PE-43839

Test plan

  • Validated end-to-end via rake ci against ABS-provisioned puppet8-nightly master + macOS 26 Intel agent — Passed: 1, Failed: 0, Errored: 0
  • Confirmed acceptance/tests/test_upgrade_puppet7_to_puppet8.rb still works (Rakefile dispatch defaults to MASTER_COLLECTION when UPGRADE_TARGET_COLLECTION is unset, preserving existing behaviour)
  • ruby -c syntax-check on the new test file
  • Reviewer: when puppetserver-9 nightlies land at internal_nightly__local/yum, drop UPGRADE_TARGET_COLLECTION and switch MASTER_COLLECTION=puppet9-nightly to test the full puppet9 master path

How to run

cd acceptance
ssh-add ~/.ssh/id_rsa_jenkins   # one-time per session
MASTER_COLLECTION=puppet8-nightly \
UPGRADE_TARGET_COLLECTION=puppet9-nightly \
HOSTS=hosts.yaml \
  bundle exec rake ci

🤖 Generated with Claude Code

Adds tests/test_upgrade_puppet8_to_puppet9.rb modeled on the existing
7→8 test, with adjustments for the puppet9-nightly track:

- require_master_collection min: 'puppet8' (puppet_collection_for strips
  the -nightly suffix, so compare against the bare collection name)
- Version assertion accepts 8.99.99.x.gSHA (Puppet's next-major
  pre-release versioning) alongside the eventual 9.x.y stable form
- curl_passing_sha helper with retries; fails the test rather than
  silently degrading on a VPN blip
- Routes the initial puppet-agent install through dev_builds_url by
  passing the full SHA from passing-agent-SHAs/puppet-agent-8.x, so
  newer agent platforms (e.g. macOS 26) that have no build at
  downloads.puppet.com/mac/puppet8/<os> can still be tested
- Dumps full puppet apply output on non-2 exit (beaker default
  truncates to last 10 lines)

Rakefile: add UPGRADE_TARGET_COLLECTION env-var dispatch so test
selection is decoupled from MASTER_COLLECTION. Lets the master run a
puppet8 puppetserver (since puppetserver-9 nightlies aren't published
yet) while still running the 8→9 upgrade test.

helpers.rb: fix dormant bug in collection_cmp — Symbol#casecmp(String)
returns nil on Ruby 3.2, crashing the min:/max: form of
require_master_collection. The 7→8 test uses the String form so this
code path was never exercised before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@span786 span786 requested review from a team and bastelfreak as code owners May 22, 2026 15:23
- Replace `lambda do |name| ... end` with `->(name) do ... end`
- Single-quote the non-interpolated `=== end output ===` log line

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Beaker acceptance test to exercise upgrading agents from Puppet 8 to Puppet 9 nightlies, and updates the acceptance harness to select the appropriate upgrade scenario independently of the master’s collection. It also fixes a Ruby 3.2 compatibility issue in collection comparison used by require_master_collection range checks.

Changes:

  • Add test_upgrade_puppet8_to_puppet9.rb, mirroring the existing 7→8 upgrade test with puppet9-nightly specifics and stronger SHA/version fetch handling.
  • Update acceptance/Rakefile to select the upgrade test based on UPGRADE_TARGET_COLLECTION (fallback to MASTER_COLLECTION).
  • Fix collection_cmp in acceptance/helpers.rb by comparing collections as strings (avoids Symbol#casecmp returning nil on Ruby 3.2).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
acceptance/tests/test_upgrade_puppet8_to_puppet9.rb New acceptance test for puppet-agent 8→9 upgrade, including SHA/version lookup and version assertions.
acceptance/Rakefile Add env-var dispatch to choose the correct upgrade test for CI runs.
acceptance/helpers.rb Fix collection comparison to avoid Ruby 3.2 Symbol#casecmp behavior in range-based collection gating.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread acceptance/tests/test_upgrade_puppet8_to_puppet9.rb Outdated
Comment thread acceptance/Rakefile Outdated
- Replace shell-out to `curl` with Ruby `open-uri` for the
  passing-agent-SHAs fetch. `curl --retry-connrefused` isn't supported
  on older curl (e.g. 7.29 on CentOS 7) and silently fails to retry,
  producing a misleading "check VPN" message. The Ruby version retries
  in-process and surfaces the actual error (HTTP status, timeout,
  SocketError) in the failure message.
- Normalize blank env vars in the Rakefile dispatch. An empty string
  is truthy in Ruby, so `ENV['UPGRADE_TARGET_COLLECTION'] ||
  ENV['MASTER_COLLECTION']` would have selected no test when the first
  was set but blank. Now both are `.to_s.strip`'d and treated as unset
  when empty.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@span786

span786 commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

Below is the execution log for puppet 8 -> puppet 9 upgrade:

╰─❯ MASTER_COLLECTION=puppet8-nightly UPGRADE_TARGET_COLLECTION=puppet9-nightly HOSTS=hosts.yaml bundle exec rake ci
Using beaker hosts file /Users/saurabhpandit/Documents/workspace/puppetlabs/puppetlabs-puppet_agent/acceptance/hosts.yaml
beaker init -h /Users/saurabhpandit/Documents/workspace/puppetlabs/puppetlabs-puppet_agent/acceptance/hosts.yaml -o options.rb
Writing configured options to disk
Options written to .beaker/subcommand_options.yaml
beaker provision
Beaker::Hypervisor, found some abs boxes to create
Requesting VMs with job_id: saurabh.pandit-1780034997983 Will retry for up to an hour.
Waiting 1s (x1) Total: 0 / 2
Waiting 2s (x2) Total: 0 / 2
Waiting 3s (x3) Total: 0 / 2
Waiting 4s (x4) Total: 0 / 2
Waiting 5s (x5) Total: 0 / 2
Waiting 6s (x6) Total: 0 / 2
Waiting 7s (x7) Total: 0 / 2
Waiting 8s (x8) Total: 0 / 2
Waiting 9s (x9) Total: 0 / 2
Waiting 10s (x10) Total: 0 / 2
Waiting 10s (x11) Total: 0 / 2
Waiting 10s (x12) Total: 0 / 2
Waiting 10s (x13) Total: 0 / 2, Ondemand VMPooler: requesting
Waiting 10s (x14) Total: 0 / 2, Ondemand VMPooler: requesting
Waiting 10s (x15) Total: 0 / 2, Ondemand VMPooler: requesting
Waiting 10s (x16) Total: 0 / 2, Ondemand VMPooler: requesting
Waiting 10s (x17) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 0, pending: 1) macos-26-x86_64 (ready: 0, pending: 1)
Waiting 10s (x18) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 0, pending: 1) macos-26-x86_64 (ready: 0, pending: 1)
Waiting 10s (x19) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 0, pending: 1) macos-26-x86_64 (ready: 0, pending: 1)
Waiting 10s (x20) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 0, pending: 1) macos-26-x86_64 (ready: 0, pending: 1)
Waiting 10s (x21) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 1, pending: 0) macos-26-x86_64 (ready: 0, pending: 1)
Waiting 10s (x22) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 1, pending: 0) macos-26-x86_64 (ready: 0, pending: 1)
Waiting 10s (x23) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 1, pending: 0) macos-26-x86_64 (ready: 0, pending: 1)
Waiting 10s (x24) Total: 0 / 2, Ondemand VMPooler: redhat-9-x86_64 (ready: 1, pending: 0) macos-26-x86_64 (ready: 0, pending: 1)
  Warning: Skipping ip method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning
verify_host_key: false is deprecated, use :never
  Warning: Skipping ip method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning
verify_host_key: false is deprecated, use :never
  Warning: Skipping ip method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning
verify_host_key: false is deprecated, use :never
  Warning: Skipping ip method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning
verify_host_key: false is deprecated, use :never
Disabling updates.puppetlabs.com by modifying hosts file to resolve updates to 127.0.0.1 on fluffy-wildlife.delivery.puppetlabs.net
Disabling updates.puppetlabs.com by modifying hosts file to resolve updates to 127.0.0.1 on splintery-brink.delivery.puppetlabs.net
updating HOSTS key in subcommand_options
beaker exec ./pre_suite
Beaker::Hypervisor, found some none boxes to create
Beaker!
      wWWWw
      |o o|
      | O |  6.8.1!
      |(")|
     / \X/ \
    |   V   |
    |   |   |
{
    "project": "Beaker",
    "department": "unknown",
    "created_by": "saurabhpandit",
    "host_tags": {},
    "openstack_api_key": null,
    "openstack_username": null,
    "openstack_auth_url": "/tokens",
    "openstack_tenant": null,
    "openstack_keyname": null,
    "openstack_network": null,
    "openstack_region": null,
    "openstack_volume_support": true,
    "jenkins_build_url": null,
    "validate": true,
    "configure": true,
    "log_level": "info",
    "trace_limit": 10,
    "master-start-curl-retries": 120,
    "masterless": false,
    "options_file": "options.rb",
    "type": "aio",
    "provision": true,
    "preserve_hosts": "never",
    "root_keys": false,
    "quiet": false,
    "project_root": "/Users/saurabhpandit/.rbenv/versions/3.2.8/lib/ruby/gems/3.2.0/gems/beaker-6.8.1/lib/beaker",
    "xml_dir": "junit",
    "xml_file": "beaker_junit.xml",
    "xml_time": "beaker_times.xml",
    "xml_time_enabled": false,
    "xml_stylesheet": "junit.xsl",
    "default_log_prefix": "beaker_logs",
    "log_dir": "log",
    "log_sut_event": "sut.log",
    "color": true,
    "dry_run": false,
    "test_tag_and": [],
    "test_tag_or": [],
    "test_tag_exclude": [],
    "timeout": 900,
    "fail_mode": "slow",
    "test_results_file": "",
    "accept_all_exit_codes": false,
    "timesync": false,
    "set_env": true,
    "disable_updates": true,
    "repo_proxy": false,
    "package_proxy": false,
    "add_el_extras": false,
    "consoleport": 443,
    "pe_dir": "/opt/enterprise/dists",
    "pe_version_file": "LATEST",
    "pe_version_file_win": "LATEST-win",
    "host_env": {},
    "host_name_prefix": null,
    "ssh_env_file": "~/.ssh/environment",
    "profile_d_env_file": "/etc/profile.d/beaker_env.sh",
    "dot_fog": "/Users/saurabhpandit/.fog",
    "ec2_yaml": "config/image_templates/ec2.yaml",
    "help": false,
    "collect_perf_data": "none",
    "puppetdb_port_ssl": 8081,
    "puppetdb_port_nonssl": 8080,
    "puppetserver_port": 8140,
    "nodeclassifier_port": 4433,
    "cache_files_locally": false,
    "aws_keyname_modifier": "5016855425",
    "run_in_parallel": [],
    "use_fog_credentials": true,
    "ssh": {
        "config": false,
        "verify_host_key": false,
        "auth_methods": [
            "publickey"
        ],
        "port": 22,
        "forward_agent": true,
        "keys": [
            "/Users/saurabhpandit/.ssh/id_rsa"
        ],
        "user_known_hosts_file": "/Users/saurabhpandit/.ssh/known_hosts",
        "keepalive": true
    },
    "pre_suite": [],
    "tests": [
        "./pre_suite/00_master_setup.rb"
    ],
    "is_puppetserver": true,
    "use-service": true,
    "puppetservice": "puppetserver",
    "puppetserver-confdir": "/etc/puppetlabs/puppetserver/conf.d",
    "puppetserver-config": "/etc/puppetlabs/puppetserver/conf.d/puppetserver.conf",
    "HOSTS": {
        "fluffy-wildlife.delivery.puppetlabs.net": {
            "platform": "el-9-x86_64",
            "hypervisor": "abs",
            "template": "redhat-9-x86_64",
            "roles": [
                "agent",
                "master",
                "dashboard",
                "database",
                "default"
            ],
            "host_tags": {},
            "user": "root",
            "group": "root",
            "pathseparator": ":",
            "packaging_platform": "el-9-x86_64",
            "ssh_connection_preference": [
                "ip",
                "vmhostname",
                "hostname"
            ],
            "vmhostname": "fluffy-wildlife.delivery.puppetlabs.net",
            "ip": null,
            "provision": false
        },
        "splintery-brink.delivery.puppetlabs.net": {
            "platform": "osx-26-x86_64",
            "template": "macos-26-x86_64",
            "hypervisor": "abs",
            "roles": [
                "agent"
            ],
            "host_tags": {},
            "user": "root",
            "group": "root",
            "pathseparator": ":",
            "packaging_platform": "osx-26-x86_64",
            "ssh_connection_preference": [
                "ip",
                "vmhostname",
                "hostname"
            ],
            "vmhostname": "splintery-brink.delivery.puppetlabs.net",
            "ip": null,
            "provision": false
        }
    },
    "home": "/Users/saurabhpandit",
    "helper": [],
    "load_path": [],
    "post_suite": [],
    "install": [],
    "pre_cleanup": [],
    "modules": [],
    "hosts_preserved_yaml_file": null,
    "command_line": "/Users/saurabhpandit/.rbenv/versions/3.2.8/bin/beaker exec ./pre_suite",
    "logger": "#<Beaker::Logger:0x0000000108c6d7f8>",
    "timestamp": "2026-05-29 11:44:27 +0530",
    "beaker_version": "6.8.1",
    "log_prefix": "beaker_logs",
    "xml_dated_dir": "junit/beaker_logs/2026-05-29_11_44_27",
    "log_dated_dir": "log/beaker_logs/2026-05-29_11_44_27",
    "logger_sut": "#<Beaker::Logger:0x0000000108c6d1b8>"
}
No tests to run for suite 'pre_suite'
Begin ./pre_suite/00_master_setup.rb

Pre-Suite: Install puppet-agent from collection 'puppet8-nightly' on the master
    Warning: Skipping ip method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning
verify_host_key: false is deprecated, use :never
  Installed puppet-agent 8.19.0.16 on master

Pre-Suite: Install, configure, and start a compatible puppetserver on the master

  * Install puppetserver
    Installed puppetserver version 8.9.9 on fluffy-wildlife.delivery.puppetlabs.net

  * Configure puppetserver
    localhost $ scp /var/folders/n1/zf65bqqx2l71f8sdqnrrpkp00000gn/T/beaker20260529-3249-3gjqp3 fluffy-wildlife.delivery.puppetlabs.net:/tmp/.8Kn5UL/puppet.conf {:ignore => }
    localhost $ scp /var/folders/n1/zf65bqqx2l71f8sdqnrrpkp00000gn/T/beaker20260529-3249-7iew0g fluffy-wildlife.delivery.puppetlabs.net:/etc/puppetlabs/puppetserver/conf.d/puppetserver.conf {:ignore => }

  * Stop the firewall, clear SSL, set up the CA, if needed

  * Start puppetserver
Begin teardown
End teardown
./pre_suite/00_master_setup.rb passed in 240.98 seconds
      Test Suite: tests @ 2026-05-29 11:44:27 +0530

      - Host Configuration Summary -


              - Test Case Summary for suite 'tests' -
       Total Suite Time: 240.98 seconds
      Average Test Time: 240.98 seconds
              Attempted: 1
                 Passed: 1
                 Failed: 0
                Errored: 0
                Skipped: 0
                Pending: 0
                  Total: 1

      - Specific Test Case Status -

Failed Tests Cases:
Errored Tests Cases:
Skipped Tests Cases:
Pending Tests Cases:

No tests to run for suite 'post_suite'
No tests to run for suite 'pre_cleanup'
Cleanup: cleaning up after successful run
You can run individual test(s) with `bundle exec beaker exec <path-to-test(s)>`
You can destroy your provisioned hosts with `bundle exec beaker destroy` when you're ready
beaker exec ./tests/test_upgrade_puppet8_to_puppet9.rb
Beaker::Hypervisor, found some none boxes to create
Beaker!
      wWWWw
      |o o|
      | O |  6.8.1!
      |(")|
     / \X/ \
    |   V   |
    |   |   |
{
    "project": "Beaker",
    "department": "unknown",
    "created_by": "saurabhpandit",
    "host_tags": {},
    "openstack_api_key": null,
    "openstack_username": null,
    "openstack_auth_url": "/tokens",
    "openstack_tenant": null,
    "openstack_keyname": null,
    "openstack_network": null,
    "openstack_region": null,
    "openstack_volume_support": true,
    "jenkins_build_url": null,
    "validate": true,
    "configure": true,
    "log_level": "info",
    "trace_limit": 10,
    "master-start-curl-retries": 120,
    "masterless": false,
    "options_file": "options.rb",
    "type": "aio",
    "provision": true,
    "preserve_hosts": "never",
    "root_keys": false,
    "quiet": false,
    "project_root": "/Users/saurabhpandit/.rbenv/versions/3.2.8/lib/ruby/gems/3.2.0/gems/beaker-6.8.1/lib/beaker",
    "xml_dir": "junit",
    "xml_file": "beaker_junit.xml",
    "xml_time": "beaker_times.xml",
    "xml_time_enabled": false,
    "xml_stylesheet": "junit.xsl",
    "default_log_prefix": "beaker_logs",
    "log_dir": "log",
    "log_sut_event": "sut.log",
    "color": true,
    "dry_run": false,
    "test_tag_and": [],
    "test_tag_or": [],
    "test_tag_exclude": [],
    "timeout": 900,
    "fail_mode": "slow",
    "test_results_file": "",
    "accept_all_exit_codes": false,
    "timesync": false,
    "set_env": true,
    "disable_updates": true,
    "repo_proxy": false,
    "package_proxy": false,
    "add_el_extras": false,
    "consoleport": 443,
    "pe_dir": "/opt/enterprise/dists",
    "pe_version_file": "LATEST",
    "pe_version_file_win": "LATEST-win",
    "host_env": {},
    "host_name_prefix": null,
    "ssh_env_file": "~/.ssh/environment",
    "profile_d_env_file": "/etc/profile.d/beaker_env.sh",
    "dot_fog": "/Users/saurabhpandit/.fog",
    "ec2_yaml": "config/image_templates/ec2.yaml",
    "help": false,
    "collect_perf_data": "none",
    "puppetdb_port_ssl": 8081,
    "puppetdb_port_nonssl": 8080,
    "puppetserver_port": 8140,
    "nodeclassifier_port": 4433,
    "cache_files_locally": false,
    "aws_keyname_modifier": "5569847834",
    "run_in_parallel": [],
    "use_fog_credentials": true,
    "ssh": {
        "config": false,
        "verify_host_key": false,
        "auth_methods": [
            "publickey"
        ],
        "port": 22,
        "forward_agent": true,
        "keys": [
            "/Users/saurabhpandit/.ssh/id_rsa"
        ],
        "user_known_hosts_file": "/Users/saurabhpandit/.ssh/known_hosts",
        "keepalive": true
    },
    "pre_suite": [],
    "tests": [
        "./tests/test_upgrade_puppet8_to_puppet9.rb"
    ],
    "is_puppetserver": true,
    "use-service": true,
    "puppetservice": "puppetserver",
    "puppetserver-confdir": "/etc/puppetlabs/puppetserver/conf.d",
    "puppetserver-config": "/etc/puppetlabs/puppetserver/conf.d/puppetserver.conf",
    "HOSTS": {
        "fluffy-wildlife.delivery.puppetlabs.net": {
            "platform": "el-9-x86_64",
            "hypervisor": "abs",
            "template": "redhat-9-x86_64",
            "roles": [
                "agent",
                "master",
                "dashboard",
                "database",
                "default"
            ],
            "host_tags": {},
            "user": "root",
            "group": "root",
            "pathseparator": ":",
            "packaging_platform": "el-9-x86_64",
            "ssh_connection_preference": [
                "ip",
                "vmhostname",
                "hostname"
            ],
            "vmhostname": "fluffy-wildlife.delivery.puppetlabs.net",
            "ip": null,
            "provision": false
        },
        "splintery-brink.delivery.puppetlabs.net": {
            "platform": "osx-26-x86_64",
            "template": "macos-26-x86_64",
            "hypervisor": "abs",
            "roles": [
                "agent"
            ],
            "host_tags": {},
            "user": "root",
            "group": "root",
            "pathseparator": ":",
            "packaging_platform": "osx-26-x86_64",
            "ssh_connection_preference": [
                "ip",
                "vmhostname",
                "hostname"
            ],
            "vmhostname": "splintery-brink.delivery.puppetlabs.net",
            "ip": null,
            "provision": false
        }
    },
    "home": "/Users/saurabhpandit",
    "helper": [],
    "load_path": [],
    "post_suite": [],
    "install": [],
    "pre_cleanup": [],
    "modules": [],
    "hosts_preserved_yaml_file": null,
    "command_line": "/Users/saurabhpandit/.rbenv/versions/3.2.8/bin/beaker exec ./tests/test_upgrade_puppet8_to_puppet9.rb",
    "logger": "#<Beaker::Logger:0x000000010cd6d898>",
    "timestamp": "2026-05-29 11:48:30 +0530",
    "beaker_version": "6.8.1",
    "log_prefix": "beaker_logs",
    "xml_dated_dir": "junit/beaker_logs/2026-05-29_11_48_30",
    "log_dated_dir": "log/beaker_logs/2026-05-29_11_48_30",
    "logger_sut": "#<Beaker::Logger:0x000000010cd6d258>"
}
No tests to run for suite 'pre_suite'
Begin ./tests/test_upgrade_puppet8_to_puppet9.rb

puppet_agent class: Upgrade agents from puppet8 to puppet9
    Warning: Skipping ip method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning
verify_host_key: false is deprecated, use :never
  Using latest puppet-agent-9.x 8.99.99.108.gbda5b9977

  * (Master) Create test environment

  * (Master) Install puppet_agent to the test environment
    localhost $ scp /Users/saurabhpandit/Documents/workspace/puppetlabs/puppetlabs-puppet_agent fluffy-wildlife.delivery.puppetlabs.net:/etc/puppetlabs/code/environments/puppet_agent_testing_1c3652c259f19accde34/modules {:ignore => ["/.bundle", "/.git", "/.idea", "/.vagrant", "/.vendor", "/vendor", "/acceptance", "/bundle", "/spec", "/tests", "/log", "/.svn", "/junit", "/pkg", "/example", "/tmp", ".", ".."]}

  * Create new site.pp with upgrade manifest
    localhost $ scp /var/folders/n1/zf65bqqx2l71f8sdqnrrpkp00000gn/T/beaker20260529-19744-zvcxs7 fluffy-wildlife.delivery.puppetlabs.net:/etc/puppetlabs/code/environments/puppet_agent_testing_1c3652c259f19accde34/manifests/site.pp {:ignore => }
  Using puppet-agent 8.x ref for initial agent install: 777544ec8e56eba4ec351d97217a199794689b65

  * Set-up the agents to upgrade

    * (Agent) Install the puppet-agent package
        Warning: Skipping ip method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning
verify_host_key: false is deprecated, use :never
      Fetching: https://builds.delivery.puppetlabs.net/puppet-agent/777544ec8e56eba4ec351d97217a199794689b65/artifacts/777544ec8e56eba4ec351d97217a199794689b65.yaml
        and saving to /var/folders/n1/zf65bqqx2l71f8sdqnrrpkp00000gn/T/d20260529-19744-ltsqr0/777544ec8e56eba4ec351d97217a199794689b65.yaml

    * (Agent) Clear SSL and stop firewalls
      Not sure how to clear firewall on osx-26-x86_64

    * (Agent) Stop the puppet service to avoid possible race conditions with conflicting Puppet runs

    * (Agent) configure server setting on agent

    * (Agent) Run puppet agent -t to generate CSRs

    * (Master) Sign certs

    * (Agent) Run puppet agent -t again to obtain the signed cert and apply initial configuration

  * (Agent) Change agent environment to testing environment

  * Upgrade the agents from Puppet 8 to Puppet 9...

    * (Agent) waiting for upgrade pid file to be created...

    * (Agent) waiting for upgrade to complete...

  * Run again for idempotency
Begin teardown

* (Agent) Stop the puppet service

* Teardown: (Agent) Uninstall the puppet-agent package on agent splintery-brink.delivery.puppetlabs.net (osx-26-x86_64)

* Teardown: (Master) Clean agent splintery-brink.delivery.puppetlabs.net cert
End teardown
./tests/test_upgrade_puppet8_to_puppet9.rb passed in 841.39 seconds
      Test Suite: tests @ 2026-05-29 11:48:30 +0530

      - Host Configuration Summary -


              - Test Case Summary for suite 'tests' -
       Total Suite Time: 840.97 seconds
      Average Test Time: 840.97 seconds
              Attempted: 1
                 Passed: 1
                 Failed: 0
                Errored: 0
                Skipped: 0
                Pending: 0
                  Total: 1

      - Specific Test Case Status -

Failed Tests Cases:
Errored Tests Cases:
Skipped Tests Cases:
Pending Tests Cases:

No tests to run for suite 'post_suite'
No tests to run for suite 'pre_cleanup'
Cleanup: cleaning up after successful run

initial_agent_version = ENV['INITIAL_PUPPET_AGENT_VERSION'] || fetch_passing_sha.call('puppet-agent-8.x')
logger.info("Using puppet-agent 8.x ref for initial agent install: #{initial_agent_version}")
agents_only.each do |agent|
# REMIND: PA-7431 use nightly repos once those release packages are fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# REMIND: PA-7431 use nightly repos once those release packages are fixed

I think this is copy-pasta and can be dropped?

# newer master so the test can run while agents are upgraded to puppet9.
# puppet_collection_for(:puppetserver, ...) returns bare 'puppet8'/'puppet9'
# (no -nightly suffix), so compare against the bare collection name.
require_master_collection min: 'puppet8'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's isn't one already, could you create a ticket to update this to puppet9 in the future? And add it to this epic https://perforce.atlassian.net/browse/PA-8395?

@joshcooper joshcooper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, feel free to merge whenever. Also could you create a CJC PR and link to this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants