Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent changes broke install_puppet_agent_pe_promoted_repo_on #155

Open
cthorn42 opened this issue Dec 24, 2020 · 1 comment
Open

Recent changes broke install_puppet_agent_pe_promoted_repo_on #155

cthorn42 opened this issue Dec 24, 2020 · 1 comment

Comments

@cthorn42
Copy link
Contributor

We use the install_puppet_agent_pe_promoted_repo_on method to test installing older puppet-agents and test them out against new PE environments setup with newer puppetservers.
A recent change to the install_puppet_agent_pe_promoted_repo_on recently broke installing older agents (pre PE 2019.0 at least).
I believe the break down is in the method we changed how the puppet_collection is set.
We use to use the install path as this when the agent version is puppet_agent_version=>"5.5.3":
/root/repos/el/7/PC1/x86_64/puppet-agent-*.rpm
Which use to work, but now when we attempt to install we're using this:
/root/repos/el/7/puppet5/x86_64/puppet-agent-*.rpm
Notice the change from PC1 to puppet5, which looks to break things.

@cthorn42
Copy link
Contributor Author

Reproduction use this host file:

---
HOSTS:
  redhat7-64-1:
    pe_dir: https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/2019.8/ci-ready
    pe_ver: 2019.8.5-rc3-103-gcbf80ff
    pe_upgrade_dir:
    pe_upgrade_ver:
    platform: el-7-x86_64
    packaging_platform: el-7-x86_64
    template: redhat-7-x86_64
    hypervisor: abs
    roles:
    - agent
    - master
    - dashboard
    - database
  redhat7-64-2:
    pe_dir: https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/2019.8/ci-ready
    pe_ver: 2019.8.5-rc3-103-gcbf80ff
    pe_upgrade_dir:
    pe_upgrade_ver:
    platform: el-7-x86_64
    packaging_platform: el-7-x86_64
    template: redhat-7-x86_64
    hypervisor: abs
    roles:
    - agent
    - legacy_agent
CONFIG:
  nfs_server: none
  consoleport: 443
  ssh:
    forward_agent: 'true'

Pre-suite is a slightly modified file to make it easier to share:
pre-suite-example.rb:

require 'beaker-puppet'
# (PE-25157) Prep 2019.0+ master with 5.x CA for legacy tests
test_name 'Prepare a 2019.0+ master for legacy agents from < 2019.0' do
  install_params = {
    :puppet_agent_version => "5.5.3",
    :pe_ver => "2018.1.2",
  }
  original_master_pe_ver = master['pe_ver']
  master['pe_ver'] = "2018.1.12"
  install_puppet_agent_pe_promoted_repo_on(master, install_params)
  # Generate 5.5.6 self signed root ca on the master
  #on(master, puppet("cert --generate #{master} --ca_name 'PE CA'"))
  #master['pe_ver'] = original_master_pe_ver
end

Then have a Gemfile that has beaker-puppet that points to latest, and run this command:
bundle exec beaker -h hosts.cfg --pre-suite pre-suite-example.rb --log-level verbose
Output that we care about:

  ardent-ague.delivery.puppetlabs.net (redhat7-64-1) 15:40:19$ yum --nogpgcheck localinstall -y /root/repos/el/7/puppet5/x86_64/puppet-agent-*.rpm
    Loaded plugins: product-id, search-disabled-repos, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Cannot open: /root/repos/el/7/puppet5/x86_64/puppet-agent-*.rpm. Skipping.
    Nothing to do

If we go back and pin beaker-puppet to 1.20, and re-run the bundler command we see what we use to see before the change:

  sour-wedlock.delivery.puppetlabs.net (redhat7-64-1) 17:07:18$ yum --nogpgcheck localinstall -y /root/repos/el/7/PC1/x86_64/puppet-agent-*.rpm
    Loaded plugins: product-id, search-disabled-repos, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Examining /root/repos/el/7/PC1/x86_64/puppet-agent-5.5.3-1.el7.x86_64.rpm: puppet-agent-5.5.3-1.el7.x86_64
    Marking /root/repos/el/7/PC1/x86_64/puppet-agent-5.5.3-1.el7.x86_64.rpm to be installed
    Resolving Dependencies
    --> Running transaction check
    ---> Package puppet-agent.x86_64 0:5.5.3-1.el7 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    ================================================================================
     Package        Arch     Version       Repository                          Size
    ================================================================================
    Installing:
     puppet-agent   x86_64   5.5.3-1.el7   /puppet-agent-5.5.3-1.el7.x86_64    87 M

    Transaction Summary
    ================================================================================
    Install  1 Package
    Total size: 87 M
    Installed size: 87 M
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : puppet-agent-5.5.3-1.el7.x86_64                              1/1
      Verifying  : puppet-agent-5.5.3-1.el7.x86_64                              1/1

    Installed:
      puppet-agent.x86_64 0:5.5.3-1.el7

    Complete!

We get a successful 5.5.3 puppet-agent install!

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

No branches or pull requests

1 participant