-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Give error instead of crashing if WSMan client lib not available #4387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1636,7 +1636,10 @@ All WinRM sessions connected to Windows PowerShell session configurations, such | |
<data name="InvalidRoleCapabilityFileExtension" xml:space="preserve"> | ||
<value>The provided role capability file {0} does not have the required .psrc extension.</value> | ||
</data> | ||
<data name="SSHAbruptlyTerminated" > | ||
<data name="SSHAbruptlyTerminated" xml:space="preserve"> | ||
<value>The SSH transport process has abruptly terminated causing this remote session to break.</value> | ||
</data> | ||
<data name="WSManClientDllNotAvailable" xml:space="preserve"> | ||
<value>WSMan client library is not installed</value> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo - skipped a point at end. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. It sounds like this only affects Nano. So maybe something like "WSMan client library is not installed. This parameter set requires WSMan for PowerShell remoting commands such as Invoke-Command, New-PSSession, Enter-PSSession." The problem is that SSH remoting may be available if SSH client is installed. But I don't know if that is a likely scenario. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @joeyaiello to review error message This currently only affects Nano, but it's not something easily fixed on Nano. Basically user need to start with a different Nano image that includes WinRM. I don't think we want to put too much detail in the message as it could create more confusion particularly as @PaulHigin pointed out PSRP/SSH could still work if they have ssh.exe (which is probably more likely in the future once OpenSSH port is further along)cc @joeyaiello to review error message This currently only affects Nano, but it's not something easily fixed on Nano. Basically user need to start with a different Nano image that includes WinRM. I don't think we want to put too much detail in the message as it could create more confusion particularly as @PaulHigin pointed out PSRP/SSH could still work if they have ssh.exe (which is probably more likely in the future once OpenSSH port is further along) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. Yes I agree that the error message is fine as is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about "This parameter set requires WSMan, and no WSMan client library is available. WSMan is either not installed or unavailable for this platform. It might also be possible to use SSH-based remoting instead." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @joeyaiello I'm fine with everything except the last sentence as SSH may or may not be installed. I don't think we need to go to that much detail at this point. Ideally, we should just tell the user |
||
</data> | ||
</root> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StringUtil.Format(..)
is unnecessary as no arguments is required for the error message.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix. lazy cut and paste :)