Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
- uses: stratis-storage/github-actions/github-modify@HEAD
with:
repo: stratisd
default_branch: stratisd-v3.9.3
- name: Print head commit
run: git log --oneline -1
working-directory: stratisd
Expand Down Expand Up @@ -184,6 +185,7 @@ jobs:
- uses: stratis-storage/github-actions/github-modify@HEAD
with:
repo: stratisd
default_branch: stratisd-v3.9.3
- name: Print head commit
run: git log --oneline -1
working-directory: stratisd
Expand Down
46 changes: 46 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
stratis-cli 3.9.0
==================
Required stratisd version: 3.9.2

Recommended development environment: Fedora 44

! Indicates a PR that was reverted.

! Add MetadataUsed field to pool detail listing:
https://github.com/stratis-storage/stratis-cli/pull/1288

- Use pyproject.toml exclusively for package metadata:
https://github.com/stratis-storage/stratis-cli/pull/1300
https://github.com/stratis-storage/stratis-cli/pull/1299

! Add pool remove-cache subcommand:
https://github.com/stratis-storage/stratis-cli/pull/1293

- Catch missing property exception when checking size change:
https://github.com/stratis-storage/stratis-cli/pull/1298

! Require stratisd 3.10.0:
https://github.com/stratis-storage/stratis-cli/pull/1287

- Add an error message in case the D-Bus is not present:
https://github.com/stratis-storage/stratis-cli/pull/1304

- Use stdlib datetime module to parse D-Bus dates:
https://github.com/stratis-storage/stratis-cli/pull/1297
https://github.com/stratis-storage/stratis-cli/pull/1291

- Sort the list of pool alert codes in parser help:
https://github.com/stratis-storage/stratis-cli/pull/1302

- Tidies and Maintenance:
https://github.com/stratis-storage/stratis-cli/pull/1307
https://github.com/stratis-storage/stratis-cli/pull/1303
https://github.com/stratis-storage/stratis-cli/pull/1301
https://github.com/stratis-storage/stratis-cli/pull/1296
https://github.com/stratis-storage/stratis-cli/pull/1295
https://github.com/stratis-storage/stratis-cli/pull/1294
https://github.com/stratis-storage/stratis-cli/pull/1292
https://github.com/stratis-storage/stratis-cli/pull/1290
https://github.com/stratis-storage/stratis-cli/pull/1289


stratis-cli 3.9.1
=================
Required stratisd version: 3.9.2
Expand Down
9 changes: 0 additions & 9 deletions docs/stratis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ pool init-cache <pool_name> <blockdev> [<blockdev>..]::
drives, such as SSDs, are used for this purpose.
pool add-cache <pool_name> <blockdev> [<blockdev>..]::
Add one or more blockdevs to an existing pool with an initialized cache.
pool remove-cache <(--uuid <uuid> |--name <name>)>::
Remove a pool's cache.
pool extend-data <pool_name> [--device-uuid <uuid>]::
Increase the pool's data capacity with additional storage space offered by
its component data devices through, e.g., expansion of a component RAID
Expand Down Expand Up @@ -410,13 +408,6 @@ Space Usage: Used::
The space on the devices that is in use. Used space can be reclaimed.
For example, destroying a Stratis filesystem will reduce this value.

Space Usage: Metadata::
The space on the devices that is set aside for metadata use. This
metadata includes Stratis metadata, and other block layer metadata,
such as that used to manage encryption of a pool or device. It does
not include filesystem metadata, which is considered part of user
data.

FIELDS for stratis pool list [(--uuid <uuid> |--name <name>)] --stopped

UUID::
Expand Down
2 changes: 1 addition & 1 deletion src/stratis_cli/_actions/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
SECTOR_SIZE = 512

MAXIMUM_STRATISD_VERSION = "4.0.0"
MINIMUM_STRATISD_VERSION = "3.10.0"
MINIMUM_STRATISD_VERSION = "3.9.2"
assert Version(MINIMUM_STRATISD_VERSION) < Version(MAXIMUM_STRATISD_VERSION)

