diff options
| author | Jeremy Wood <36464809+JeremyWx@users.noreply.github.com> | 2019-10-14 11:09:12 -0400 |
|---|---|---|
| committer | Jeremy Wood <36464809+JeremyWx@users.noreply.github.com> | 2019-10-14 11:22:20 -0400 |
| commit | 8ee01f9f491343a7d8b9b9030ff0752e2b01b196 (patch) | |
| tree | b8952f583a92aee407d79cc287242b6a95188485 | |
| parent | 547148210d97ab20df7f92cc8c9d68591b4c56bf (diff) | |
Adding Troubleshooting section
Update CONTRIBUTING.md
| -rw-r--r-- | sig-windows/CONTRIBUTING.md | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/sig-windows/CONTRIBUTING.md b/sig-windows/CONTRIBUTING.md index bd1c4dd2..f1df7eb7 100644 --- a/sig-windows/CONTRIBUTING.md +++ b/sig-windows/CONTRIBUTING.md @@ -10,7 +10,8 @@ Contains a list of common resources when contributing in the effort to support W - [Updating the Node binaries](#updating-the-node-binaries) - [Creating a PR](#creating-a-pr) - [API Considerations](#api-considerations) -- [Running Tests](#running-tests) +- [Running Tests](#running-tests) +- [Troubleshooting](#troubleshooting) - [Reporting Issues and Feature Requests](#reporting-issues-and-feature-requests) - [Gathering Logs](#gathering-logs) - [Collecting Networking Logs](#collecting-networking-logs) @@ -84,6 +85,34 @@ If you modifying an API in the SIG-Windows codebase, make sure you are aware of For the most up-to-date steps on how to build and run tests, please go to [https://github.com/kubernetes-sigs/windows-testing](https://github.com/kubernetes-sigs/windows-testing). It has everything you need to build and run tests, as well as links to the SIG-Windows configurations used on [TestGrid](https://testgrid.k8s.io/sig-windows). +## Troubleshooting + +### Intro + +If you are having issues with network dependent services coming up with your Windows based container there is a workaround that may help. + +We can use the [Container Lifecycle Hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) to help ensure the service starts after the network is available. Specifically we will be using the [PostStart](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) hook. + +### Examples + +The first example will execute after the pod is up and in this particular case will restart the `dbconnect` service until `dbhost.example.com` can be resolved via DNS. This command could also be modified to require said host to be reachable before exiting. + +``` + lifecycle: + postStart: + exec: + command: ["powershell.exe","-command","do { Restart-Service -Name dbconnect; $Result = @(ping -n 1 dbhost.example.com) } while ( $Result -notcontains 'Approximate round trip times in milli-seconds:' )"] +``` + +This second example is used in pods where gmsa is being used. This will restart the `netlogon` service until we can affirm that the pod has logged on to the domain correctly. + +``` + lifecycle: + postStart: + exec: + command: ["powershell.exe","-command","do { Restart-Service -Name netlogon } while ( $($Result = (nltest.exe /query); if ($Result -like '*0x0 NERR_Success*') {return $true} else {return $false}) -eq $false)"] +``` + ## Reporting Issues and Feature Requests If you have what looks like a bug, or you would like to make a feature request, please use the [Github issue tracking system](https://github.com/kubernetes/kubernetes/issues). You can open issues on [GitHub](https://github.com/kubernetes/kubernetes/issues/new/choose) and assign them to SIG-Windows. You should first search the list of issues in case it was reported previously and comment with your experience on the issue and add additional logs. SIG-Windows Slack is also a great avenue to get some initial support and troubleshooting ideas prior to creating a ticket. |
