cleanup: remove rocky-only upgrade code

This code was put in to handle upgrade and transitions from Queens
to Rocky and it is no longer necessary in Stein.

Change-Id: Iffc453ccb8af5d66e556da8427eb4fec1c2133ca
This commit is contained in:
Mohammed Naser 2018-11-27 10:33:27 -05:00
parent b15b97fa0a
commit 952353bc72
6 changed files with 0 additions and 99 deletions

View File

@ -52,17 +52,6 @@
notify:
- Lxc container restart
### REMOVE IN "S"
# NOTE(cloudnull): These tasks are cleaning up the old interfaces
# files. Remove this in the "S" release.
- name: Remove legacy network config for eth0
lineinfile:
dest: "/var/lib/lxc/{{ inventory_hostname }}/config"
regexp: "^lxc.network.*"
backup: "true"
state: "absent"
delegate_to: "{{ physical_host }}"
- name: Create and start the container
lxc_container:
name: "{{ inventory_hostname }}"

View File

@ -42,29 +42,3 @@
notify:
- Enable dbus
- Enable resolved
### REMOVE IN "S"
# NOTE(cloudnull): These tasks are cleaning up the old interfaces
# files. Remove this in the "S" release.
- name: Remove old route network interface(s)
file:
path: "{{ lxc_container_default_route_interfaces }}"
state: absent
with_dict: "{{ lxc_container_networks_combined }}"
when:
- lxc_container_default_route_interfaces is defined
- name: Remove old network interface(s)
file:
path: "{{ lxc_container_interface_target }}"
state: absent
with_dict: "{{ lxc_container_networks_combined }}"
when:
- lxc_container_interface_target is defined
- name: Remove old default network interface
file:
path: "{{ lxc_container_default_interface }}"
state: absent
when:
- lxc_container_default_interface is defined

View File

@ -34,14 +34,3 @@ lxc_container_default_config_list:
- "lxc.pts=1024"
- "lxc.kmsg=0"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"
### REMOVE IN "S"
# The networkd commands are executed within the container but using the host
# network namespace. Remove this once systemd-networkd is part of the base
# image.
_lxc_container_extra_commands: |
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
echo "install systemd-networkd systemd-resolved" >> /tmp/package-transaction.txt
echo "run" >> /tmp/package-transaction.txt
$RHT_PKG_MGR -y shell /tmp/package-transaction.txt
systemctl enable systemd-networkd

View File

@ -41,26 +41,3 @@ lxc_container_default_config_list:
- "lxc.pts=1024"
- "lxc.kmsg=0"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"
### REMOVE IN "S"
# The machine-id is not removed in the base container. Remove the machine-id
# command when the base container no longer has a stored id.
# The wicked* need to be disabled. Once this is taken care of in the base image
# this set of commands can be removed.
_lxc_container_extra_commands: |
if [[ ! -f /etc/machine-id.generated ]]; then
rm /etc/machine-id || true
rm /var/lib/dbus/machine-id || true
/usr/bin/systemd-machine-id-setup
cp /etc/machine-id /var/lib/dbus/machine-id
touch /etc/machine-id.generated
fi
for action in disable mask; do
systemctl ${action} wicked.service || true
systemctl ${action} wickedd.service || true
systemctl ${action} wickedd-auto4.service || true
systemctl ${action} wickedd-dhcp4.service || true
systemctl ${action} wickedd-dhcp6.service || true
systemctl ${action} wickedd-nanny.service || true
done
systemctl enable systemd-networkd

View File

@ -34,17 +34,3 @@ lxc_container_default_config_list:
- "lxc.pts=1024"
- "lxc.kmsg=0"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"
### REMOVE IN "S"
# DBUS is not guarenteeded to be part of the base image. This installs the
# requirement. Once DBUS is a built in dependency remove this.
# systemd-resolved is not setup in the base image, once we can ensure that all
# deployments have this service setup the systemd-resolved lines can be removed.
_lxc_container_extra_commands: |
apt-get update
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes dbus
for action in disable mask; do
systemctl ${action} resolvconf.service || true
systemctl ${action} systemd-networkd-resolvconf-update.path || true
systemctl ${action} systemd-networkd-resolvconf-update.service || true
done

View File

@ -31,17 +31,3 @@ lxc_container_default_config_list:
- "lxc.autodev=1"
- "lxc.pty.max=1024"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"
### REMOVE IN "S"
# DBUS is not guarenteeded to be part of the base image. This installs the
# requirement. Once DBUS is a built in dependency remove this.
# systemd-resolved is not setup in the base image, once we can ensure that all
# deployments have this service setup the systemd-resolved lines can be removed.
_lxc_container_extra_commands: |
apt-get update
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes dbus
for action in disable mask; do
systemctl ${action} resolvconf.service || true
systemctl ${action} systemd-networkd-resolvconf-update.path || true
systemctl ${action} systemd-networkd-resolvconf-update.service || true
done