-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add debug logs for windows preflight checks and setup #761
Conversation
yourWindowsReleaseId, err := strconv.Atoi(strings.TrimSpace(stdOut)) | ||
|
||
if err != nil { | ||
logging.Debug(err.Error()) | ||
return false, errors.New("Failed to get Windows release id") |
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.
This is exactly the same error returned in this case and before, which could make it harder to figure out which of the 2 functions failed. This one could be changed to "Failed to parse Windows release id: %s", stdOut
|
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.
Looks good to me, was this tested on a fresh windows install?
stdOut, _, err := powershell.Execute(checkIfMemberOfHyperVAdmins) | ||
if err != nil { | ||
logging.Debug(err.Error()) | ||
return false, errors.New("Failed checking if user is part of hyperv admins group") |
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.
Did you check preflight on Windows after these changes? I wonder if we get an error when user is not a member of the admin group, or just regular output from the command?
You did see #777? |
… in PATH if exec.LookPath can't find the location of powershell.exe we fall back to using C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Also add more debug logs to windows preflight checks and setup
retest this please |
We might have to add some minor improvements, as we now assume the
stdLocation exists and has an executable. if this is not the case the error
will follow in the first use instead. this is not a big issue, but could be
nicer. for future when this actually happens in the field
…On Fri, Nov 1, 2019 at 7:33 PM Praveen Kumar ***@***.***> wrote:
Merged #761 <#761> into master.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#761>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAOZQQB2SC4IN5MTE2CXLQRQHXFANCNFSM4JD7VQVA>
.
--
Gerard Braad | http://gbraad.nl
[ Doing Open Source Matters ]
|
Also as suggested added a fall-back location for Powershell, in case it is not it path.
Fixes #753