Skip to content

Conversation

@mszostok
Copy link
Collaborator

@mszostok mszostok commented Nov 17, 2021

Description

As a part of #492 I discovered that the capact env create k3d doesn't work.

  • It worked properly with the v4 — at the time when capact env create k3d was introduced, it was also the latest release.
  • It worked on my machine, as I had the old version of the k3d-proxy:latest and it was using it instead of pulling a new one.

The problematic part, was that the k3d go lib in version v4 was creating a docker container from the k3d-proxy:latest image instead of k3d-proxy:v4.4.8. The latest tag was selected as the github.com/rancher/k3d/v4/version.Version was not set.

In the k3d-proxy:latest image they change the way how the config is loaded, from the env to file backend (since v5 version, which is the latest one right now). This resulted in error:

Node 'k3d-k3d-ci-capact-serverlb' is restarting for more than a minute now. Possibly it will recover soon (e.g. when it's waiting to join). Consider using a creation timeout to avoid waiting forever in a Restart Loop. [started 22:04 UTC]

and from serverlb container logs:

C[2021-11-17T11:29:12+0000] creating initial nginx config (try 1/3)
T2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: INFO Backend set to file
O2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: INFO Starting confd
p2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: INFO Backend source(s) set to /etc/confd/values.yaml
t2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Loading template resources from confdir /etc/confd
n2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Found template: /etc/confd/conf.d/nginx.toml
}2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Loading template resource from /etc/confd/conf.d/nginx.toml
\2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Retrieving keys from store
U2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Key prefix set to /
x2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: ERROR stat /etc/confd/values.yaml: no such file or directory
x2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: FATAL stat /etc/confd/values.yaml: no such file or directory

Changes proposed in this pull request:

  • Add fixed k3d version used for docker images
  • Set the trace for logrus when -v=trace is used

Related issue(s)

@mszostok mszostok added bug Something isn't working dependencies Pull requests that update a dependency file area/cli Relates to CLI labels Nov 17, 2021
Copy link
Collaborator

@pkosiec pkosiec left a comment

Choose a reason for hiding this comment

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

I could reproduce the issue on latest main branch and I can confirm the issue is resolved with this fix 👍

@mszostok mszostok merged commit 300f67e into capactio:main Nov 17, 2021
@mszostok mszostok deleted the fix-k3d-img-versions branch November 17, 2021 16:27
thisisommore pushed a commit to thisisommore/capact that referenced this pull request Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Relates to CLI bug Something isn't working dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot create k3d cluster via capact env create k3d

2 participants