| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
When building in a buildroot, must create libexec directory explicitly.
|
|
|
|
|
|
|
| |
Commit 18722dfdf4d3e6f172d0b2af8bbdc4a154ea1dc0 introduced a dependency
on file from tools/ into lib/.
TODO: revert this once the issue is resolved.
|
|
|
|
|
|
|
|
| |
Latest upstream build of lvm results in the following error when
trying to use lvmshell.
"Argument --reportformat cannot be used in interactive mode.,
Error during parsing of command line."
|
|
|
|
| |
Useful for forcing lvmdbusd down error paths.
|
|
|
|
|
|
| |
Move the option to add the debug file into lvm_full_report_json so that
we collect the debug data when we fork & exec lvm and when we use lvm
shell.
|
|
|
|
|
| |
Better to drain everything we have now that our IO is line orientated
when using a ptty.
|
|
|
|
|
| |
We end up in a bad state if we simply eat IOErrors here. Exit the lvmshell
process and raise the IOError.
|
| |
|
|
|
|
| |
Bubble up a LvmBug if we get a KeyError on a lvm column name.
|
| |
|
| |
|
|
|
|
| |
If we don't make it through setUp, self.pvs will not exist.
|
|
|
|
|
| |
When we do the signal testing we default back to fork & exec. Put these
on the end to maximize our lvm shell testing until we fix this proper.
|
|
|
|
| |
Useful for testing `exit_shell` when running interactively.
|
|
|
|
|
|
|
| |
When lvm is compiled with editline, if the file descriptors don't look like
a tty, then no "lvm> " prompt is done. Having lvm output the shell prompt
when consuming JSON on a report file descriptor is very useful in
determining if lvm command is complete.
|
|
|
|
|
| |
Previously the daemon would output PID:TID. If it's running under systemd
it skips outputting PID as systemd already does this.
|
|
|
|
|
| |
Register the clean up with addCleanup so we ensure clean_up gets run
regardless of what happens in setUp.
|
|
|
|
|
| |
The logic for _cache_lv and _writecache_lv was identical except for which
underlying lvm command to run. Factor out common.
|
|
|
|
| |
This will cause lvm debug data to get logged if it's available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically we have seen a few different errors which occur when we call
fullreport. Failing exit code and JSON which is missing one or more keys.
Instruct lvm to dump the debug to a file during fullreport calls when we
fork & exec lvm. If we encounter an error, ouput the debug data.
The reason this isn't being done when lvmshell is used is because we
don't have an easy way to test the error paths.
This change is complicated by the following:
1. We don't know if fullreport was good until we evaluate all the JSON.
This is done a bit after we have called into lvm and returned.
2. We don't want to orphan the debug file used by lvm if the daemon is
killed. Thus we try to minimize the window where the debug file hasn't
already been unlinked. A RFE to pass an open FD to lvm for this
purpose is outstanding.
The temp. file is:
-rw------. 1 root root /tmp/lvmdbusd.lvm.debug.XXXXXXXX.log
|
|
|
|
|
|
|
|
| |
Introduce an exception which is used for known existing issues with lvm.
This is used to distinguish between errors between lvm itself and lvmdbusd.
In the case of lvm bugs, when we simply retry the operation we will log
very little. Otherwise, we will dump a full traceback for investigation
when we do the retry.
|
|
|
|
|
| |
We were using a number of different ways to achieve the same result. Use
a common function to make this consistent.
|
|
|
|
| |
This is expected with an exported vg
|
| |
|
|
|
|
|
| |
Simplify the fetch thread and correct the logic used for selecting the
options which are used when we batch update a state refresh.
|
|
|
|
|
|
| |
Instead of lumping all the exceptions, break them out to handle the dbus
exceptions separately, to reduce the amount of debug information that ends
up in the journal that has questionable value.
|
|
|
|
| |
Change how we exit on SIGINT so that we don't output needless debug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lvm occasionally fails to return all the request JSON keys in the output of
"fullreport". This happens very rarely. When it does the daemon was reporting
the resulting informational exception:
MThreadRunner: exception
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/lvmdbusd/utils.py", line 667, in _run
self.rc = self.f(*self.args)
File "/usr/lib/python3.9/site-packages/lvmdbusd/fetch.py", line 40, in _main_thread_load
(lv_changes, remove) = load_lvs(
File "/usr/lib/python3.9/site-packages/lvmdbusd/lv.py", line 143, in load_lvs
return common(
File "/usr/lib/python3.9/site-packages/lvmdbusd/loader.py", line 37, in common
objects = retrieve(search_keys, cache_refresh=False)
File "/usr/lib/python3.9/site-packages/lvmdbusd/lv.py", line 95, in lvs_state_retrieve
l['vdo_operating_mode'],
KeyError: 'vdo_operating_mode'
The daemon retries the operation, which usually works and the daemon continues.
However, simply reporting this informational stack trace is causing CI and other
automated tests to fail as they expect no tracebacks in the log output.
Remove the reporting of this code path unless it persists and causes the daemon
to give up and exit.
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2120267
|
| |
|
|
|
|
|
|
| |
When the daemon isn't started with --debug we will keep a circular
buffer of the past N number of debug messages which we will output
when we encounter an issue.
|
| |
|
|
|
|
|
| |
We need this to prevent lvm from interleaving the JSON output with errors
written to stderr.
|
| |
|
| |
|
|
|
|
| |
Get the daemon busy and send it SIGINT to ensure the daemon exits.
|
|
|
|
| |
This allows us to create the LVs async., thus queuing them up in daemon.
|
| |
|
|
|
|
|
| |
This class handles identifying daemon, sending signals to it, and starting
it back up again.
|
| |
|
|
|
|
|
|
| |
Rather than trying to bubble up return codes that get us to exit cleanly
it's better to just raise an exception to bail. In some cases functions
don't have return codes, so they cannot be checked.
|
|
|
|
|
| |
When you try to remove a job that is incomplete you get a dbus exception.
Test for this error condition.
|
|
|
|
|
| |
Ensure that when we trigger an external event that we don't incorrectly
handle multiple --config options.
|
| |
|
|
|
|
| |
I don't think we have ever utilized this, remove.
|
|
|
|
|
|
| |
We were incorrectly only setting this if --udev wasn't present on the
command line. In all cases when we see a manager.ExternalEvent we want
to set this.
|
| |
|
|
|
|
|
|
| |
Depending on when an occurs, it maynot have any information available for
lastlog. In this case try to grab an error message from the original
response.
|
| |
|
| |
|
| |
|