No longer supply properties on the D-Bus by means of external calls #1539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR's goal is to eliminate all possibility of failure in methods that are used to supply property values on the D-Bus. Currently, the consequence of a failure in obtaining one of these properties is a message with the form:
no total physical size computed for pool with uuid <some UUID>when most or all of the stratis CLI commands that require interaction with stratisd are run. None of these CLI commands can succeed when this happens. One of these methods supplies its value via a devicemapper ioctl, another by means of a stat call.
The approach taken here is to cache the values used at the time when these methods are necessarily called, which occurs in the corresponding
checkmethods for each module. The reason this seems like a good idea is that the view that the user gets of the stratisd system is consistent with the view that stratisd has of the system.However, there is currently a defect. The view that stratisd has based on the information it got in the
checkmethods is the last information that could be obtained. Perhaps subsequently, thecheckmethod was called, but the result returned wasFailorError. In that case, the information that is placed on the D-Bus and is cached in the objects, is not just slightly stale as is inevitable w/ a cached value, but potentially totally wrong.Resolves: #1148.