REVISION = f"r{MINIMUM_STRATISD_VERSION.split('.')[1]}"
Expand Down
26 changes: 10 additions & 16 deletions src/stratis_cli/_actions/_introspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</signal>
</interface>
""",
"org.storage.stratis3.Manager.r10": """
<interface name="org.storage.stratis3.Manager.r10">
"org.storage.stratis3.Manager.r9": """
<interface name="org.storage.stratis3.Manager.r9">
<method name="CreatePool">
<arg name="name" type="s" direction="in" />
<arg name="devices" type="as" direction="in" />
Expand Down Expand Up @@ -84,8 +84,8 @@
</property>
</interface>
""",
"org.storage.stratis3.Report.r10": """
<interface name="org.storage.stratis3.Report.r10">
"org.storage.stratis3.Report.r9": """
<interface name="org.storage.stratis3.Report.r9">
<method name="GetReport">
<arg name="name" type="s" direction="in" />
<arg name="result" type="s" direction="out" />
Expand All @@ -94,8 +94,8 @@
</method>
</interface>
""",
"org.storage.stratis3.blockdev.r10": """
<interface name="org.storage.stratis3.blockdev.r10">
"org.storage.stratis3.blockdev.r9": """
<interface name="org.storage.stratis3.blockdev.r9">
<property name="Devnode" type="s" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const" />
</property>
Expand All @@ -122,8 +122,8 @@
</property>
</interface>
""",
"org.storage.stratis3.filesystem.r10": """
<interface name="org.storage.stratis3.filesystem.r10">
"org.storage.stratis3.filesystem.r9": """
<interface name="org.storage.stratis3.filesystem.r9">
<method name="SetName">
<arg name="name" type="s" direction="in" />
<arg name="result" type="(bs)" direction="out" />
Expand All @@ -150,8 +150,8 @@
</property>
</interface>
""",
"org.storage.stratis3.pool.r10": """
<interface name="org.storage.stratis3.pool.r10">
"org.storage.stratis3.pool.r9": """
<interface name="org.storage.stratis3.pool.r9">
<method name="AddCacheDevs">
<arg name="devices" type="as" direction="in" />
<arg name="results" type="(bao)" direction="out" />
Expand Down Expand Up @@ -246,11 +246,6 @@
<arg name="return_code" type="q" direction="out" />
<arg name="return_string" type="s" direction="out" />
</method>
<method name="RemoveCache">
<arg name="results" type="(bas)" direction="out" />
<arg name="return_code" type="q" direction="out" />
<arg name="return_string" type="s" direction="out" />
</method>
<method name="SetName">
<arg name="name" type="s" direction="in" />
<arg name="result" type="(bs)" direction="out" />
Expand Down Expand Up @@ -285,7 +280,6 @@
<property name="HasCache" type="b" access="read" />
<property name="KeyDescriptions" type="v" access="read" />
<property name="LastReencryptedTimestamp" type="(bs)" access="read" />
<property name="MetadataUsed" type="s" access="read" />
<property name="MetadataVersion" type="t" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const" />
</property>
Expand Down
8 changes: 0 additions & 8 deletions src/stratis_cli/_actions/_list_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,17 +451,9 @@ def size_str(value: Range | None) -> str:
allocated_size = Range(mopool.AllocatedSize())
except DbusClientMissingPropertyError:
allocated_size = None

print(f" Allocated: {size_str(allocated_size)}")
print(f" Used: {size_str(size_triple.used())}")

try:
metadata_used = Range(mopool.MetadataUsed())
except DbusClientMissingPropertyError:
metadata_used = None

print(f" Metadata: {size_str(metadata_used)}")

def display(self):
"""
List a single pool in detail.
Expand Down
41 changes: 0 additions & 41 deletions src/stratis_cli/_actions/_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,47 +612,6 @@ def add_cache_devices(namespace: Namespace):
)
)

@staticmethod
def remove_cache(namespace: Namespace):
"""
Remove the cache from this pool.

:raises StratisCliEngineError:
:raises StratisCliIncoherenceError:
:raises StratisCliNoChangeError:
"""
from ._data import MOPool, ObjectManager, Pool, pools # noqa: PLC0415

pool_id = PoolId.from_parser_namespace(namespace)
assert pool_id is not None

proxy = get_object(TOP_OBJECT)
managed_objects = ObjectManager.Methods.GetManagedObjects(proxy, {})

(pool_object_path, pool_info) = next(
pools(props=pool_id.managed_objects_key())
.require_unique_match(True)
.search(managed_objects)
)

if not bool(MOPool(pool_info).HasCache()):
raise StratisCliNoChangeError("remove-cache", "cache")

((removed, devs_removed), return_code, message) = Pool.Methods.RemoveCache(
get_object(pool_object_path), {}
)

if return_code != StratisdErrors.OK: # pragma: no cover
raise StratisCliEngineError(return_code, message)

if not removed: # pragma: no cover
raise StratisCliIncoherenceError(
(
f"Expected to remove the cache from {pool_id} but "
"stratisd reports that it did not remove the cache."
)
)

@staticmethod
def extend_data(namespace: Namespace):
"""
Expand Down
16 changes: 0 additions & 16 deletions src/stratis_cli/_parser/_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,22 +426,6 @@ def verify(self, namespace: Namespace, parser: ArgumentParser):
"func": PoolActions.add_cache_devices,
},
),
(
"remove-cache",
{
"help": "Remove an active pool's cache",
"func": PoolActions.remove_cache,
"groups": [
(
"Pool Identifier",
{
"description": ("Choose one option to specify the pool"),
"mut_ex_args": [(True, UUID_OR_NAME)],
},
)
],
},
),
(
"extend-data",
{
Expand Down
2 changes: 1 addition & 1 deletion src/stratis_cli/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
.. moduleauthor:: mulhern <amulhern@redhat.com>
"""

__version_info__ = (3, 10, 0)
__version_info__ = (3, 9, 2)
__version__ = ".".join(str(x) for x in __version_info__)
81 changes: 0 additions & 81 deletions tests/integration/pool/test_remove_cache.py

This file was deleted.

Loading