Welcome Forums DSC (Desired State Configuration) Composite Resource DependsOn bug

Viewing 4 reply threads
  • Author
    Posts
    • #14784
      Participant
      Topics: 3
      Replies: 5
      Points: 0
      Rank: Member

      There is a bug when using a composite resource which doesn’t allow you to specify the DependsOn attribute. I posted this on the MSDN Powershell blog here

      http://blogs.msdn.com/b/powershell/archive/2014/02/25/reusing-existing-configuration-scripts-in-powershell-desired-state-configuration.aspx

      For a workaround if I structure my configuration in different node blocks will they run sequentially instead of parallel?

      For example

      configuration ServerConfigurations 
      {
             Import-DscResource -ModuleName CompositeResources -Name RoleConfiguration,
      
      node $Allnodes.NodeName
         { 
            File TestFolder
              {
                  Ensure          = "Present"
                  Type            = "Directory"
                  DestinationPath = "C:\Test"
              }
         }
      
      node $Allnodes.NodeName
         {    
               RoleConfiguration ServerRoles
                 {
                 Roles = $Node.Role
                 }
         }
      }
      
    • #14785
      Keymaster
      Topics: 13
      Replies: 4872
      Points: 1,896
      Helping HandTeam Member
      Rank: Community Hero

      If it’s a bug, you should log it in Connect.Microsoft.com – that’s where the team looks for bugs, more so than a blog.

      You’d have to test your theory to see if it worked.

    • #14786
      Participant
      Topics: 3
      Replies: 5
      Points: 0
      Rank: Member

      Thanks for the link, i added it as a comment to Steve Murawski’s bug https://connect.microsoft.com/PowerShell/feedback/details/812943/dsc-cannot-set-dependson-to-a-nested-configuration since it seems to be related.

      Would looking at the verbose logging that outputs on the Start-DscConfiguration cmdlet verify what is being done sequentially?

    • #14791
      Keymaster
      Topics: 13
      Replies: 4872
      Points: 1,896
      Helping HandTeam Member
      Rank: Community Hero

      It should. What would be better is to use the DSC Diagnostics module from Microsoft to start a trace, run Start-, and then examine the trace log. That’s much more detailed.

      I think the problem with having multiple node blocks is that each node block produces a MOF, and you can only have one MOF per machine. Aside from DependsOn, there isn’t much control over order-of-execution when DSC is evaluating the MOF. Obviously, the bug makes that not work… but I don’t think there’s a real workaround for that.

    • #77565
      Tex
      Participant
      Topics: 3
      Replies: 18
      Points: 0
      Rank: Member

      Hi,

      I know this is a long time ago now, but I believe I am hitting the same issue. After eventually managing to log in to connect with a “personal” account (really MS!!!), I got an error about it not existing or I don’t have permissions, so I can’t read whether MS fixed it or not.

      Any chance you could post an update?

      Thanks

      Tex

Viewing 4 reply threads
  • The topic ‘Composite Resource DependsOn bug’ is closed to new replies.