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

(PE-18516,PE-18170) Temporarily set pe.conf when upgrading to Flanders #40

Conversation

jpartlow
Copy link
Contributor

At the moment, MEEP does not create a 2.0 pe.conf when recovering
configuration for an upgrade. This is preventing all upgrade tests from
PE >= 2016.2 (when meep was introduced) to PE >= 2017.1 from completing
because meep ends up using a 1.0 pe.conf that has no node_roles. Without
the node_roles information, the node is not considered infrastructure,
and meep's enc returns no classes for it, so nothing happens in the
upgrade apply.

This is not currently a problem upgrading from < 2016.2 because
beaker-pe is providing the beaker-answers pe.conf in those cases.

To work around this, I've added a check, just if we are upgrading to a
Flanders version, which supplies the beaker-answers generated pe.conf.

This patch is just intended to get upgrades from earlier meep versions
working in CI. When we get to PE-18170 (also scheduled for Flanders)
we'll work on improving recover configuration to generate a 2.0 pe.conf,
with the goal being that beaker-answers should not need to provide
anything for pe.conf for Flanders upgrades unless some additional
parameters were added in the beaker configuration.

At the moment, MEEP does not create a 2.0 pe.conf when recovering
configuration for an upgrade.  This is preventing all upgrade tests from
PE >= 2016.2 (when meep was introduced) to PE >= 2017.1 from completing
because meep ends up using a 1.0 pe.conf that has no node_roles. Without
the node_roles information, the node is not considered infrastructure,
and meep's enc returns no classes for it, so nothing happens in the
upgrade apply.

This is not currently a problem upgrading from < 2016.2 because
beaker-pe is providing the beaker-answers pe.conf in those cases.

To work around this, I've added a check, just if we are upgrading to a
Flanders version, which supplies the beaker-answers generated pe.conf.

This patch is just intended to get upgrades from earlier meep versions
working in CI. When we get to PE-18170 (also scheduled for Flanders)
we'll work on improving recover configuration to generate a 2.0 pe.conf,
with the goal being that beaker-answers should not need to provide
anything for pe.conf for Flanders upgrades unless some additional
parameters were added in the beaker configuration.
@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@jpartlow
Copy link
Contributor Author

./frankenbuilder 2017.1 --install --upgrade --upgrade-from 2016.4.2 --smoke --vmpooler

