Composite Resource DependsOn bug

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
           }
   }
}

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.

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?

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.

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