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 @@ -139,6 +139,7 @@ jobs:
- uses: stratis-storage/github-actions/github-modify@HEAD
with:
repo: stratisd
default_branch: stratisd-v3.9.4
- name: Print head commit
run: git log --oneline -1
working-directory: stratisd
Expand Down Expand Up @@ -205,6 +206,7 @@ jobs:
- uses: stratis-storage/github-actions/github-modify@HEAD
with:
repo: stratisd
default_branch: stratisd-v3.9.4
- name: Print head commit
run: git log --oneline -1
working-directory: stratisd
Expand Down
18 changes: 18 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
stratis-cli 3.9.3
=================
Required stratisd version: 3.9.2

Recommended development environment: Fedora 44

! Indicates a PR that was reverted.

! Restart 3.10.0:
https://github.com/stratis-storage/stratis-cli/pull/1308

- Fix typo in changelog:
https://github.com/stratis-storage/stratis-cli/pull/1309

- Require setuptools version no greater than 69:
https://github.com/stratis-storage/stratis-cli/pull/1310


stratis-cli 3.9.2
==================
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, 3)
__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