ARM template broken due to breaking change in ServiceFabricNodeBootstrapAgent

We had some problems earlier today with Service Fabric ARM templates that just seemed to have stopped working. We use these templates to spin up on-demand test environments.

The problem appears to have originated in a breaking change in the ServiceFabricNodeBootstrapAgent. Our ARM script to setup a Service Fabric cluster used to work fine with agent version However, if we do a new deployment now, we get version of the agent which logs the following error in the event log:

Failed starting service, Error: System.ArgumentNullException: Value cannot be null.

I looked at the code using DotPeek and found a breaking change concerning the behaviour around the dataRoot setting (which can be used to customize the location of the SvcFab directory).

In version of the ServiceFabricNodeBootstrapAgent, the code checks whether the dataRoot field is not null:

if (!string.IsNullOrWhiteSpace(dataRoot))
    Trace.TraceInformation("Using user-specified data root: {0}", (object) dataRoot);
    parameters.Add("FabricDataRoot", (object) dataRoot);
    parameters.Add("FabricLogRoot", (object) Path.Combine(dataRoot, "Log"));

However, in version, this check is gone:

num = this.ConfigureNode(str1, str2, Path.GetFullPath(dataRoot), Path.GetFullPath(Path.Combine(dataRoot, "Log")));

In this version, dataRoot is directly passed to the Path.GetFullPath method which then throws an ArgumentNullException if the dataRoot field is not set.

So where should this dataRoot value come from? It is loaded from the current.config file that’s in the same directory as the bootstrapper service. The current.config file will only contain the value however if it has been explicitly set in the ARM template (dataPath setting of the ServiceFabricNodeBootstrapAgent):

"virtualMachineProfile": {
  "extensionProfile": {
    "extensions": [{
      "properties": {
        "settings": {
            "dataPath": "D:\\\\SvcFab",

So if your Service Fabric ARM deployments are suddenly not working anymore, check if you’ve specified the dataPath setting.

I’ve opened an issue for this at