dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Add OperationTimeout configuration for CIM

Open ACALVETT opened this issue 5 years ago • 7 comments

Summary of new feature

  • If the default CIM timeout on a server is set to indefinite when get-dbaCmObject queries a server that is hung or has a corrupted WMI then get-dbaCmObject never completes. To overcome the problem "OperationTimeoutSec" could be introduced as a dbaToolsConfig setting in the computer management section and then applied to CIM connection to prevent the hang.

Proposed technical details (if applicable)

How to avoid wmi query hangs in Powershell

Thread where i discussed issue in slack

Latest version of dbatools as of writing

  • 1.0.107

ACALVETT avatar Apr 27 '20 16:04 ACALVETT

🚧🚨 This issue is being marked as stale due to 90 days of inactivity. If you would like this issue to remain open:

  • Verify the issue/bug is reproduced in the latest version of the module
  • Verify the environmental info provided is still accurate
  • Add any additional steps you followed to reproduce if necessary 🚨🚧 ⌛️ This issue will be closed in 30 days ⌛️

github-actions[bot] avatar Aug 02 '20 06:08 github-actions[bot]

@ClaudioESSilva Can you please have a look at this and suggest a name for the config parameter? @FriedrichWeinmann / @wsmelton / @jpomfret : I'm not a CIM or WMI expert, so please review this if you are. And have a look at the linked issue that was closed by the stale bot - Do we have an issue with having WMI as fallback of CIM?

andreasjordan avatar May 25 '21 08:05 andreasjordan

Hi @potatoqualitee - can you have a look? Thanks.

andreasjordan avatar Jul 30 '21 17:07 andreasjordan

Sounds good. Should we add a sane default?

potatoqualitee avatar Jul 31 '21 05:07 potatoqualitee

I would take 60 seconds as the default.

andreasjordan avatar Jul 31 '21 08:07 andreasjordan

Does anyone know how to implement this?

andreasjordan avatar Aug 12 '21 07:08 andreasjordan

As I don't have an environment to test this and not enough knowlegde to implement it, I will step back and de-assign myself.

andreasjordan avatar Dec 22 '21 07:12 andreasjordan