Deploying with selinux enforcing causes glance api container to fail to start with podman

Bug #1810799 reported by Tim Rozet
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Expired
Medium
Unassigned

Bug Description

When deploying OOO master (now with podman) and leaving selinux enabled and enforcing, the glance api container fails to start due to:

podman logs glance_api output:

ERROR:__main__:Unexpected error:
Traceback (most recent call last):
  File "/usr/local/bin/kolla_set_configs", line 411, in main
    execute_config_strategy(config)
  File "/usr/local/bin/kolla_set_configs", line 377, in execute_config_strategy
    copy_config(config)
  File "/usr/local/bin/kolla_set_configs", line 306, in copy_config
    config_file.copy()
  File "/usr/local/bin/kolla_set_configs", line 150, in copy
    self._merge_directories(source, dest)
  File "/usr/local/bin/kolla_set_configs", line 94, in _merge_directories
    dir_content = os.listdir(source)
OSError: [Errno 13] Permission denied: '/var/lib/kolla/config_files/src-ceph/'

The /var/lib/kolla/config_files/src-ceph directory does not exist. Ceph is not needed for undercloud so not sure why this mount is there, but it is present in the kolla config:

{
    "command": "/usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf --config-file /etc/glance/glance-image-import.conf",
    "config_files": [
        {
            "dest": "/",
            "merge": true,
            "preserve_properties": true,
            "source": "/var/lib/kolla/config_files/src/*"
        },
        {
            "dest": "/etc/ceph/",
            "merge": true,
            "preserve_properties": true,
            "source": "/var/lib/kolla/config_files/src-ceph/"
        }
    ],
    "permissions": [
        {
            "owner": "glance:glance",
            "path": "/var/lib/glance",
            "recurse": true
        },
        {
            "owner": "glance:glance",
            "path": "/etc/ceph/ceph.client.openstack.keyring",
            "perm": "0600"
        }
    ]
}

Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

Hey,

That's weird: on an centos7.6, with enforced SELinux, I could deploy the whole undercloud with podman, and it actually did accept an image in its glance.

We would need some more info, like some extract of the /var/log/audit/audit.log (especially AVC entries), and maybe some more info about your system in order to understand what's going on.

Cheers,

C.

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

Is this still an issue?

Changed in tripleo:
importance: Undecided → Critical
importance: Critical → Medium
status: New → Triaged
Revision history for this message
Tim Rozet (trozet) wrote :

I'm not sure. I just disabled selinux to "fix" it ;)

wes hayutin (weshayutin)
Changed in tripleo:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for tripleo because there has been no activity for 60 days.]

Changed in tripleo:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.