[SAC] [OSGeo] #2858: Fix ability to setup old containers like centos 7 on Ubuntu 22.04 hosts

#2858: Fix ability to setup old containers like centos 7 on Ubuntu 22.04 hosts
---------------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Keywords:
---------------------------+---------------------------------------
I was trying to create a container for centos-7 for ci testing on osgeo8,
but sadly after upgrading to Ubuntu 22.04 from 20.04 on osgeo8 and osgeo9,
I am unable to create a container such as

{{{
lxc launch images:centos/7 centtie
}}}

Just yields error: Error: The image used by this instance requires a
CGroupV1 host system

discussed here - https://discuss.linuxcontainers.org/t/2nd-system-
upgraded-from-ubuntu-20-04-w-working-lxd-to-ubuntu-22-04-lxd-again-not-
working/14009/27

Doing this works fine on osgeo7 since it's still a Ubuntu 20.04. so I'm
going to hold of upgrading osgeo7 and osgeo3 until this issue is resolved,
as I'm afraid many of our old debian containers probably relying on
cgroupv1 may not start after.

It's unclear at moment if it is a Ubuntu issue or a lxd issue.
Other reports state there is no issue with servers that started off as
Ubuntu 22.04. It's only an issue with upgraded servers thus suggesting an
Ubuntu upgrade issue.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2858&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2858: Fix ability to setup old containers like centos 7 on Ubuntu 22.04 hosts
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+----------------------------------------
Comment (by robe):

Asked on that discussion https://discuss.linuxcontainers.org/t/2nd-system-
upgraded-from-ubuntu-20-04-w-working-lxd-to-ubuntu-22-04-lxd-again-not-
working/14009/30 and was told this, which did the trick on osgeo4.

{{{
Edit /etc/default/grub and ensure that GRUB_CMDLINE_LINUX contains
systemd.unified_cgroup_hierarchy=false:

E.g.

GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=false"

Then run:

sudo update-grub

}}}

After rebooting I was able to do:

{{{
lxc launch images:centos/7 centtie
}}}

I'll do the same on the other upgraded servers later tonight since it
requires a server reboot.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2858#comment:1&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2858: Fix ability to setup old containers like centos 7 on Ubuntu 22.04 hosts
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+----------------------------------------
Comment (by robe):

I'm going to start run on osgeo8 and osgeo9. I don't expect there to be
more than 5 minutes of downtime.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2858#comment:2&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2858: Fix ability to setup old containers like centos 7 on Ubuntu 22.04 hosts
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution: fixed
Keywords: |
---------------------------+----------------------------------------
Changes (by robe):

* status: new => closed
* resolution: => fixed

Comment:

Done also did patch updates on osgeo8 and osgeo9
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2858#comment:3&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2858: Fix ability to setup old containers like centos 7 on Ubuntu 22.04 hosts
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution: fixed
Keywords: |
---------------------------+----------------------------------------
Comment (by robe):

Side note: grasswiki on osgeo8 the apache2 service did not start. I'm
guessing it's the proxy setting and that it had started before nginx
container and so not seeing the proxy, it failed to restart. Manually
restarting the apache on it did the trick.

Others seemed to have been okay.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2858#comment:4&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.