Swift not recognizing mounted drives

Andrew Boring andrew at andrewboring.com
Thu Sep 22 19:51:52 UTC 2022


Clay, 

Well, I'm an idiot.  I absolutely remembered to cchange the SELinux config file to permissive, and absolutely forgot to 'setenforce 0' immediately afteward. I even watched the audit log, thinking it was just logging the actions that will be blocked when I set it back to enforcing. 

[root at swift ~]# grep SELINUX= /etc/selinux/config
# SELINUX= can take one of these three values:
SELINUX=permissive

And yet:
[root at swift ~]# getenforce
Enforcing

A quick "setenforce 0" made all the nasty errors go away. Thanks for your patience.


> On Sep 22, 2022, at 3:06 PM, Clay Gerrard <clay.gerrard at gmail.com> wrote:
> 
> 
> 
> On Thu, Sep 22, 2022 at 12:36 PM Andrew Boring <andrew at andrewboring.com> wrote:
> 
> Sep 22 13:12:46 [hostname] account-replicator[183238]: Skipping: /srv/node/sda is not a directory
> 
> Ok well that's right here:
> 
> https://opendev.org/openstack/swift/src/branch/master/swift/common/db_replicator.py#L813
> 
> Which you can look at in constraints is pretty straightforward:
> 
> https://opendev.org/openstack/swift/src/branch/master/swift/common/constraints.py#L274
> 
> 
> [root at swift]# file /srv/node/sda
> /srv/node/sda: directory
> 
> 
> ok, that seems like something that works - let's see if we can get closer to the problem?  What if we use python (as root):
> 
> sudo python -c "import os.path; print(os.path.isdir('/srv/node/sda'))"
> 
> ... or again with the "swift" user
> 
> sudo -u swift python -c "import os.path; print(os.path.isdir('/srv/node/sda'))"
> 
>  N.B. the user swift is just the default - use whatever you have set as "user =" in your config
> 
> Also check syslog/journald and security or whatever for any warning logs about permissions or SELinux
> 
> --
> Clay Gerrard




More information about the openstack-discuss mailing list