The upgrade from 2016.4.2 now succeeds. The check_package_version test fails, but only because 2016.4.2 has more recent postgresql and license packages (this is a separate issue that I'll open an RE ticket for).

 - Test Case Summary for suite 'tests' -
       Total Suite Time: 660.46 seconds
      Average Test Time: 15.36 seconds
              Attempted: 43
                 Passed: 39
                 Failed: 1
                Errored: 0
                Skipped: 3
                Pending: 0
                  Total: 43

      - Specific Test Case Status -

Failed Tests Cases:
            Test Case /s/pe_acceptance_tests/acceptance/tests/pe_checks/check_package_versions.rb reported: #<Beaker::DSL::Outcomes::FailTest: 
          Differing versions were found between installed packages and package-versions.json.
          >
              Test line: /s/pe_acceptance_tests/acceptance/tests/pe_checks/check_package_versions.rb:52:in `block (4 levels) in run_test'
Errored Tests Cases:
Skipped Tests Cases:
            Test Case /s/pe_acceptance_tests/acceptance/tests/license_checks/03-ticket_9991_count_new_licenses.rb 
            Test Case /s/pe_acceptance_tests/acceptance/tests/puppetdb/puppetdb_cert_whitelist.rb 
            Test Case /s/pe_acceptance_tests/acceptance/tests/security/pe13452_pcp_agents_cant_send_commands.rb 
Pending Tests Cases:

          Failed: errored in TestSuite: report_and_raise_on_failure
          #<RuntimeError: Failed while running the tests suite>
          No tests to run for suite 'post_suite'
          No tests to run for suite 'pre_cleanup'

          You can reproduce this run with:
          /home/jpartlow/work/src/pl/pe_acceptance_tests/.bundle/gems/ruby/2.3.0/bin/beaker --tests=/s/pe_acceptance_tests/acceptance/tests --helper=/s/pe_acceptance_tests/lib/beaker_helper.rb --pre-suite=/s/pe_acceptance_tests/setup/install.rb,/s/pe_acceptance_tests/setup/upgrade.rb --config=/home/jpartlow/work/src/pl/frankenbuilder/frankenbuild/beaker.yml

          You can re-run commands against the already provisioned SUT(s) with:
          /home/jpartlow/work/src/pl/pe_acceptance_tests/.bundle/gems/ruby/2.3.0/bin/beaker --tests=/s/pe_acceptance_tests/acceptance/tests --helper=/s/pe_acceptance_tests/lib/beaker_helper.rb --pre-suite=/s/pe_acceptance_tests/setup/install.rb,/s/pe_acceptance_tests/setup/upgrade.rb --config=/home/jpartlow/work/src/pl/frankenbuilder/frankenbuild/beaker.yml

          Important ENV variables that may have affected your run:
              GEM_HOME          /home/jpartlow/work/src/pl/pe_acceptance_tests/.bundle/gems/ruby/2.3.0
              GEM_PATH
              RUBYLIB           /home/jpartlow/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.5/lib
              PATH              /home/jpartlow/work/src/pl/pe_acceptance_tests/.bundle/gems/ruby/2.3.0/bin:/home/jpartlow/.rbenv/versions/2.3.0/bin:/home/jpartlow/.rbenv/libexec:/home/jpartlow/.rbenv/plugins/ruby-build/bin:/home/jpartlow/.rbenv/bin:/home/jpartlow/bin:/home/jpartlow/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
              home              /home/jpartlow
          Failed running the test suite.

# Frankenbuilder Settings
# ----------------------------------------
# HYPERVISOR           | vmpooler
# CONFIGURATION        | mono
# BUILD                | 2017.1.0-rc0-163-g787d484
# UPGRADE_FROM         | 2016.4.2
# PLATFORM             | el-7-x86_64
# TEMPLATE             | centos-7-x86_64
# PRE_SUITE_TESTS[@]   | /s/pe_acceptance_tests/setup/install.rb,/s/pe_acceptance_tests/setup/upgrade.rb
# TESTS[@]             | /s/pe_acceptance_tests/acceptance/tests/
# HELPER               | /s/pe_acceptance_tests/lib/beaker_helper.rb
# PRESERVE_HOSTS       | onfail
# ----------------------------------------
# Rerun with: ./frankenbuilder 2017.1 --install --upgrade --upgrade-from 2016.4.2 --smoke --vmpooler

@jpartlow
Copy link
Contributor Author

./frankenbuilder 2017.1 --install --upgrade --upgrade-from 2016.1.2 --smoke --vmpooler

Continues to upgrade properly from pre meep versions...

     - Test Case Summary for suite 'tests' -
       Total Suite Time: 572.74 seconds
      Average Test Time: 13.32 seconds
              Attempted: 43
                 Passed: 40
                 Failed: 0
                Errored: 0
                Skipped: 3
                Pending: 0
                  Total: 43

 ...

Beaker completed successfully, thanks.
# Frankenbuilder Settings
# ----------------------------------------
# HYPERVISOR           | vmpooler
# CONFIGURATION        | mono
# BUILD                | 2017.1.0-rc0-163-g787d484
# UPGRADE_FROM         | 2016.1.2
# PLATFORM             | el-7-x86_64
# TEMPLATE             | centos-7-x86_64
# PRE_SUITE_TESTS[@]   | /home/jpartlow/work/src/other/pe_acceptance_tests/setup/install.rb,/home/jpartlow/work/src/other/pe_acceptance_tests/setup/upgrade.rb
# TESTS[@]             | /home/jpartlow/work/src/other/pe_acceptance_tests/acceptance/tests/
# HELPER               | /home/jpartlow/work/src/other/pe_acceptance_tests/lib/beaker_helper.rb
# PRESERVE_HOSTS       | onfail
# ----------------------------------------
# Rerun with: ./frankenbuilder 2017.1 --install --upgrade --upgrade-from 2016.1.2 --smoke --vmpooler

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/135/

@kevpl kevpl merged commit ace43ac into puppetlabs:master Nov 16, 2016
@jpartlow jpartlow deleted the issue/master/pe-18516-always-set-pe-conf-for-upgrades branch November 16, 2016 23:51
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