Add file to the reno documentation build to show release notes for
stable/2023.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.
Sem-Ver: feature
Change-Id: Ic3ac791f083aa097412dc9075a6b20f2b148db02
Currently we don't have os_brick DEBUG log levels in Nova when setting
the service to debug mode.
That happens because Nova is forcefully setting oslo.privsep.daemon
levels to INFO to prevent leaking instance XML details (bug #1784062).
Oslo Privsep now supports per-context debug log levels, so this patch
sets the log level name for its only os_brick privsep context to
"os_brick.privileged" to differentiate it from the service it runs under
which uses the default "oslo_privsep.daemon".
This way even though Nova is still disabling its own privileged calls it
won't affect os-brick privileged calls, allowing us to properly debug
block device attach/detach operations.
Closes-Bug: #1922052
Related-Bug: #1784062
Change-Id: I0de32021eb90ca045845a6c7c7e3d27e52895948
Changes:
- eliminate whitespace in passenv values
- account for stricter allowlist checking
- removed skipsdist=True, which in tox 4 appears to prevent os-brick
from being installed in the testenvs
- made 4.0.0 the tox minversion
This patch makes tox 4 the default so that we can hopefully catch
problems locally before they block the gate.
Change-Id: I9f88d024c9d7b4f2761aa4e132ee0bd5b7272207
Eventlet hasn't actually been a direct os-brick
requirement since Ussuri Change-Id I9684db.
Leave it in test-reqs since we have a unit test
that mocks it. (Used via oslo.service.)
Change-Id: I9a72d41c9bb70ad568e5cd9218730b93b226b202
On some platforms there is no 'dmidecode' program (e.g. s390x), when
privsep attempts to run a program that's not found, it raises a
FileNotFoundError instead of ProcessExecutionError.
Closes-Bug: #1994083
Change-Id: I6fc43ab7e243d50b74036d1af5f9e8f880401cc6
Add file to the reno documentation build to show release notes for
stable/zed.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.
Sem-Ver: feature
Change-Id: Ia775c42636307fa35d0612937e4c949c0cc2193b
The RBDVolumeIOWrapper class inherits from io.RawIOBase but its close
method doesn't flush and after being called the "closed" attribute still
returns False.
Trying to set the "closed" attribute ourselves in
RBDVolumeIOWrapper.close results in an error, so we call the parent's
implementation to do it.
The parent's close method will also call the flush method.
This change ensures that rbd_image.close is only called once, that the
closed attribute is correct, and that the data is flushed on close.
Without these changes we could have, unintentionally, multiple calls to
the rbd_image.close method. If we called close on the wrapper
ourselves, then when the Garbage Collector is cleaning up the wrapper it
will call the io.RawIOBase finalizer that will see that the file is not
closed and call close again.
Now that we correctly set the closed flag on the instance, the flush
method should also behave like the parent implementation and fail if it
has already been closed.
Change-Id: Ib3b066a7da071b1c2de78a1a4e569676539bd335
Move the _get_system_uuid method from the NVMeOFConnector connector to
os_brick/privsep/nvmeof.py renaming it to get_system_uuid and running it
as privileged.
This allows us to read sys/class/dmi/id/product_uuid file in Python
instead of running a subprocess to execute cat.
It also allows the connector to have one less privsep calls if the file
doesn't exist, because it can execute the dmidecode command directly
without making another request to the privsep daemon.
Change-Id: I8f2edef6fda97af0ff3f92e39c8b24a85b6c3402
Use dict[], list[] etc. instead of Dict[], List[].
This works on all versions of Python that we support.
Change-Id: If9c737277c041ffd2d3bca1863d300ae7d9bd52e
This coverage is somewhat limited because this
uses classes (context, keymgr) that live outside
of os-brick and therefore don't have type definitons
here.
Change-Id: I7827a870c04a7a6e02510b7909430feebb70e6f1
The get_md_name uses the contents of mdstat using cat and piping it to
grep and then to awk using a privileged shell, but there's no need to do
that.
Actually the mdstat file has 0444 access, so we can read it in Python
directly instead of having to call the privsep daemon to create the
subprocess with the shell.
This patch changes the current implementation of the method to do the
reading and searching in Python.
Change-Id: Idbba6f9a6d928aa94d2920fc1bf8b6e2a0626a07
Turn off in-project stubs for now until this bug
is fixed and in a mypy release we can consume.
https://github.com/python/mypy/issues/13214
Change-Id: Ica954cffd760d7a9d48ba38d01e0e01e84553ff8