(backward compatibility) create kolla UIDs/GIDs for TCIB
When upgrading container images from Kolla-based to TCIB-based, the
config files can't be read if we don't apply the new chown values unless
we re-use the same UIDs/GIDs as we had with Kolla; which is what we'll
do for now until we figure out an easy way to update config permissions
during the upgrade/update stage.
This introduces a new script, that will be injected in the base layer:
uid_gid_manage.sh
Usage:
./uid_gid_manage.sh qemu nova
It'll first create the qemu user/group, then nova user/group.
The format aims to be simple:
<username> <uid> <gid> <optional homedir> <optional list of extra groups>
It's also removing instances of usermod which aren't needed anymore;
since we create the user / groups only in the images where they are
needed; which wasn't the case for Kolla where all users/groups were
created in the base image.
Note: we create the user/group before installing packaging so if
packaging creates directories and sets permissions, it'll be with the
right UID/GID (unless packaging overrides UID/GID but rarely do it).
Related-Bug: #1890798
Change-Id: If3fa2ff34af42a7438c6dbf81dbcb0bddd63afa6
(cherry picked from commit fb0ec2ffd0a99d441c361bb83472e48ead18d013)
Reviewed: https:/ /review. opendev. org/746533 /git.openstack. org/cgit/ openstack/ tripleo- common/ commit/ ?id=70b1ca4b1ce e3813ee49cd71d8 e16b9337ad11fd
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit 70b1ca4b1cee381 3ee49cd71d8e16b 9337ad11fd
Author: Emilien Macchi <email address hidden>
Date: Mon Aug 10 14:12:53 2020 -0400
(backward compatibility) create kolla UIDs/GIDs for TCIB
When upgrading container images from Kolla-based to TCIB-based, the
config files can't be read if we don't apply the new chown values unless
we re-use the same UIDs/GIDs as we had with Kolla; which is what we'll
do for now until we figure out an easy way to update config permissions
during the upgrade/update stage.
This introduces a new script, that will be injected in the base layer:
uid_ gid_manage. sh
Usage:
./uid_ gid_manage. sh qemu nova
It'll first create the qemu user/group, then nova user/group.
The format aims to be simple:
<username> <uid> <gid> <optional homedir> <optional list of extra groups>
It's also removing instances of usermod which aren't needed anymore;
since we create the user / groups only in the images where they are
needed; which wasn't the case for Kolla where all users/groups were
created in the base image.
Note: we create the user/group before installing packaging so if
packaging creates directories and sets permissions, it'll be with the
right UID/GID (unless packaging overrides UID/GID but rarely do it).
Related-Bug: #1890798
Change-Id: If3fa2ff34af42a 7438c6dbf81dbcb 0bddd63afa6 41c361bb83472e4 8ead18d013)
(cherry picked from commit fb0ec2ffd0a99d4