Commit Graph

10 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 611fb2bf4c Deprecate OpenStack-Ansible nspawn repositories
Since nspawn support has been removed with [1] we now
start repositories deprecation process.

[1] https://review.opendev.org/c/openstack/openstack-ansible/+/782569

Depends-On: https://review.opendev.org/c/openstack/project-config/+/797723
Change-Id: I113f0f2b5befc4bca830c130d7f60e621c86798e
2021-06-23 17:22:41 +00:00
Jesse Pretorius f3fe949711 Simplify inserting apt keys into nspawn image
Bionic requires a functioning gpg-agent to run apt-key add. This means
that gpg-agent must be working properly in the chroot when the nspawn
image preparation script runs.

Previous changes [1] have enabled apt-key to communicate with gpg-agent
during the nspawn_hosts role checks, however the cache prep fails almost
every time when nspawn_hosts is used within other role checks.

This is not a new issue, debian-installer is affected too [2].

This change adopts the same route as d-i, and simply copies the host
/etc/apt/trusted.gpg.d directory to the nspawn image, removing the
need for apt-key and in turn gpg-agent.

This is a re-implementation of https://review.openstack.org/588962
for nspawn.

[1] https://review.openstack.org/590431
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851774

Change-Id: I3c56da445377d7ba27a623fb7ebe95c20d28a327
2018-08-25 21:12:51 +01:00
Kevin Carter cb466cd385
Update nspawn role correcting several issues
The tempfiles template was being setup on the host, this causes host
machines to have an issue with journald on reboot due to the directory
being part of systemd-tmpfiles.

Nspawn container journals were not being written to the host. This was
fixed by changing try-guest to try-host, which will fall back to the
guest in the event that host journalling is not possible.

Systemd-nspawn containers were not starting on boot due to them needing
to wait for networking to be online. The base template has been updated
to ensure networking is online before starting containers.

Change-Id: I6af3923bd10091172e75cfb16c9146cd47f827a4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-03 23:56:07 -05:00
Kevin Carter cfb3f9e7cd
Set container create tasks to non-voting/fix pkg
There are some inter-dependencies here where the container tasks will
not pass until a few updates are in both here and elsewhere. This change
sets the container create tasks to non-voting until all of the required
updates get in.

Remove the aria2 requirement

While aria2 has some nice features, the get_url command can do most of
what we need and does so in a far more universal way. This change
removes the aria2 dependency and updates the aria2 tasks to use the
get_url module.

Change-Id: Iab422c718d789ef13b8ec55938fdb7e73e40061b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-06-21 00:56:33 -05:00
Kevin Carter 4552c56f2b Add a single variable for combined networks
The combined networks variable will allow deployers to set basic
container networks, default nspawn networks, and any "extra" networks a
deployer may need outside of a standard build.

Change-Id: I5346fdf81967d6eb7f69e61a187166c076ca4b60
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-06-01 22:08:55 +00:00
Kevin Carter d520e80462
Make host copying more selective
The host copy process was taking too much, this makes that process more
selective.

Change-Id: Ic25559d9b68b6208ffdbed020cc79bd6b3d52fdd
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-18 19:16:03 -05:00
Kevin Carter 50d7cc82c5
Update nspawn hosts
Use the common roles throught this role to remove all of the boilerplate
code we had. The common modules do most of the heavy lifing.

Update to fix the resolve.conf issue with the image cache prep.

Add legacy image support and use smaller upstream images by default.

Now that suse supports systemd-networkd we can enable suse support in
nspawn.

Change-Id: I5f6ceb928f5c0902adf2e34f96a5998840400777
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-13 14:28:16 -05:00
Kevin Carter 2758cbfc6a
add network ops
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-02-16 21:25:39 -06:00
Kevin Carter edf8e1238c
Enable less noisy journaling
Enable persistent journals and link the container journal to the host by
default.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-02-13 17:07:48 -06:00
Kevin Carter e97c013f67
First commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-02-08 11:39:40 -06:00