kolla/docker
Michele Baldessari 0e6465543e Drop systemd support from nsswitch.conf on RHEL-based distros
A bit like we did for I3e0e86026f5a4a78473bed824cd1682d3a020cd5 we
should remove the nss-systemd lookup from containers. The reasons for
this are as follows:
1) Just like for I3e0e86026f5a4a78473bed824cd1682d3a020cd5
when this nss module is triggered it tries to talk to dbus.
It triggers a bunch of selinux denials and it makes little sense
to open all containers to talk to dbus.
In particular, if a container is run as non-privileged and bind-mounts
/run from the host, we will hit selinux denials like the following:

  type=USER_AVC msg=audit(1592337775.860:74119): pid=1284 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.DBus member=Hello dest=org.freedesktop.DBus spid=406228 scontext=system_u:system_r:container_t:s0:c162,c886 tcontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'UID="dbus" AUID="unset" SAUID="dbus"

2) It just makes little sense in a kolla-world to have containers
talk to dbus/systemd and it saves us some time when a lookup triggers
the systemd module for whatever reason. Especially because the
nss-systemd module does a few things which are not useful in a container
(ensures that the root and nobody users and groups remain resolvable,
SystemD's DynamicUser= feature, provide Lookup API via Varlink)

The sed regex gives us the wanted results:
$ diff -u /etc/nsswitch.conf.orig /etc/nsswitch.conf
--- /etc/nsswitch.conf.orig     2020-06-19 07:18:10.974580755 +0000
+++ /etc/nsswitch.conf  2020-06-19 07:20:12.260230103 +0000
@@ -53,9 +53,9 @@
 # group:     db files

 # In order of likelihood of use to accelerate lookup.
-passwd:      sss files systemd
+passwd:      sss files
 shadow:     files sss
-group:       sss files systemd
+group:       sss files
 hosts:      files dns myhostname
 services:   files sss
 netgroup:   sss

Related-Bug: #1883849

Change-Id: I81e5b7abf4571fece13a029e25911e9e4dece673
(cherry picked from commit dc2ddfa975)
2020-07-06 14:45:03 +00:00
..
almanach Implement Almanach Docker images 2017-11-09 09:40:37 +00:00
aodh Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
barbican Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
base Drop systemd support from nsswitch.conf on RHEL-based distros 2020-07-06 14:45:03 +00:00
bifrost switch to official CentOS 8 repositories 2020-05-17 13:02:14 +00:00
blazar Fix blazar build 2018-07-04 13:42:51 +02:00
ceilometer CentOS 8: Update packages in images 2020-02-26 09:16:48 +00:00
ceph Fix missing nfs-ganesha-rados-urls package for CentOS 2020-06-22 20:38:22 +02:00
certmonger Use base_package_type 2019-01-17 08:23:41 -07:00
chrony Merge "Fix logging for chrony" 2017-05-17 08:11:38 +00:00
cinder Fix invalid test in cinder data migration script 2020-04-04 10:42:29 +00:00
cloudkitty Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
collectd Add collectd-amqp to the collectd image 2020-06-18 10:47:30 +00:00
congress Use base_package_type 2019-01-17 08:23:41 -07:00
cron Use base_package_type 2019-01-17 08:23:41 -07:00
cyborg CI: Install python deps, fix mod_wsgi in cyborg-api, disable masakari-monitors 2020-06-19 07:58:06 +02:00
designate Designate: pool-manager has been removed 2019-11-21 18:37:44 +00:00
dind Debian/Ubuntu: more python3 packages for binary 2019-06-06 11:06:58 +00:00
dnsmasq Override image's meta info. 2017-05-03 11:08:17 +09:00
dragonflow Use base_package_type 2019-01-17 08:23:41 -07:00
ec2-api Use base_package_type 2019-01-17 08:23:41 -07:00
elasticsearch Add Elasticsearch Curator Docker image 2020-06-28 16:35:14 +00:00
elasticsearch6 Add elasticsearch6 and kibana6 images 2020-04-09 14:10:16 +01:00
etcd Use base_package_type 2019-01-17 08:23:41 -07:00
fluentd Fluentd: There is available td-agent pkg for Buster 2019-10-02 01:55:10 -07:00
freezer CentOS 8: Drop trickle install to build freezer 2020-03-25 13:39:09 +00:00
glance Add nfs dependencies to glance container 2020-04-23 17:09:48 +00:00
gnocchi Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
grafana grafana/aarch64: use package from upstream repositories 2019-06-07 17:54:13 +02:00
hacluster Add HAcluster containers 2019-07-18 11:29:37 -04:00
haproxy Use base_package_type 2019-01-17 08:23:41 -07:00
heat Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
helm-repository Debian/Ubuntu: move to Python 3 for source images 2019-06-06 11:59:03 +01:00
horizon Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
influxdb Override image's meta info. 2017-05-03 11:08:17 +09:00
ironic Merge "Adds python3-systemd for ansible deploy interface" into stable/train 2020-03-16 10:31:44 +00:00
ironic-inspector ironic-inspector: install the dnsmasq subpackage explicitly 2019-09-03 13:03:35 +02:00
iscsid Debian/Ubuntu: more python3 packages for binary 2019-06-06 11:06:58 +00:00
kafka There is no Java 8 in Debian 'buster' 2019-06-17 14:39:56 +00:00
karbor Override image's meta info. 2017-05-03 11:08:17 +09:00
keepalived Use base_package_type 2019-01-17 08:23:41 -07:00
keystone Ensure proper JSON in keystone bootstrap 2020-04-14 12:44:06 +00:00
kibana kibana, nova-libvirt: handle it properly for non-x86 2020-03-17 17:10:41 +00:00
kibana6 Add elasticsearch6 and kibana6 images 2020-04-09 14:10:16 +01:00
kolla-toolbox kolla-toolbox: use u-c while installing virtualenv 2020-06-19 19:28:12 +00:00
kube Debian/Ubuntu: move to Python 3 for source images 2019-06-06 11:59:03 +01:00
kubernetes-entrypoint Update kubernetes-entrypoint v0.1.1 to 0.3.0 2018-08-09 05:29:50 +00:00
kubetoolbox Debian/Ubuntu: move to Python 3 for source images 2019-06-06 11:59:03 +01:00
kuryr CentOS 8: Update packages in images 2020-02-26 09:16:48 +00:00
logstash There is no Java 8 in Debian 'buster' (part 3) 2019-07-19 09:08:09 +00:00
logstash6 Add Logstash 6 for Monasca on Centos 8 2020-06-25 17:04:53 +01:00
magnum Fix magnum logic for rhel 2019-01-18 09:39:49 -07:00
manila Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
mariadb switch to official CentOS 8 repositories 2020-05-17 13:02:14 +00:00
masakari Ensure the confs exists for cyborg and masakari 2020-05-20 08:54:47 +00:00
memcached Override image's meta info. 2017-05-03 11:08:17 +09:00
mistral Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
monasca Fix multiple issues 2020-06-08 14:51:57 +00:00
mongodb Use base_package_type 2019-01-17 08:23:41 -07:00
multipathd Use base_package_type 2019-01-17 08:23:41 -07:00
murano Use base_package_type 2019-01-17 08:23:41 -07:00
networking-baremetal/ironic-neutron-agent Add python3 packages for RHEL systems 2019-03-12 17:48:18 +00:00
neutron add libibverbs package for openvswitch 2020-06-16 09:21:49 +00:00
nova nova-compute: add ndctl to expose NVDIMMs to guests 2020-05-26 14:56:09 +02:00
novajoin Add python3 packages for RHEL systems 2019-03-12 17:48:18 +00:00
octavia Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
opendaylight There is no Java 8 in Debian 'buster' (part 2) 2019-07-16 14:51:28 +02:00
openstack-base switch to official CentOS 8 repositories 2020-05-17 13:02:14 +00:00
openvswitch add libibverbs package for openvswitch 2020-06-16 09:21:49 +00:00
ovn Use ovn-ctl script to start OVN ovsdb-servers 2019-11-15 11:01:15 +05:30
ovsdpdk Remove support for OracleLinux 2019-09-18 13:42:47 +01:00
panko Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
placement Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
prometheus Bump Openstack Exporter version to 0.6.0 2019-10-18 08:19:39 -04:00
ptp Add ptp service docker image 2017-11-09 19:41:38 +08:00
qdrouterd qdrouterd: ignore failure of disabling epel repos 2020-05-21 15:54:01 +05:30
qinling Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
rabbitmq CentOS 8: Update packages in images 2020-02-26 09:16:48 +00:00
rabbitmq-3.7.24 CentOS 8: Add rabbitmq-3.7.24 image (CentOS 7 only) 2020-04-15 14:58:32 +00:00
radvd Create radvd container 2018-04-20 13:26:59 -04:00
rally Fixes rally db commands 2020-01-13 11:00:13 +00:00
redis Use base_package_type 2019-01-17 08:23:41 -07:00
rsyslog Use base_package_type 2019-01-17 08:23:41 -07:00
sahara Sahara: install also the split plugins 2019-03-18 23:55:46 +01:00
searchlight Override image's meta info. 2017-05-03 11:08:17 +09:00
senlin Use base_package_type 2019-01-17 08:23:41 -07:00
sensu Sensu: Remove ceph and process-checks plugins from client 2020-04-08 11:21:40 +01:00
skydive CentOS 8: Update packages in images 2020-02-26 09:16:48 +00:00
solum Override image's meta info. 2017-05-03 11:08:17 +09:00
storm Fix loading of Storm on Centos8 / Python 3 2020-06-25 16:17:17 +00:00
swift Fixes swift-object-expirer for Debian and Ubuntu binary images. 2020-01-20 20:13:05 +00:00
tacker Add python3 packages for RHEL systems 2019-03-12 17:48:18 +00:00
telegraf Debian/Ubuntu: more python3 packages for binary 2019-06-06 11:06:58 +00:00
tempest Include iputils package to tempest container 2019-08-19 21:13:46 +05:30
tgtd Remove tgtd and scsi-target-utils support in CentOS/RHEL 8 2020-02-24 14:23:36 +00:00
tripleoclient Add python3 packages for RHEL systems 2019-03-12 17:48:18 +00:00
trove Use base_package_type 2019-01-17 08:23:41 -07:00
vitrage Add vitrage-persistor image 2020-04-11 13:27:29 +00:00
vmtp Override image's meta info. 2017-05-03 11:08:17 +09:00
watcher Use base_package_type 2019-01-17 08:23:41 -07:00
zaqar Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
zookeeper Fix Zookeeper builds 2019-04-02 20:13:12 +01:00
zun Refactor Apache httpd setup 2020-01-14 13:16:38 +00:00
macros.j2 CentOS 8: base and openstack-base images 2020-02-26 09:14:46 +00:00