diff --git a/PrivateCloud.DiagnosticInfo/PrivateCloud.DiagnosticInfo.psm1 b/PrivateCloud.DiagnosticInfo/PrivateCloud.DiagnosticInfo.psm1 index 82b4eed..b88fa60 100644 --- a/PrivateCloud.DiagnosticInfo/PrivateCloud.DiagnosticInfo.psm1 +++ b/PrivateCloud.DiagnosticInfo/PrivateCloud.DiagnosticInfo.psm1 @@ -2013,22 +2013,6 @@ function Get-SddcDiagnosticInfo } catch { Show-Warning("Unable to get Cluster Quorum. `nError="+$_.Exception.Message) } } - - $JobStatic += start-job -Name CauDebugTrace { - try { - - # SCDT returns a fileinfo object for the saved ZIP on the pipeline; discard (allow errors/warnings to flow as normal) - $parameters = (Get-Command Save-CauDebugTrace).Parameters.Keys - if ($parameters -contains "FeatureUpdateLogs") { - $null = Save-CauDebugTrace -Cluster $using:AccessNode -FeatureUpdateLogs All -FilePath $using:Path - } - else { - $null = Save-CauDebugTrace -Cluster $using:AccessNode -FilePath $using:Path - } - } - catch { Show-Warning("Unable to get CAU debug trace. `nError="+$_.Exception.Message) } - } - } else { Show-Update "... Skip gather of cluster configuration since cluster is not available" } @@ -2287,7 +2271,7 @@ function Get-SddcDiagnosticInfo } # Events, cmd, reports, et.al. - Show-Update "Start gather of system info, cluster/netft/health logs, reports and dump files ..." + Show-Update "Start gather of system info, cluster/netft/health/CAU logs, reports and dump files ..." $JobStatic += Start-Job -Name ClusterLogs { $null = Get-ClusterLog -Node $using:ClusterNodes.Name -Destination $using:Path -UseLocalTime @@ -2296,12 +2280,20 @@ function Get-SddcDiagnosticInfo { $null = Get-ClusterLog -Node $using:ClusterNodes.Name -Destination $using:Path -UseLocalTime -Netft } - } - - if ($S2DEnabled) { - $JobStatic += Start-Job -Name ClusterHealthLogs { + if ($using:S2DEnabled) { $null = Get-ClusterLog -Node $using:ClusterNodes.Name -Destination $using:Path -Health -UseLocalTime } + + try { + # SCDT returns a fileinfo object for the saved ZIP on the pipeline; discard (allow errors/warnings to flow as normal) + if ((Get-Command Save-CauDebugTrace).Parameters.ContainsKey("FeatureUpdateLogs")) { + $null = Save-CauDebugTrace -Cluster $using:AccessNode -FeatureUpdateLogs All -FilePath $using:Path + } + else { + $null = Save-CauDebugTrace -Cluster $using:AccessNode -FilePath $using:Path + } + } + catch { Show-Warning("Unable to get CAU debug trace. `nError="+$_.Exception.Message) } } $JobStatic += $ClusterNodes.Name |% { @@ -6378,4 +6370,4 @@ Export-ModuleMember -Alias * -Function 'Get-SddcDiagnosticInfo', 'Show-StorageCounters', 'Get-SpacesTimeline', 'Set-SddcDiagnosticArchiveJobParameters', - 'Get-SddcDiagnosticArchiveJobParameters' \ No newline at end of file + 'Get-SddcDiagnosticArchiveJobParameters'