Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-4484

Bindings don't serialise properly on Server 2008

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iis
    • Labels:
      None
    • Template:
    • Team:
      Modules
    • QA Risk Assessment:
      Needs Assessment

      Description

      While removing the use of Get-Website -name for Server 2008 it was found that the the code for creating/applying bindings is not working as expected.

      15:23:36 Handing 'lkpi1zvm2k7i270.delivery.puppetlabs.net' back to vmpooler for VM destruction
      15:23:36 Spent 0.04 seconds cleaning up
      15:23:36 
      15:23:36 Failures:
      15:23:36 
      15:23:36   1) iis_site when configuring a website with all parameters specified using W3C log format, logflags and logtruncatesize behaves like an idempotent resource should run a second time without changes
      15:23:36      Failure/Error: apply_manifest(@manifest, :catch_changes => true)
      15:23:36      Beaker::Host::CommandFailure:
      15:23:36        Host 'fsoltfntz2yiwgm.delivery.puppetlabs.net' exited with 2 running:
      15:23:36         cmd.exe /c puppet apply --verbose --detailed-exitcodes C:/cygwin64/tmp/apply_manifest.pp.ro0PEt
      15:23:36        Last 10 lines of output were:
      15:23:36        	Info: Loading facts
      15:23:36        	Notice: Compiled catalog for fsoltfntz2yiwgm.delivery.puppetlabs.net in environment production in 0.27 seconds
      15:23:36        	Info: Applying configuration version '1488496571'
      15:23:36        	Notice: /Stage[main]/Main/Iis_site[5d2f989286bd4aafe5aa]/bindings: bindings changed {'Property' => {'bindinginformation' => '*:8084:domain.test', 'certificatehash' => '', 'certificatestorename' => '', 'protocol' => 'http', 'sslflags' => '0'}} to '{"bindinginformation"=>"*:8080:", "certificatehash"=>"", "certificatestorename"=>"", "protocol"=>"http", "sslflags"=>0} {"bindinginformation"=>"*:8084:domain.test", "certificatehash"=>"", "certificatestorename"=>"", "protocol"=>"http", "sslflags"=>0}'
      15:23:36        	Notice: Applied catalog in 12.87 seconds
      15:23:36        
      15:23:36      Shared Example Group: "an idempotent resource" called from ./spec/acceptance/iis_site_spec.rb:84
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/host.rb:373:in `exec'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/dsl/helpers/host_helpers.rb:83:in `block in on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/shared/host_manager.rb:127:in `run_block_on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/dsl/patterns.rb:37:in `block_on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/dsl/helpers/host_helpers.rb:63:in `on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/dsl/helpers/puppet_helpers.rb:504:in `block in apply_manifest_on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/shared/host_manager.rb:127:in `run_block_on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/dsl/patterns.rb:37:in `block_on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/dsl/helpers/puppet_helpers.rb:433:in `apply_manifest_on'
      15:23:36      # ./.bundle/gems/gems/beaker-3.9.0/lib/beaker/dsl/helpers/puppet_helpers.rb:511:in `apply_manifest'
      15:23:36      # ./spec/support/examples/idempotent_resource.rb:7:in `block (2 levels) in <top (required)>'
      15:23:36 
      15:23:36   2) iis_site when configuring a website can changed previously set value bindings behaves like an idempotent resource should run a second time without changes
      15:23:36      Failure/Error: apply_manifest(@manifest, :catch_changes => true)
      15:23:36      Beaker::Host::CommandFailure:
      15:23:36        Host 'fsoltfntz2yiwgm.delivery.puppetlabs.net' exited with 2 running:
      15:23:36         cmd.exe /c puppet apply --verbose --detailed-exitcodes C:/cygwin64/tmp/apply_manifest.pp.Azn0E6
      15:23:36        Last 10 lines of output were:
      15:23:36        	Info: Loading facts
      15:23:36        	Notice: Compiled catalog for fsoltfntz2yiwgm.delivery.puppetlabs.net in environment production in 0.25 seconds
      15:23:36        	Info: Applying configuration version '1488496878'
      15:23:36        	Notice: /Stage[main]/Main/Iis_site[9040a974c333a3f18729]/bindings: bindings changed {'Property' => {'bindinginformation' => '*:8081:', 'certificatehash' => '', 'certificatestorename' => '', 'protocol' => 'http', 'sslflags' => '0'}} to '{"bindinginformation"=>"*:8081:", "certificatehash"=>"", "certificatestorename"=>"", "protocol"=>"http", "sslflags"=>0}'
      15:23:36        	Notice: Applied catalog in 6.36 seconds
      

      Repro:
      Server 2008R2

      Apply the following manifest:

                  iis_site { '#{@site_name}':
                    ensure               => 'started',
                    applicationpool      => 'DefaultAppPool',
                    enabledprotocols     => 'https',
                    bindings             => [
                      {
                        'bindinginformation'   => '*:8080:',
                        'certificatehash'      => '',
                        'certificatestorename' => '',
                        'protocol'             => 'http',
                        'sslflags'             => 0,
                      },
                      {
                        'bindinginformation'   => '*:8084:domain.test',
                        'certificatehash'      => '',
                        'certificatestorename' => '',
                        'protocol'             => 'http',
                        'sslflags'             => 0,
                      },
                    # {
                    #   'bindinginformation'   => '10.32.126.39:443:domain.test',
                    #   'certificatehash'      => '3598FAE5ADDB8BA32A061C5579829B359409856F',
                    #   'certificatestorename' => 'MY',
                    #   'protocol'             => 'https',
                    #   'sslflags'             => 1,
                    # },
                    ],
                    logflags             => ['ClientIP', 'Date', 'Time', 'UserName'],
                    logformat            => 'W3C',
                    loglocaltimerollover => false,
                    logpath              => 'C:\\inetpub\\logs\\NewLogFiles',
                    logtruncatesize      => 2000000,
                    physicalpath         => 'C:\\inetpub\\new',
                  }
      

      The site will be created correctly however:

      Running `puppet resource iis_site` shows:

      PS C:\Users\Administrator> puppet resource iis_site
      iis_site { 'bd4350517215c1c02e0a':
        ensure               => 'started',
        applicationpool      => 'DefaultAppPool',
        bindings             => {'Property' => {'bindinginformation' => '*:8084:domain.test', 'certificatehash' => '', 'certif
      icatestorename' => '', 'protocol' => 'http', 'sslflags' => '0'}},
        enabledprotocols     => 'https',
        logflags             => ['ClientIP', 'Date', 'Time', 'UserName'],
        logformat            => 'W3C',
        loglocaltimerollover => 'false',
        logpath              => 'C:\inetpub\logs\NewLogFiles',
        logperiod            => 'MaxSize',
        logtruncatesize      => '2000000',
        physicalpath         => 'C:\inetpub\new',
      }
      

      Note that the bindings is now a hashtable called Property

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              glenn.sarti Glenn Sarti
              Reporter:
              glenn.sarti Glenn Sarti
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support