Bootstrap fails with enable-os-refresh-update/upgrade = false
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Medium
|
Unassigned |
Bug Description
tl;dr: Juju bootstrap to LXD will fail when enable-
# Summary
I recently tried to bootstrap a controller with enable-
I tested Xenial and Bionic, but not Trusty.
# Xenial
With Xenial, the bootstrap seemed to be taking longer than normal on the "Running machine configuration script..." step. I inspected /var/log/
Log:
Ign:2 http://
Err:1 http://
404 Not Found [IP: 91.189.92.201 80]
Err:2 http://
404 Not Found [IP: 91.189.92.201 80]
E: Failed to fetch http://
E: Failed to fetch http://
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I manually ran `apt-get update`, resolving the problem. The bootstrap then completed.
The LXD image used was current:
$ lxc image list
+------
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE |
+------
| juju/bionic/amd64 | 0b969c724698 | no | ubuntu 18.04 LTS amd64 (release) (20190307) | x86_64 | 177.72MB | Mar 8, 2019 at 4:22pm (UTC) |
+------
| juju/xenial/amd64 | f43e709ea5b9 | no | ubuntu 16.04 LTS amd64 (release) (20190212) | x86_64 | 158.27MB | Mar 8, 2019 at 7:10pm (UTC) |
+------
| | 35f6bff57c25 | no | ubuntu 18.04 LTS amd64 (release) (20190212.1) | x86_64 | 177.63MB | Mar 5, 2019 at 6:38pm (UTC) |
+------
# Bionic
When bootstrapping a Bionic controller, I hit a different error:
$ juju bootstrap lxd osm --config enable-
[...]
Fetching Juju agent version 2.5.1 for amd64
Attempt 1 to download agent binaries from https:/
agent binaries from https:/
21b3e45522657aa
f98f377d076dda6
Installing Juju machine agent
2019-03-08 16:24:33 INFO juju.cmd supercommand.go:57 running jujud [2.5.1 gc go1.11.5]
2019-03-08 16:24:34 INFO juju.agent identity.go:22 writing system identity file
2019-03-08 16:24:34 ERROR juju.mongo mongo.go:567 could not set the value of "/proc/
2019-03-08 16:24:34 ERROR juju.mongo mongo.go:567 could not set the value of "/proc/
2019-03-08 16:24:34 ERROR juju.mongo mongo.go:567 could not set the value of "/sys/kernel/
2019-03-08 16:24:34 ERROR juju.mongo mongo.go:567 could not set the value of "/sys/kernel/
2019-03-08 16:24:34 ERROR juju.mongo mongo.go:567 could not set the value of "/proc/
2019-03-08 16:24:34 ERROR juju.mongo mongo.go:567 could not set the value of "/proc/
2019-03-08 16:24:34 INFO juju.mongo mongo.go:439 Ensuring mongo server is running; data directory /var/lib/juju; port 37017
2019-03-08 16:24:34 INFO juju.mongo mongo.go:640 installing [mongodb-
2019-03-08 16:24:34 INFO juju.packaging.
2019-03-08 16:24:34 ERROR juju.packaging.
b-server-core"; output: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package mongodb-server-core
2019-03-08 16:24:34 ERROR juju.mongo mongo.go:463 cannot install/upgrade mongod (will proceed anyway): packaging command failed: encountered fatal error: unable to locate package
ERROR failed to start mongo: could not find a viable 'mongod' not found
ERROR failed to bootstrap model: subprocess encountered error code 1
# Conclusion
Bootstrapping a Juju controller to LXD, targeting either Xenial or Bionic, will not work with os update and upgrade disabled, as the LXD image package cache may be stale (or missing Universe, in the case of Bionic), even with a freshly downloaded image.
As a workaround, and perhaps better practice, we can bootstrap without those parameters and then use `juju model-defaults` to change those flags for subsequent models.
The initial approach, however, used to work and probably still should.
Isn't that a case of needing better default images if you want to bootstrap os-update= false" ? We have that flag so that if you *know*
with "enable-
that your Apt cache information is up to date, you can ask us to skip that
step. If that isn't the case, then you shouldn't be setting the flag to
false.
On Sat, Mar 9, 2019 at 12:35 AM Adam Israel <email address hidden>
wrote:
> Public bug reported: os-refresh- update and os-refresh- update cloud-init- output. log on the controller and noticed it was stuck security. ubuntu. com/ubuntu xenial- security/ main amd64 4-0ubuntu0. 16.04.4 security. ubuntu. com/ubuntu xenial- security/ main amd64 4-0ubuntu0. 16.04.4 security. ubuntu. com/ubuntu xenial- security/ main amd64 4-0ubuntu0. 16.04.4 security. ubuntu. com/ubuntu/ pool/main/ n/nss/libnss3- nssdb_3. 28.4-0ubuntu0. 16.04.4_ all.deb security. ubuntu. com/ubuntu/ pool/main/ n/nss/libnss3_ 3.28.4- 0ubuntu0. 16.04.4_ amd64.deb ------- ------+ ------- ------- +------ --+---- ------- ------- ------- ------- ------- ------- -+----- ---+--- ------- +------ ------- ------- ------- --+ ------- ------+ ------- ------- +------ --+---- ------- ------- ------- ------- ------- ------- -+----- ---+--- ------- +------ ------- ------- ------- --+ ------- ------+ ------- ------- +------ --+---- ------- ------- ------- ------- ------- ------- -+----- ---+--- ------- +------ ------- ------- ------- --+ ------- ------+ ------- ------- +------ --+---- ------- ------- ------- ------- ------- ------- -+----- ---+--- ------- +------ ------- ------- ------- --+
>
> tl;dr: Juju bootstrap to LXD will fail when enable-
> enable-os-upgrade are false.
>
> # Summary
>
> I recently tried to bootstrap a controller with enable-
> and enable-os-upgrade set to false, which led to the discovery of a few
> issues involving these flags.
>
> I tested Xenial and Bionic, but not Trusty.
>
>
> # Xenial
> With Xenial, the bootstrap seemed to be taking longer than normal on the
> "Running machine configuration script..." step. I inspected
> /var/log/
> in a loop, trying to install packages that were not found in the repository.
>
> Log:
> Ign:2 http://
> libnss3 amd64 2:3.28.
> Err:1 http://
> libnss3-nssdb all 2:3.28.
> 404 Not Found [IP: 91.189.92.201 80]
> Err:2 http://
> libnss3 amd64 2:3.28.
> 404 Not Found [IP: 91.189.92.201 80]
> E: Failed to fetch
> http://
> 404 Not Found [IP: 91.189.92.201 80]
>
> E: Failed to fetch
>
> http://
> 404 Not Found [IP: 91.189.92.201 80]
>
> E: Unable to fetch some archives, maybe run apt-get update or try with
> --fix-missing?
>
> I manually ran `apt-get update`, resolving the problem. The bootstrap
> then completed.
>
> The LXD image used was current:
>
> $ lxc image list
>
> +------
> | ALIAS | FINGERPRINT | PUBLIC |
> DESCRIPTION | ARCH | SIZE | UPLOAD DATE
> |
>
> +------
> | juju/bionic/amd64 | 0b969c724698 | no | ubuntu 18.04 LTS amd64
> (release) (20190307) | x86_64 | 177.72MB | Mar 8, 2019 at 4:22pm (UTC) |
>
> +------
> | juju/xenial/amd64 | f43e709ea5b9 | no | ubuntu 16.04 LTS amd64
> (release) (20190212) | x86_64 | 158.27MB | Mar 8, 2019 at 7:10pm (UTC) |
>
> +------
> | | 35f6bff57c25 | no | ubuntu 18.04 LTS amd64
> (release) (20190212.1) | x86_64 | 177.63MB | Mar 5, 201...