Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Print bootkube journal if it fails#1166

Merged
invidian merged 1 commit intomasterfrom
invidian/print-bootkube-errors
Nov 9, 2020
Merged

Print bootkube journal if it fails#1166
invidian merged 1 commit intomasterfrom
invidian/print-bootkube-errors

Conversation

@invidian
Copy link
Member

@invidian invidian commented Nov 5, 2020

In previous attempt in e852117, I
missed the fact that Terraform remote-exec only prints stderr to the
user and stdout is ignored. This means, if we redirect journalctl output
to stderr, then it should be printed which will improve debugging
experience.

Refs #440

Signed-off-by: Mateusz Gozdek mateusz@kinvolk.io

@invidian invidian force-pushed the invidian/print-bootkube-errors branch 2 times, most recently from 03e17ee to 28c15e3 Compare November 6, 2020 22:36
@invidian
Copy link
Member Author

invidian commented Nov 6, 2020

Cool, it seems this is working 🎉

module.aws-ci1604702277-hz.null_resource.bootkube-start: Creating...
module.aws-ci1604702277-hz.null_resource.bootkube-start: Provisioning with 'file'...
module.aws-ci1604702277-hz.null_resource.bootkube-start: Provisioning with 'remote-exec'...
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Connecting to remote host via SSH...
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec):   Host: 18.184.225.254
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec):   User: core
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec):   Password: false
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec):   Private key: false
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec):   Certificate: false
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec):   SSH Agent: true
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec):   Checking Host Key: false
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Connected!
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Job for bootkube.service failed because the control process exited with error code.
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): See "systemctl status bootkube.service" and "journalctl -xe" for details.
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): -- Logs begin at Fri 2020-11-06 22:39:49 UTC, end at Fri 2020-11-06 22:42:24 UTC. --
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Nov 06 22:42:22 ip-10-0-1-23 systemd[1]: Starting Bootstrap a Kubernetes cluster...
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Nov 06 22:42:23 ip-10-0-1-23 bootkube-start[3304]: v1.19.3: Pulling from poseidon/kubelet
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Nov 06 22:42:23 ip-10-0-1-23 bootkube-start[3304]: Digest: sha256:159718ffe057b1ccc092a1ae841c7bb96dd48daf9400d45219d7b484a71604fb
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Nov 06 22:42:23 ip-10-0-1-23 bootkube-start[3304]: Status: Image is up to date for quay.io/poseidon/kubelet:v1.19.3
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Nov 06 22:42:23 ip-10-0-1-23 bootkube-start[3304]: quay.io/poseidon/kubelet:v1.19.3
module.aws-ci1604702277-hz.null_resource.bootkube-start (remote-exec): Nov 06 22:42:23 ip-10-0-1-23 bootkube-start[3303]: Unable to find image 'quay.io/kinvolk/bootkube:v0.14.0-helm2-amd6' locally

https://yard.lokomotive-k8s.net/builds/42171

@invidian invidian force-pushed the invidian/print-bootkube-errors branch from 28c15e3 to 1c2d78e Compare November 6, 2020 23:09
@invidian invidian requested review from ipochi and surajssd November 6, 2020 23:09
In previous attempt in e852117, I
missed the fact that Terraform remote-exec only prints stderr to the
user and stdout is ignored. This means, if we redirect journalctl output
to stderr, then it should be printed which will improve debugging
experience.

Refs #440

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
@invidian invidian force-pushed the invidian/print-bootkube-errors branch from 1c2d78e to 1a0d08c Compare November 6, 2020 23:18
Copy link
Contributor

@iaguis iaguis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@invidian invidian merged commit 2c758ea into master Nov 9, 2020
@invidian invidian deleted the invidian/print-bootkube-errors branch November 9, 2020 10:28
@invidian invidian mentioned this pull request Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants