forked from coreos/tectonic-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/smoke/aws: document manual execution, verification and troubles…
…hooting Partially fixes coreos#1038 (AWS only)
- Loading branch information
Sergiusz Urbaniak
committed
Jun 14, 2017
1 parent
2592040
commit 68feb5d
Showing
10 changed files
with
194 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Troubleshooting worker nodes using SSH | ||
|
||
Tectonic worker nodes are not assigned a public IP address, only the controller node. To debug a worker node, SSH to it through a controller (bastion host) or use a VPN connected to the internal network. | ||
|
||
To do so, perform the following: | ||
|
||
## Set up SSH agent forwarding | ||
|
||
Once a passphrase of the local ssh key is added to `ssh-agent`, you will not be prompted for the credentials the next time connecting to nodes via SSH or SCP. The following instructions outline adding a passphrase to the `ssh-agent` on the system. | ||
|
||
1. At the terminal, enter: | ||
|
||
`$ eval ssh-agent` | ||
|
||
2. Run the following: | ||
|
||
`$ ssh-add` | ||
|
||
The `ssh-add` command prompts for a private key passphrase and adds it to the list maintained by `ssh-agent`. | ||
|
||
3. Enter your private key passphrase. | ||
|
||
4. Before logging out, run the following: | ||
|
||
`$ kill $SSH_AGENT_PID` | ||
|
||
To automatically run this command when logging out, place it in the `.logout` file if you are using csh or tcsh. Place the command in the `.bash_logout` file if you are using bash. | ||
|
||
## Connect to a master node | ||
|
||
SSH to a master node with its `EXTERNAL-IP`, providing the `-A` flag to forward the local `ssh-agent`. Add the `-i` option giving the location of the ssh key known to Tectonic: | ||
|
||
```bash | ||
$ ssh -A core@10.0.23.37 -i /path/to/tectonic/cluster/ssh/key | ||
``` | ||
|
||
## Get the IP address of the etcd nodes | ||
|
||
Run the following command on the master instance: | ||
|
||
```sh | ||
core@ip-10-0-23-37 ~ $ grep etcd /opt/tectonic/manifests/kube-apiserver.yaml | ||
- --etcd-servers=http://10.0.23.31:2379 | ||
``` | ||
|
||
## Connect to an etcd node | ||
|
||
```sh | ||
# From the master node | ||
$ ssh core@10.0.23.31 | ||
``` | ||
|
||
To inspect the `etcd-member` service logs, execute: | ||
```sh | ||
$ systemctl status etcd-member && journalctl etcd-member | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Troubleshooting master nodes using SSH | ||
|
||
Tectonic worker nodes are usually assigned to a public IP address. To debug a master node, SSH to it or use a VPN connected to the internal network. | ||
|
||
View logs on the worker node by using `journalctl -xe` or similar tools. [Reading the system log][journalctl] has more information. | ||
|
||
If the cluster is deployed on AWS, to check if the `init-assets` service started successfully, execute: | ||
```sh | ||
$ systemctl status init-assets && journalctl -u init-assets | ||
$ ls /opt/tectonic | ||
``` | ||
|
||
To examine if the kubelet log, execute: | ||
```sh | ||
$ systemctl status kubelet && journalctl -u kubelet | ||
``` | ||
|
||
To examine the status and logs of the bootstrap and target control plane containers, execute: | ||
```sh | ||
$ docker ps -a | grep -v pause | grep apiserver | ||
65faeddd2b78 quay.io/coreos/hyperkube@sha256:297f45919160ea076831cd067833ad3b64c789fcb3491016822e6f867d16dcd5 "/usr/bin/flock /var/" 13 minutes ago Up 13 minutes k8s_kube-apiserver_kube-apiserver-90pzs_kube-system_2983ff1c-510e-11e7-bc88-063d653969e3_0 | ||
$ docker logs 65faeddd2b78 | ||
``` | ||
|
||
The `bootkube` service is responsible for bootstrapping the temporary control plane and to bootstrap a vanilla Kubernetes control plane. | ||
To examine the `bootkube` logs, execute: | ||
```sh | ||
$ journalctl -u bootkube | ||
... | ||
Jun 14 14:31:39 ip-10-0-23-37 bash[1313]: [ 219.261765] bootkube[5]: Pod Status: pod-checkpointer Pending | ||
Jun 14 14:31:39 ip-10-0-23-37 bash[1313]: [ 219.262217] bootkube[5]: Pod Status: kube-apiserver Running | ||
Jun 14 14:31:39 ip-10-0-23-37 bash[1313]: [ 219.262518] bootkube[5]: Pod Status: kube-scheduler Pending | ||
Jun 14 14:31:39 ip-10-0-23-37 bash[1313]: [ 219.262746] bootkube[5]: Pod Status: kube-controller-manager Pending | ||
... | ||
Jun 14 14:32:44 ip-10-0-23-37 bash[1313]: [ 284.264617] bootkube[5]: Pod Status: kube-controller-manager Running | ||
Jun 14 14:32:49 ip-10-0-23-37 bash[1313]: [ 289.263245] bootkube[5]: Pod Status: pod-checkpointer Running | ||
Jun 14 14:32:49 ip-10-0-23-37 bash[1313]: [ 289.263932] bootkube[5]: Pod Status: kube-apiserver Running | ||
Jun 14 14:32:49 ip-10-0-23-37 bash[1313]: [ 289.264715] bootkube[5]: Pod Status: kube-controller-manager Running | ||
... | ||
Jun 14 14:34:29 ip-10-0-23-37 bash[1313]: [ 389.299380] bootkube[5]: Tearing down temporary bootstrap control plane... | ||
Jun 14 14:34:29 ip-10-0-23-37 systemd[1]: Started Bootstrap a Kubernetes cluster. | ||
``` | ||
|
||
The `tectonic` service is responsible for installing the actual Tectonic assets on the bootstrapped vanilla cluster. | ||
To examine the `tectonic` installation logs, execute: | ||
```sh | ||
$ journalctl -fu tectonic | ||
Jun 14 14:36:22 ip-10-0-23-37 bash[4763]: [ 502.655337] hyperkube[5]: Pods not available yet, waiting for 5 seconds (10) | ||
Jun 14 14:36:27 ip-10-0-23-37 bash[4763]: [ 507.955606] hyperkube[5]: Tectonic installation is done | ||
Jun 14 14:36:28 ip-10-0-23-37 systemd[1]: Started Bootstrap a Tectonic cluster. | ||
``` | ||
|
||
[journalctl]: https://github.com/coreos/docs/blob/master/os/reading-the-system-log.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters