hobby-kube / provisioning

Kubernetes cluster provisioning using Terraform.
https://hobby-kube.dev/guide
MIT License
312 stars 112 forks source link

hcloud provider: fix apt lock detection #46

Closed ento closed 5 years ago

ento commented 5 years ago

Context

Provisioning nodes on Hetzner with ubuntu-18.04 consistently failed for me at the remote-exec step that installs apt packages.

The most conspicuous error message said:

Could not get lock /var/lib/apt/lists/lock

And further up in the log:

Specified filename /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock does not exist.

This fix

I couldn't find an alternate, smart way to do the equivalent of brace expansion in dash, so this PR simply spells out all the lock files that the curly braces expand to.

Switched to multiline-string because the line got uncomfortably long after expanding.

pstadler commented 5 years ago

This is working nicely for me on hetzner cloud, unable to reproduce.