Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6897

Agents mishandled in pcore_generate and corrective_change tests

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.8.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Systems Engineering
    • Story Points:
      1
    • Sprint:
      SE 2016-11-16
    • Release Notes:
      Not Needed

      Description

      The "pcore_generate_env_isolation.rb" and "corrective_change_via_puppet.rb" tests both fail when run in a CI matrix which includes two agents - e.g., an agent run on the master and an agent run against the master from a separate node. In both cases, the failures appear to be due to the tests changing state in the middle of the test causing a second agent to see an unexpected result.

      This failure was encountered when bumping to the latest Puppet stable commit on the puppetserver CI pipeline: https://jenkins.puppetlabs.com/view/puppetserver/view/all/job/platform_puppetserver_integration-system_no-conditional_full-stable/255/. Some snippets of the failures for each test are below:

      pcore_generate_env_isolation.rb:

      * run agent in environment with type with an extra parameter. try to use this parameter
            
            yet7cniwbcy64sf.delivery.puppetlabs.net (debian8-32-2) 03:11:33$ puppet agent -t --server vjl5yrswgh4uoj9.delivery.puppetlabs.net --environment pcore_generate_env_isolation_to4sbyrx
              Info: Using configured environment 'pcore_generate_env_isolation_to4sbyrx'
              Info: Retrieving pluginfacts
              Info: Retrieving plugin
              Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/type/conflicting.rb]/content: 
              --- /opt/puppetlabs/puppet/cache/lib/puppet/type/conflicting.rb	2016-11-07 03:11:32.664804843 -0800
              +++ /tmp/puppet-file20161107-23935-3e6p0b	2016-11-07 03:11:35.780896287 -0800
              @@ -1,3 +1,4 @@
                   Puppet::Type.newtype(:conflicting) do
                     newparam :name, :namevar => true
              +      newparam :other
                   end
              Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/type/conflicting.rb]/content: content changed '{md5}a0c85d30454a7c39614e8c798da69769' to '{md5}d501df2ec6cba932d67ea737f6880d0b'
              Info: Caching catalog for yet7cniwbcy64sf.delivery.puppetlabs.net
              Info: Applying configuration version '1478517096'
              Notice: pcore_generate_env_isolation_to4sbyrx
              Notice: /Stage[main]/Main/Notify[pcore_generate_env_isolation_to4sbyrx]/message: defined 'message' as 'pcore_generate_env_isolation_to4sbyrx'
              Notice: Applied catalog in 0.04 seconds
            
            yet7cniwbcy64sf.delivery.puppetlabs.net (debian8-32-2) executed in 3.08 seconds
            Exited: 2
            Warning: 
      did not produce environment isolation issue as expected.
      Expected /Error:\ no\ parameter\ named\ 'other'/ to match "\e[0;32mInfo: Using configured environment 'pcore_generate_env_isolation_to4sbyrx'\e[0m\n\e[0;32mInfo: Retrieving pluginfacts\e[0m\n\e[0;32mInfo: Retrieving plugin\e[0m\n\e[mNotice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/type/conflicting.rb]/content: \n--- /opt/puppetlabs/puppet/cache/lib/puppet/type/conflicting.rb\t2016-11-07 03:11:32.664804843 -0800\n+++ /tmp/puppet-file20161107-23935-3e6p0b\t2016-11-07 03:11:35.780896287 -0800\n@@ -1,3 +1,4 @@\n     Puppet::Type.newtype(:conflicting) do\n       newparam :name, :namevar => true\n+      newparam :other\n     end\n\e[0m\n\e[mNotice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/type/conflicting.rb]/content: content changed '{md5}a0c85d30454a7c39614e8c798da69769' to '{md5}d501df2ec6cba932d67ea737f6880d0b'\e[0m\n\e[0;32mInfo: Caching catalog for yet7cniwbcy64sf.delivery.puppetlabs.net\e[0m\n\e[0;32mInfo: Applying configuration version '1478517096'\e[0m\n\e[mNotice: pcore_generate_env_isolation_to4sbyrx\e[0m\n\e[mNotice: /Stage[main]/Main/Notify[pcore_generate_env_isolation_to4sbyrx]/message: defined 'message' as 'pcore_generate_env_isolation_to4sbyrx'\e[0m\n\e[mNotice: Applied catalog in 0.04 seconds\e[0m\n".
      

      corrective_change_via_puppet.rb:

      * Run agent a 2nd time to change the File resource
                  
                  u8wdlpr8mrxu3fq.delivery.puppetlabs.net (sles12-64-2) 03:29:08$ puppet agent -t --environment corrective_change_via_puppet_6y5ldjwa --server ititl6tmmhh7999.delivery.puppetlabs.net
                    Info: Using configured environment 'corrective_change_via_puppet_6y5ldjwa'
                    Info: Retrieving pluginfacts
                    Info: Retrieving plugin
                    Info: Caching catalog for u8wdlpr8mrxu3fq.delivery.puppetlabs.net
                    Info: Applying configuration version '1478518148'
                    Notice: Applied catalog in 0.04 seconds
                  
                  u8wdlpr8mrxu3fq.delivery.puppetlabs.net (sles12-64-2) executed in 2.26 seconds
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) 03:29:10$ puppet master --configprint config
                    /etc/puppetlabs/puppet/puppet.conf
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) executed in 0.77 seconds
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) 03:29:11$ if [ -f '/tmp/corrective_change_via_puppet.rb.JGkHGE/puppet.conf.bak' ]; then cat '/tmp/corrective_change_via_puppet.rb.JGkHGE/puppet.conf.bak' > '/etc/puppetlabs/puppet/puppet.conf'; rm -f '/tmp/corrective_change_via_puppet.rb.JGkHGE/puppet.conf.bak'; fi
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) executed in 0.03 seconds
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) 03:29:11$ puppet resource service puppetserver ensure=stopped
                    Notice: /Service[puppetserver]/ensure: ensure changed 'running' to 'stopped'
                    service { 'puppetserver':
                      ensure => 'stopped',
                    }
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) executed in 1.35 seconds
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) 03:29:12$ puppet resource service puppetserver ensure=running
                    Notice: /Service[puppetserver]/ensure: ensure changed 'stopped' to 'running'
                    service { 'puppetserver':
                      ensure => 'running',
                    }
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) executed in 33.58 seconds
                  
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) 03:29:46$ curl -m 1 https://localhost:8140
                    Trying command 60 times.
                  .            
                  ititl6tmmhh7999.delivery.puppetlabs.net (sles12-64-1) 03:29:46$ curl -m 1 https://localhost:8140 ostensibly successful.
                  RuntimeError: PuppetAcceptance::DSL::Helpers.with_puppet_running_on failed (check backtrace for location) because: Host 'u8wdlpr8mrxu3fq.delivery.puppetlabs.net' exited with 0 running:
                   puppet agent -t --environment corrective_change_via_puppet_6y5ldjwa --server ititl6tmmhh7999.delivery.puppetlabs.net
                  Last 10 lines of output were:
                  	Info: Using configured environment 'corrective_change_via_puppet_6y5ldjwa'
                  	Info: Retrieving pluginfacts
                  	Info: Retrieving plugin
                  	Info: Caching catalog for u8wdlpr8mrxu3fq.delivery.puppetlabs.net
                  	Info: Applying configuration version '1478518148'
                  	Notice: Applied catalog in 0.04 seconds
      

        Attachments

          Activity

            People

            • Assignee:
              jeremy.barlow Jeremy Barlow
              Reporter:
              jeremy.barlow Jeremy Barlow
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support