dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.45k stars 797 forks source link

Reproducible issues with Get-DbaCmObject #4096

Closed potatoqualitee closed 5 years ago

potatoqualitee commented 6 years ago

can repro in our lab

$computer = "sqlb"
$credential = $null
Get-DbaCmObject -ComputerName $computer -Credential $Credential -Namespace root\MSCluster -ClassName MSCluster_Disk

works! fab. let me examine another class.

Get-DbaCmObject -ComputerName $computer -Credential $Credential -Namespace root\MSCluster -ClassName MSCluster_ValidationStatus
WARNING: [12:11:07][Get-DbaCmObject] [sqlb] Unable to find a connection to the target system. Ensure the name is typed correctly, and the server allows any of the following
 protocols: CimRM, CimDCOM | Exception calling "GetConnectionType" with "2" argument(s): "No connectiontypes left to try."

broken, okay nbd, wait, what did MSCluster_Disk say again?

Get-DbaCmObject -ComputerName $computer -Credential $Credential -Namespace root\MSCluster -ClassName MSCluster_Disk
WARNING: [12:11:10][Get-DbaCmObject] [sqlb] Unable to find a connection to the target system. Ensure the name is typed correctly, and the server allows any of the following
 protocols: CimRM, CimDCOM | Exception calling "GetConnectionType" with "2" argument(s): "No connectiontypes left to try."

But that just worked? Maybe the server went offline?

Close PS, Open PS

image

Our caching is too aggressive I guess? I did the above twice with reproducible issues.

potatoqualitee commented 6 years ago

image

forgot the last pic

FriedrichWeinmann commented 6 years ago

Thanks for the update and sorry for the delay, will look into it this evening when I return from work. Looks like there is indeed still some need for improvement 👍 (sorry about the inconvenience)

potatoqualitee commented 6 years ago

Thanks so very much, and I totally understand. I know you're super busy and appreciate the time you'll take fixing it.

I'm also curious if we can make the error message more informative. For instance, in our lab, kerberos is super broken on sqlcluster. Cim will give me an informative message, but our cm commands do not:

image

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you would like this issue to remain open:

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had activity in the last three months. If this issue is still valid, please add a comment