solidnerd / terraform-k8s-hcloud

A simple project to spin your k8s cluster with terraform, kubeadm on hcloud
MIT License
89 stars 37 forks source link

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

Closed fogs closed 4 years ago

fogs commented 4 years ago

It looks like there are background processes of apt on a newly installed server that is causing an error during terraform apply:

hcloud_ssh_key.k8s_admin: Creating...
hcloud_ssh_key.k8s_admin: Creation complete after 0s [id=1107844]
hcloud_server.master[0]: Creating...
hcloud_server.master[0]: Still creating... [10s elapsed]
hcloud_server.master[0]: Provisioning with 'file'...
hcloud_server.master[0]: Still creating... [20s elapsed]
hcloud_server.master[0]: Still creating... [30s elapsed]
hcloud_server.master[0]: Provisioning with 'file'...
hcloud_server.master[0]: Provisioning with 'remote-exec'...
hcloud_server.master[0] (remote-exec): Connecting to remote host via SSH...
hcloud_server.master[0] (remote-exec):   Host: 78.47.128.104
hcloud_server.master[0] (remote-exec):   User: root
hcloud_server.master[0] (remote-exec):   Password: false
hcloud_server.master[0] (remote-exec):   Private key: true
hcloud_server.master[0] (remote-exec):   Certificate: false
hcloud_server.master[0] (remote-exec):   SSH Agent: false
hcloud_server.master[0] (remote-exec):   Checking Host Key: false
hcloud_server.master[0] (remote-exec): Connected!
hcloud_server.master[0]: Still creating... [40s elapsed]
hcloud_server.master[0]: Still creating... [50s elapsed]
hcloud_server.master[0]: Still creating... [1m0s elapsed]
hcloud_server.master[0]: Still creating... [1m10s elapsed]
hcloud_server.master[0]: Still creating... [1m20s elapsed]
hcloud_server.master[0] (remote-exec): E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
hcloud_server.master[0] (remote-exec): E: Unable to lock directory /var/lib/apt/lists/

Error: error executing "/tmp/terraform_1748166156.sh": Process exited with status 100
fogs commented 4 years ago

Will be solved with #13

solidnerd commented 4 years ago

This will be included it in 0.3.1 so we can lose this issue for now