Skip to content

Harden stratis-cli to prevent stack traces from missing D-Bus properties #858

@mulkieran

Description

@mulkieran

With zbus, it is more possible that the GetManagedObjects result will not have certain properties for an object path present. When an expected property is not present, a stack trace results.

This can effect the examination of a GetManagedObjects result.

We do this two ways:

  1. Via the MO{Pool,Dev,Filesystem} classes which access these properties.
  2. When looking for a specific pool object path based on its Name or Uuid property.

For the first, it might help for dbus-client-gen methods to allow specifying a default value in case the property is non-existent.

For the second, catching and hiding the KeyError exception would be the correct way to go.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress (long term)

Relationships

None yet

Development

No branches or pull requests

Issue actions