none
DSC Partial configurations failing when trying to update servers at the same time. RRS feed

  • Question

  • Hi All,

    I have tried to configure the partial configurations for the set of servers.

    The nodes are configured as following:

    ConfigurationRepositoryWeb XXX-DSC-REPOS {
    ServerURL = "https://$servername/PSDSCPullServer.svc"
    CertificateID = $CertificateID
    AllowUnsecureConnection = $False
    RegistrationKey = $RegistrationKey
    ConfigurationNames = @("xMyconfigMasterHost", "xMyconfig", "xMyconfig_SIT", $ComputerName)

    "xMyconfigMasterHost", "xMyconfig", "xMyconfig_SIT" – are the partial configuration names that are merged for the node and contain environment wide settings.
     $ComputerName – Computer specific configuration. Variable is populated from the script input.



    PartialConfiguration xMyconfigMasterHost
            {
                Description                     = 'Configuration for the xMyconfigMasterHost'
                ConfigurationSource             = '[ConfigurationRepositoryWeb]XXX-DSC-REPOS'
                RefreshMode                     = 'Pull'
            }
    PartialConfiguration xMyconfig
            {
                Description                     = 'Configuration for the xMyconfig'
                ConfigurationSource             = '[ConfigurationRepositoryWeb]XXX-DSC-REPOS'
                DependsOn                       = '[PartialConfiguration]xMyconfigMasterHost'
                RefreshMode                     = 'Pull'
            }
               PartialConfiguration xMyconfig_SIT
            {
                Description                     = 'Configuration for the xMyconfig_SIT'
                ConfigurationSource             = '[ConfigurationRepositoryWeb]XXX-DSC-REPOS'
                DependsOn                       = '[PartialConfiguration]xMyconfig'
                RefreshMode                     = 'Pull'
            }
      PartialConfiguration $ComputerName
            {
                Description                     = "Configuration for the  $ComputerName"
                ConfigurationSource             = '[ConfigurationRepositoryWeb]XXX-DSC-REPOS'
                DependsOn                       = '[PartialConfiguration]xMyconfig_SIT'
                RefreshMode                     = 'Pull'
            }

    So all the servers have 2 partials configurations that they share and one specific, that is representing the configuration specific for the server.

    I have 2 problems with this config:

    1. If the configurations have been pulled to the node and I would like to change  one of the configuration names,  the merge will fail as it will try to include the old partial configuration that will now being replaced, as it still exist on the node. The error will say that I do have a duplicate resource.

    2. If  I will try to run "Start-DscConfiguration -UseExisting -ComputerName "Server-01","Server-02" -Verbose -Force -Wait" on multiple nodes - it will fail for all except one. 

    The error for the failed nodes would be:

    The attempt to get the action from server
    http://dsc-001///PSDSCPullServer.svc/Nodes(AgentId='C07CBBB90')/GetDscAction failed
    because pullserver is not available or there is no  registered node with AgentId C07CBBB90
    on the server.
        + CategoryInfo          : ResourceUnavailable: (root/Microsoft/...gurationManager:String) [], CimException
        + FullyQualifiedErrorId : WebDownloadManagerGetActionNodeConfigurationNotFound,Microsoft.PowerShell.DesiredStateCo
       nfiguration.Commands.GetDscActionCommand
        + PSComputerName        : Server-01

    If try to run any amount of nodes in different PowerShell sessions with only one node per command - it will work fine for all nodes.

    Any advice?


    • Edited by mr.vladis Sunday, August 14, 2016 7:19 PM
    Sunday, August 14, 2016 7:19 PM

All replies

  • A workaround for the issue of only being able to update one at a time is to use OLEDB DB provider instead of ESENT. In the web.config of your pull server change:

    <add key="dbprovider" value="ESENT" /> <add key="dbconnectionstr" value="$env:PROGRAMFILES\WindowsPowerShell\DscService\Devices.mdb" />

    to:

    <add key="dbprovider" value="System.Data.OleDb" />
    <add key="dbconnectionstr" value = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$env:PROGRAMFILES\WindowsPowerShell\DscService\Devices.mdb" />

    There is also a good chance using the latest WMF 5.1 preview will resolve that issue as well.

    Wednesday, August 17, 2016 7:56 PM
  • Hi Jeff,

    >>A workaround for the issue of only being able to update one ...

    Good to hear that you have solved this issue by yourself. In addition, thanks for sharing your solution in the forum as it would be helpful to anyone who encounters similar issues.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best regards,

    Andy_Pan


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft..com.

    Thursday, August 18, 2016 9:04 AM
    Moderator
  • A workaround for the issue of only being able to update one at a time is to use OLEDB DB provider instead of ESENT. In the web.config of your pull server change:

    <add key="dbprovider" value="ESENT" /> <add key="dbconnectionstr" value="$env:PROGRAMFILES\WindowsPowerShell\DscService\Devices.mdb" />

    to:

    <add key="dbprovider" value="System.Data.OleDb" />
    <add key="dbconnectionstr" value = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$env:PROGRAMFILES\WindowsPowerShell\DscService\Devices.mdb" />

    There is also a good chance using the latest WMF 5.1 preview will resolve that issue as well.

    When I have updated the connection string as suggested, this result in the error 500 on the PULL server wwhen trying to register the node.

    Is there anything additional I need to do to make this working?

    Thanks.

    Friday, August 19, 2016 4:03 PM
  • A workaround for the issue of only being able to update one at a time is to use OLEDB DB provider instead of ESENT. In the web.config of your pull server change:

    <add key="dbprovider" value="ESENT" /> <add key="dbconnectionstr" value="$env:PROGRAMFILES\WindowsPowerShell\DscService\Devices.mdb" />

    to:

    <add key="dbprovider" value="System.Data.OleDb" />
    <add key="dbconnectionstr" value = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$env:PROGRAMFILES\WindowsPowerShell\DscService\Devices.mdb" />

    There is also a good chance using the latest WMF 5.1 preview will resolve that issue as well.

    When I have updated the connection string as suggested, this result in the error 500 on the PULL server wwhen trying to register the node.

    Is there anything additional I need to do to make this working?

    Thanks.

    Ok, It is also needed to copy Devices.mdb itself from the 

    $pshome/modules/psdesiredstateconfiguration/pullserver

    to 

    $env:PROGRAMFILES\WindowsPowerShell\DscService\ 

    and ";" is missing

    <add key="dbconnectionstr" value = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$env:PROGRAMFILES\WindowsPowerShell\DscService\Devices.mdb;" />

    Anyway, thanks a lot for the workaround itself. I will need to do more testing, but it might help at least with this.

    Thanks.

    Friday, August 19, 2016 4:43 PM
  • Thank you for sharing the solution to this issue, I learn more from your reply, and I believe partners who may visit this thread in the future will benefit from your sharing.

    Best regards,

    Andy_Pan


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft..com.

    Monday, August 22, 2016 7:55 AM
    Moderator