with change in Ic6f053d56194613046ae0a4a908206ebb453fcf4 run() was
removed to be triggered, as a result the script actually don't run.
Change-Id: I5050f198f0109faa9299de85e01b0dbe4e5a30ab
Closes-Bug: #1903033
Trilio currently mounts an NFS export in /var/lib/nova to make it accessible
from within the nova_compute and nova_libvirt containers.
This can result in considerable delays when walking the directory tree to
ensure the ownership is correct.
This patch adds the ability to skip paths when recursively setting the
ownership and selinux context in /var/lib/nova. The list of paths to skip
can be set via te NovaStatedirOwnershipSkip heat parameter. This default to
the Trilio dir.
Change-Id: Ic6f053d56194613046ae0a4a908206ebb453fcf4
Avoid failing on deleted file as sometimes file might get
deleted while the script run. Log the exception instead for
troubleshooting purposes.
Change-Id: I733cec2b34ef0bd0780ba5b0520127b911505e1b
When the :z bind mount option is used, podman peforms a recursive relabel of
the mount point which is failing with "Operation not supported" if there are
any NFS exports mounted within. While it's possible for NFS to support true
selinux labelling, in practice is rarely does.
As we are already walking the tree to set ownership/permission, take ownership
of the relabelling logic too and skip relabelling on subtrees where we hit this
error.
Change-Id: Id5503ed274bd5dc0c5365cc994de7e5cdcbc2fb6
Closes-bug: #1869020
This change makes sure that we apply pyflake8 checks on all python
codes to improve its readability.
Note that there are some rules applied for other OpenStack projects,
but not yet turned on, which should be enabled in the future.
Change-Id: Iaf0299983d3a3fe48e3beb8f47bd33c21deb4972
Right now all scripts log in DEBUG level. This change enables only
DEBUG level if debug is also enabled for the nova service.
Change-Id: Ie58a6630877a58bec8ce763ede166997bd41f882