Incorrectly thinking that it's running in a container

Bug #1885302 reported by Gorka Eguileor on 2020-06-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinderlib
Undecided
Gorka Eguileor

Bug Description

Cinderlib is sometimes incorrectly thinking that it's running inside a container for the RBD driver.
The detection needs to be improved, as some systems may have '/proc' st_dev higher than 4 even when running the process out of a container.

A better detection is probably checking /proc/1/mounts and checking if / is using something from /var/lib

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinderlib (master)

Fix proposed to branch: master
Review: https://review.opendev.org/738230

Changed in cinderlib:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinderlib (master)

Reviewed: https://review.opendev.org/738230
Committed: https://git.openstack.org/cgit/openstack/cinderlib/commit/?id=669235b8abd23115b1954948ec96be124629482c
Submitter: Zuul
Branch: master

commit 669235b8abd23115b1954948ec96be124629482c
Author: Gorka Eguileor <email address hidden>
Date: Fri Jun 26 18:03:11 2020 +0200

    RBD: Fix containerized detection

    Our detection mechanism of when we are running containerized has false
    positives, so we are not also checking /proc/1/mounts to see if the root
    directory is mounted from /var/lib/, which is the case when running
    containerized.

    Change-Id: Icad0340a9f805b59a5cddd7526a1efbb24ab652e
    Closes-Bug: #1885302

Changed in cinderlib:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers