GSA / datagov-infrastructure-modules

Data.gov infrastructure terraform modules
4 stars 8 forks source link

Python is not installed correctly: E: Package 'python' has no installation candidate #32

Open adborden opened 5 years ago

adborden commented 5 years ago

Our provisioner fails to install python, with apt complaining "E: Package 'python' has no installation candidate". This happens right after an apt-get update, so it is very strange. If you ssh onto the host, and then sudo apt-get update && sudo apt-get install -y python, it installs correctly.

module.web.aws_instance.web: Still creating... (10s elapsed)
module.web.aws_instance.web: Provisioning with 'remote-exec'...
module.web.aws_instance.web (remote-exec): Connecting to remote host via SSH...
module.web.aws_instance.web (remote-exec):   Host: 10.0.1.128
module.web.aws_instance.web (remote-exec):   User: ubuntu
module.web.aws_instance.web (remote-exec):   Password: false
module.web.aws_instance.web (remote-exec):   Private key: false
module.web.aws_instance.web (remote-exec):   SSH Agent: true
module.web.aws_instance.web (remote-exec):   Checking Host Key: false
module.web.aws_instance.web (remote-exec): Using configured bastion host...
module.web.aws_instance.web (remote-exec):   Host: jump.bionic.datagov.us
module.web.aws_instance.web (remote-exec):   User: ubuntu
module.web.aws_instance.web (remote-exec):   Password: false
module.web.aws_instance.web (remote-exec):   Private key: false
module.web.aws_instance.web (remote-exec):   SSH Agent: true
module.web.aws_instance.web (remote-exec):   Checking Host Key: false
module.web.aws_instance.web: Still creating... (20s elapsed)
module.web.aws_instance.web: Still creating... (30s elapsed)
module.web.aws_instance.web (remote-exec): Connected!
module.web.aws_instance.web (remote-exec): 0% [Working]
module.web.aws_instance.web (remote-exec): Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
module.web.aws_instance.web (remote-exec): 0% [Waiting for headers]
module.web.aws_instance.web (remote-exec): 0% [1 InRelease gpgv 242 kB] [Connectin
module.web.aws_instance.web (remote-exec): Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
module.web.aws_instance.web (remote-exec): 0% [1 InRelease gpgv 242 kB] [Connectin
module.web.aws_instance.web (remote-exec): 0% [Waiting for headers] [2 InRelease 1
module.web.aws_instance.web (remote-exec): Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
module.web.aws_instance.web (remote-exec): 0% [3 InRelease 8375 B/88.7 kB 9%] [2 I
module.web.aws_instance.web (remote-exec): 0% [3 InRelease 43.1 kB/88.7 kB 49%]
module.web.aws_instance.web (remote-exec): 0% [2 InRelease gpgv 88.7 kB] [3 InRele
module.web.aws_instance.web (remote-exec): 0% [3 InRelease 75.0 kB/88.7 kB 85%]
module.web.aws_instance.web (remote-exec): 0% [Connecting to security.ubuntu.com (
module.web.aws_instance.web (remote-exec): 0% [3 InRelease gpgv 88.7 kB] [Connecti
module.web.aws_instance.web (remote-exec): 0% [Connecting to archive.ubuntu.com (9
module.web.aws_instance.web (remote-exec): Get:4 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [607 kB]
module.web.aws_instance.web (remote-exec): 0% [Waiting for headers] [4 Packages 14
module.web.aws_instance.web (remote-exec): Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
module.web.aws_instance.web (remote-exec): 0% [5 InRelease 14.2 kB/74.6 kB 19%] [4
module.web.aws_instance.web (remote-exec): 0% [4 Packages 72.2 kB/607 kB 12%]
module.web.aws_instance.web (remote-exec): 0% [5 InRelease gpgv 74.6 kB] [4 Packag
module.web.aws_instance.web (remote-exec): 18% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): Get:6 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB]
module.web.aws_instance.web (remote-exec): 19% [6 Packages 14.2 kB/8570 kB 0%] [4
module.web.aws_instance.web (remote-exec): 20% [6 Packages 43.2 kB/8570 kB 1%]
module.web.aws_instance.web (remote-exec): 20% [4 Packages store 0 B] [6 Packages
module.web.aws_instance.web (remote-exec): 21% [6 Packages 101 kB/8570 kB 1%] [Wai
module.web.aws_instance.web (remote-exec): Get:7 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [202 kB]
module.web.aws_instance.web (remote-exec): 21% [6 Packages 117 kB/8570 kB 1%] [7 T
module.web.aws_instance.web (remote-exec): 29% [6 Packages 1721 kB/8570 kB 20%]
module.web.aws_instance.web (remote-exec): 29% [7 Translation-en store 0 B] [6 Pac
module.web.aws_instance.web (remote-exec): 33% [6 Packages 2393 kB/8570 kB 28%] [C
module.web.aws_instance.web (remote-exec): Get:8 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4904 B]
module.web.aws_instance.web (remote-exec): 44% [6 Packages 4826 kB/8570 kB 56%] [8
module.web.aws_instance.web (remote-exec): 44% [6 Packages 4826 kB/8570 kB 56%]
module.web.aws_instance.web (remote-exec): 44% [8 Packages store 0 B] [6 Packages
module.web.aws_instance.web (remote-exec): 45% [6 Packages 4826 kB/8570 kB 56%] [C
module.web.aws_instance.web (remote-exec): Get:9 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2396 B]
module.web.aws_instance.web: Still creating... (40s elapsed)
module.web.aws_instance.web (remote-exec): 56% [6 Packages 7209 kB/8570 kB 84%] [9
module.web.aws_instance.web (remote-exec): 56% [6 Packages 7209 kB/8570 kB 84%]
module.web.aws_instance.web (remote-exec): 56% [9 Translation-en store 0 B] [6 Pac
module.web.aws_instance.web (remote-exec): 56% [6 Packages 7209 kB/8570 kB 84%]
module.web.aws_instance.web (remote-exec): 62% [Working]
module.web.aws_instance.web (remote-exec): 62% [6 Packages store 0 B] [Connecting
module.web.aws_instance.web (remote-exec): Get:10 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB]
module.web.aws_instance.web (remote-exec): 63% [6 Packages store 0 B] [10 Translat
module.web.aws_instance.web (remote-exec): 65% [6 Packages store 0 B] [10 Translat
module.web.aws_instance.web (remote-exec): 86% [6 Packages store 0 B] [10 Translat
module.web.aws_instance.web (remote-exec): 86% [6 Packages store 0 B] [Connecting
module.web.aws_instance.web (remote-exec): Get:11 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
module.web.aws_instance.web (remote-exec): 86% [6 Packages store 0 B] [11 Packages
module.web.aws_instance.web (remote-exec): 87% [6 Packages store 0 B]
module.web.aws_instance.web (remote-exec): Get:12 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB]
module.web.aws_instance.web (remote-exec): 87% [6 Packages store 0 B] [12 Translat
module.web.aws_instance.web (remote-exec): 87% [12 Translation-en 43.2 kB/108 kB 4
module.web.aws_instance.web (remote-exec): 87% [10 Translation-en store 0 B] [12 T
module.web.aws_instance.web (remote-exec): 87% [10 Translation-en store 0 B]
module.web.aws_instance.web (remote-exec): Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [739 kB]
module.web.aws_instance.web (remote-exec): 87% [10 Translation-en store 0 B] [13 P
module.web.aws_instance.web (remote-exec): 89% [10 Translation-en store 0 B] [13 P
module.web.aws_instance.web (remote-exec): 91% [13 Packages 719 kB/739 kB 97%]
module.web.aws_instance.web (remote-exec): 91% [11 Packages store 0 B] [13 Package
module.web.aws_instance.web (remote-exec): 91% [11 Packages store 0 B] [Connecting
module.web.aws_instance.web (remote-exec): 91% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): 91% [12 Translation-en store 0 B] [Conn
module.web.aws_instance.web (remote-exec): 92% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): 92% [13 Packages store 0 B] [Connecting
module.web.aws_instance.web (remote-exec): Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1006 kB]
module.web.aws_instance.web (remote-exec): 92% [13 Packages store 0 B] [14 Package
module.web.aws_instance.web (remote-exec): 92% [14 Packages 14.3 kB/1006 kB 1%]
module.web.aws_instance.web (remote-exec): 95% [14 Packages 612 kB/1006 kB 61%]
module.web.aws_instance.web (remote-exec): 97% [Working]              2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 97% [14 Packages store 0 B] [Connecting
module.web.aws_instance.web (remote-exec): 97% [Waiting for headers]  2573 kB/s 0s
module.web.aws_instance.web (remote-exec): Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [309 kB]
module.web.aws_instance.web (remote-exec): 97% [15 Translation-en 14.3 kB/309 kB 5
module.web.aws_instance.web (remote-exec): 98% [Working]              2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 98% [15 Translation-en store 0 B] [Conn
module.web.aws_instance.web (remote-exec): 98% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7528 B]
module.web.aws_instance.web (remote-exec): 99% [16 Packages 7528 B/7528 B 100%]
module.web.aws_instance.web (remote-exec): 99% [Working]              2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 99% [16 Packages store 0 B] [Connecting
module.web.aws_instance.web (remote-exec): 99% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [3868 B]
module.web.aws_instance.web (remote-exec): 99% [17 Translation-en 3868 B/3868 B 10
module.web.aws_instance.web (remote-exec): 99% [Working]              2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 99% [17 Translation-en store 0 B] [Conn
module.web.aws_instance.web (remote-exec): 99% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2512 B]
module.web.aws_instance.web (remote-exec): 99% [18 Packages 2512 B/2512 B 100%]
module.web.aws_instance.web (remote-exec): 99% [Working]              2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 99% [18 Packages store 0 B] [Connecting
module.web.aws_instance.web (remote-exec): 99% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): Get:19 http://archive.ubuntu.com/ubuntu bionic-backports/main Translation-en [1644 B]
module.web.aws_instance.web (remote-exec): 99% [19 Translation-en 1644 B/1644 B 10
module.web.aws_instance.web (remote-exec): 99% [Working]              2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 99% [19 Translation-en store 0 B] [Conn
module.web.aws_instance.web (remote-exec): 99% [Connecting to archive.ubuntu.com (
module.web.aws_instance.web (remote-exec): Get:20 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4020 B]
module.web.aws_instance.web (remote-exec): 100% [20 Packages 4020 B/4020 B 100%]
module.web.aws_instance.web (remote-exec): 100% [Working]             2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 100% [20 Packages store 0 B] [Connectin
module.web.aws_instance.web (remote-exec): 100% [Connecting to archive.ubuntu.com
module.web.aws_instance.web (remote-exec): Get:21 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1856 B]
module.web.aws_instance.web (remote-exec): 100% [21 Translation-en 1856 B/1856 B 1
module.web.aws_instance.web (remote-exec): 100% [Working]             2573 kB/s 0s
module.web.aws_instance.web (remote-exec): 100% [21 Translation-en store 0 B]
module.web.aws_instance.web (remote-exec): 100% [Working]             2573 kB/s 0s
module.web.aws_instance.web (remote-exec): Fetched 16.9 MB in 8s (2064 kB/s)
module.web.aws_instance.web (remote-exec): Reading package lists... 0%
module.web.aws_instance.web (remote-exec): Reading package lists... 0%
module.web.aws_instance.web (remote-exec): Reading package lists... 0%
module.web.aws_instance.web (remote-exec): Reading package lists... 46%
module.web.aws_instance.web (remote-exec): Reading package lists... 46%
module.web.aws_instance.web (remote-exec): Reading package lists... 67%
module.web.aws_instance.web (remote-exec): Reading package lists... 71%
module.web.aws_instance.web (remote-exec): Reading package lists... 71%
module.web.aws_instance.web (remote-exec): Reading package lists... 72%
module.web.aws_instance.web (remote-exec): Reading package lists... 72%
module.web.aws_instance.web (remote-exec): Reading package lists... 72%
module.web.aws_instance.web (remote-exec): Reading package lists... 72%
module.web.aws_instance.web (remote-exec): Reading package lists... 77%
module.web.aws_instance.web (remote-exec): Reading package lists... 77%
module.web.aws_instance.web (remote-exec): Reading package lists... 84%
module.web.aws_instance.web (remote-exec): Reading package lists... 84%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 87%
module.web.aws_instance.web (remote-exec): Reading package lists... 90%
module.web.aws_instance.web (remote-exec): Reading package lists... 90%
module.web.aws_instance.web (remote-exec): Reading package lists... 93%
module.web.aws_instance.web (remote-exec): Reading package lists... 93%
module.web.aws_instance.web (remote-exec): Reading package lists... 93%
module.web.aws_instance.web (remote-exec): Reading package lists... 93%
module.web.aws_instance.web (remote-exec): Reading package lists... 93%
module.web.aws_instance.web (remote-exec): Reading package lists... 93%
module.web.aws_instance.web (remote-exec): Reading package lists... 97%
module.web.aws_instance.web (remote-exec): Reading package lists... 97%
module.web.aws_instance.web (remote-exec): Reading package lists... 99%
module.web.aws_instance.web (remote-exec): Reading package lists... 99%
module.web.aws_instance.web (remote-exec): Reading package lists... 99%
module.web.aws_instance.web (remote-exec): Reading package lists... 99%
module.web.aws_instance.web (remote-exec): Reading package lists... 99%
module.web.aws_instance.web (remote-exec): Reading package lists... 99%
module.web.aws_instance.web (remote-exec): Reading package lists... Done
module.web.aws_instance.web (remote-exec): Reading package lists... 0%
module.web.aws_instance.web (remote-exec): Reading package lists... 0%
module.web.aws_instance.web (remote-exec): Reading package lists... 0%
module.web.aws_instance.web (remote-exec): Reading package lists... 26%
module.web.aws_instance.web (remote-exec): Reading package lists... 26%
module.web.aws_instance.web (remote-exec): Reading package lists... 47%
module.web.aws_instance.web (remote-exec): Reading package lists... 47%
module.web.aws_instance.web (remote-exec): Reading package lists... 47%
module.web.aws_instance.web (remote-exec): Reading package lists... 47%
module.web.aws_instance.web (remote-exec): Reading package lists... 47%
module.web.aws_instance.web (remote-exec): Reading package lists... 47%
module.web.aws_instance.web (remote-exec): Reading package lists... 81%
module.web.aws_instance.web (remote-exec): Reading package lists... 81%
module.web.aws_instance.web (remote-exec): Reading package lists... 96%
module.web.aws_instance.web (remote-exec): Reading package lists... 96%
module.web.aws_instance.web (remote-exec): Reading package lists... 96%
module.web.aws_instance.web (remote-exec): Reading package lists... 96%
module.web.aws_instance.web (remote-exec): Reading package lists... 96%
module.web.aws_instance.web (remote-exec): Reading package lists... 96%
module.web.aws_instance.web (remote-exec): Reading package lists... Done
module.web.aws_instance.web (remote-exec): Building dependency tree... 0%
module.web.aws_instance.web (remote-exec): Building dependency tree... 0%
module.web.aws_instance.web (remote-exec): Building dependency tree... 50%
module.web.aws_instance.web (remote-exec): Building dependency tree... 50%
module.web.aws_instance.web (remote-exec): Building dependency tree
module.web.aws_instance.web (remote-exec): Reading state information... 0%
module.web.aws_instance.web (remote-exec): Reading state information... 0%
module.web.aws_instance.web (remote-exec): Reading state information... Done
module.web.aws_instance.web (remote-exec): Package python is not available, but is referred to by another package.
module.web.aws_instance.web (remote-exec): This may mean that the package is missing, has been obsoleted, or
module.web.aws_instance.web (remote-exec): is only available from another source

module.web.aws_instance.web (remote-exec): E: Package 'python' has no installation candidate
module.web.aws_instance.web: Still creating... (50s elapsed)
Releasing state lock. This may take a few moments...

Error: Error applying plan:

1 error occurred:
        * module.web.aws_instance.web: error executing "/tmp/terraform_877938795.sh": Process exited with status 100
adborden commented 5 years ago

Specifying python2.7 seems to work more consistently :man_shrugging:

adborden commented 4 years ago

Specifying apt-get update twice seems to work around the issue.