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

IIS : resources require second run when iis feature is installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iis
    • Labels:
    • Environment:

      puppetlabs-iis 4.0.0

    • Template:
      MODULES Bug Template
    • Acceptance Criteria:
      Hide

      Given a fresh windows install
      When the below Puppet manifest is run it installs and configures IIS
      Then IIS is installed and configured in the same (first) Puppet run without a second run

      $iis_features = ['Web-Server','Web-Scripting-Tools']
      iis_feature { $iis_features:
        ensure => present,
      } ->
       
      iis_site { 'test_website':
        ensure           => 'present',
        applicationpool  => 'DefaultAppPool',
        physicalpath     => 'C:\inetpub\wwwroot\test_website',
      }
      

      If this code works, IIS will be installed and a IIS website will have been created. This can be verified by running

      Get-WebSite
      

      This should show the 'test_website' in the list of websites.

      Show
      Given a fresh windows install When the below Puppet manifest is run it installs and configures IIS Then IIS is installed and configured in the same (first) Puppet run without a second run $iis_features = ['Web-Server','Web-Scripting-Tools'] iis_feature { $iis_features: ensure => present, } ->   iis_site { 'test_website': ensure => 'present', applicationpool => 'DefaultAppPool', physicalpath => 'C:\inetpub\wwwroot\test_website', } If this code works, IIS will be installed and a IIS website will have been created. This can be verified by running Get-WebSite This should show the 'test_website' in the list of websites.
    • Epic Link:
    • Team:
      Windows
    • Sprint:
      Windows Kanban
    • Method Found:
      Customer Feedback
    • CS Priority:
      Major
    • CS Frequency:
      3 - 25-50% of Customers
    • CS Severity:
      2 - Annoyance
    • CS Business Value:
      5 - $$$$$$
    • CS Impact:
      IIS is one of the main uses for windows customers and while this is more of an annoyance it would be a satisfier to fix it and get the configuration done in a single pass rather than requiring two runs.
    • QA Risk Assessment:
      Manual

      Description

      The iis_* providers confine themselves using a fact (iis_version). After IIS is installed via iis_resource that fact is out-of-date when other iis_* providers are called to manage their resources, resulting in 'could not find a suitable provider' errors. These errors are resolved when the fact is updated during the next run.

      Example, on a Windows system without IIS installed:

      node 'pe-201722-agent-win2012' {
       
        $iis_features = ['Web-Server','Web-Scripting-Tools']
        iis_feature { $iis_features:
          ensure => present,
        } ->
       
        iis_site { 'test_website':
          ensure           => 'present',
          applicationpool  => 'DefaultAppPool',
          physicalpath     => 'C:\inetpub\wwwroot\test_website',
          require          => File['test_website_directory'],
        }
       
        file { 'test_website_directory':
          ensure  => directory,
          path   => 'C:\inetpub\wwwroot\test_website',
        }
       
      }
      

      C:\Users\Administrator>puppet agent -t 
      Info: Using configured environment 'production' 
      Info: Retrieving pluginfacts 
      Info: Retrieving plugin 
      Info: Loading facts 
      Info: Caching catalog for pe-201722-agent-win2012 
      Info: Applying configuration version '1502466556' 
      Notice: /Stage[main]/Main/Node[pe-201722-agent-win2012]/Iis_feature[Web-Server]/ensure: created 
      Notice: /Stage[main]/Main/Node[pe-201722-agent-win2012]/Iis_feature[Web-WebServer]/ensure: created 
      Notice: /Stage[main]/Main/Node[pe-201722-agent-win2012]/File[test_website]/ensure: created 
      Info: Node[pe-201722-agent-win2012]: Unscheduling all events on Node[pe-201722-agent-win2012] 
      Error: Could not find a suitable provider for iis_site 
      Notice: Applied catalog in 64.21 seconds 
       
      C:\Users\Administrator>puppet agent -t 
      Info: Using configured environment 'production' 
      Info: Retrieving pluginfacts 
      Info: Retrieving plugin 
      Info: Loading facts 
      Info: Caching catalog for pe-201722-agent-win2012 
      Info: Applying configuration version '1502466661' 
      Notice: /Stage[main]/Main/Node[pe-201722-agent-win2012]/Iis_site[test_website]/ensure: defined 'ensure' as 'present' 
      Notice: Applied catalog in 11.68 seconds 
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tom.kishel Thomas Kishel
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support