Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
d0bcb52
Main sfam 2359 (#935)
Hamdy-khader Mar 27, 2026
801c600
feat: enhance cluster and volume DTOs to include capacity statistics …
Hamdy-khader Mar 27, 2026
a9f8431
updated helm template app_k8s.yaml
geoffrey1330 Mar 27, 2026
2a62dc8
made prometheus url configurable
geoffrey1330 Mar 27, 2026
a763c4d
added nodeselector and tolerations
geoffrey1330 Mar 27, 2026
dddbbe9
fixed the helm values
geoffrey1330 Mar 27, 2026
6884662
fixed the helm values
geoffrey1330 Mar 27, 2026
83a0261
added crds
geoffrey1330 Mar 27, 2026
59f07f0
fixed the helm values
geoffrey1330 Mar 27, 2026
419663d
feat: remove clone_name from clone endpoint and update to POST method
Hamdy-khader Mar 27, 2026
df32e3e
feat: refactor migration handling to use list instead of set for acti…
Hamdy-khader Mar 27, 2026
cacf45c
fixed CapacityStatDTO is not defined
geoffrey1330 Mar 27, 2026
b02c5bc
feat: enhance cluster and volume DTOs to include capacity statistics …
geoffrey1330 Mar 27, 2026
8960482
added changes to fix broken operator operation
geoffrey1330 Mar 27, 2026
16d4448
feat: update cluster image tag for snapshot replication
Hamdy-khader Mar 27, 2026
d9b56b4
feat: remove unused bdev_lvol_create_poller_group method from rpc_client
Hamdy-khader Mar 27, 2026
e2053bc
feat: refactor lvol cloning logic and remove unused RPC methods
Hamdy-khader Mar 28, 2026
de3bf56
fix code checks
Hamdy-khader Mar 28, 2026
2c5001a
Merge branch 'main' into main-snapshot-replication
Hamdy-khader Mar 28, 2026
bd74372
fix code checks
Hamdy-khader Mar 28, 2026
e5df8ce
fix code checks
Hamdy-khader Mar 28, 2026
2785fb7
fix: comment out print_stats_thread.start() to prevent premature thre…
Hamdy-khader Mar 28, 2026
f159fbf
fix: modify print_stats_thread to control execution flow with do_run …
Hamdy-khader Mar 28, 2026
cf85f83
fix: refactor print_stats to remove do_run attribute and simplify exe…
Hamdy-khader Mar 28, 2026
e17796d
Merge branch 'main' into main-snapshot-replication
geoffrey1330 Mar 28, 2026
07c8c76
Merge branch 'main' into main-snapshot-replication
Hamdy-khader Mar 29, 2026
9eb3032
feat: add --allowed-hosts argument to CLI for volume access control
Hamdy-khader Mar 29, 2026
56725d9
feat: prevent deletion of snapshots in deletion status unless forced
Hamdy-khader Mar 29, 2026
29dbe5c
made prometheus image repo and tag configurable
geoffrey1330 Mar 30, 2026
41fa41e
made reloader image repo and tag configurable
geoffrey1330 Mar 30, 2026
459356d
made opensearch image repo and tag configurable
geoffrey1330 Mar 30, 2026
008655e
made mongodb image repo and tag configurable
geoffrey1330 Mar 30, 2026
410df72
made ingress image repo and tag configurable
geoffrey1330 Mar 30, 2026
cea5313
made reloader image repo and tag configurable
geoffrey1330 Mar 31, 2026
eec05aa
made mongodb image repo and tag configurable
geoffrey1330 Mar 31, 2026
3b60f40
added cluster add param to api v1 and v2
geoffrey1330 Mar 31, 2026
a27aa6f
Fix sfam-2663
Hamdy-khader Mar 31, 2026
de85c8c
updated the cluster crd
geoffrey1330 Mar 31, 2026
c4930d4
added helm value for cpu topology support
geoffrey1330 Mar 31, 2026
e3b3f6b
refactor: update parameters in bdev_lvol_transfer for clarity
Hamdy-khader Apr 1, 2026
d618ec2
feat: enhance volume deletion logic to handle already deleted volumes
Hamdy-khader Apr 1, 2026
e8348a2
fix: correct API decorator for replicate_lvol_on_source_cluster endpoint
Hamdy-khader Apr 1, 2026
ca5bf76
fix: handle KeyError when retrieving source node in replicate_lvol_on…
Hamdy-khader Apr 1, 2026
29fc47f
Fix lvol_poller_mask issue
wmousa Apr 1, 2026
c03c8d3
fix: move reloader annotations to Deployment metadata in app_k8s.yaml
geoffrey1330 Apr 2, 2026
607426b
fix: remove unnecessary status check for storage node monitoring
Hamdy-khader Apr 2, 2026
f4c7522
updated the webapi matchLabels
geoffrey1330 Apr 2, 2026
ef8680c
Merge branch 'main' into main-snapshot-replication
Hamdy-khader Apr 2, 2026
2e803a8
Merge remote-tracking branch 'origin/main-snapshot-replication' into …
Hamdy-khader Apr 2, 2026
7e610b0
Fixing security backup restore issue
RaunakJalan Apr 2, 2026
9834b62
Revert "Fixing security backup restore issue"
RaunakJalan Apr 2, 2026
596d2c3
fix: handle KeyError when retrieving original snapshot for excluded n…
Hamdy-khader Apr 3, 2026
01a9c0a
fix: remove unnecessary parameter from nvmf_subsystem_add_ns call
Hamdy-khader Apr 3, 2026
f59bb41
fix: update snapshot instance access to use dictionary syntax
Hamdy-khader Apr 3, 2026
e239b87
Fix sfam-2678
Hamdy-khader Apr 5, 2026
4f6a24b
added a fix for sfam-2677
geoffrey1330 Apr 6, 2026
2a622c7
added check if master lvol is namespaced
geoffrey1330 Apr 6, 2026
e4d84fe
updated logic for calculate_unisolated_cores
geoffrey1330 Apr 6, 2026
f88574a
make storageclass configurable and hostpath optional
geoffrey1330 Apr 7, 2026
6958d4a
fix: enhance snapshot retrieval for replication by checking target cl…
Hamdy-khader Apr 7, 2026
a60e6b0
added script to collect k8s pod logs
geoffrey1330 Apr 8, 2026
a18fc92
fix: update snapshot chaining to use dictionary syntax and add error …
Hamdy-khader Apr 8, 2026
11b8478
fix: improve snapshot replication by verifying target LVol existence
Hamdy-khader Apr 8, 2026
6c940b0
fix: update lvol NQN comparison for target cluster snapshot verification
Hamdy-khader Apr 8, 2026
ed754ae
fix: retrieve target replicated snapshot UUID for replication
Hamdy-khader Apr 8, 2026
e252771
use alpine:3.21.3 image for init job container
geoffrey1330 Apr 9, 2026
f6034ec
fix: retrieve snapshot details using database controller for replication
Hamdy-khader Apr 9, 2026
15b1c35
fix: add error handling for missing storage node during snapshot repl…
Hamdy-khader Apr 9, 2026
58e7224
removed script collect_logs.sh
geoffrey1330 Apr 10, 2026
ff3c786
updated the cr kind and group name
geoffrey1330 Apr 10, 2026
5975d8b
use simplyblock/alpine-tools:3.21.3 image for init job container
geoffrey1330 Apr 10, 2026
709ab45
updated custom resource helm value
geoffrey1330 Apr 10, 2026
df409e9
updated custom resource helm value
geoffrey1330 Apr 10, 2026
3e0b56d
Merge branch 'main' into main-snapshot-replication
Hamdy-khader Apr 10, 2026
9aab98f
updated custom resource helm value
geoffrey1330 Apr 10, 2026
332fda1
updated the simplyblock-manager clusterrole
geoffrey1330 Apr 10, 2026
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
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ flask-openapi3
jsonschema
fastapi
uvicorn
prometheus_api_client
prometheus_api_client
paramiko
127 changes: 127 additions & 0 deletions simplyblock_cli/cli-reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,28 @@ commands:
help: "Name"
dest: name
type: str
- name: add-replication
help: Assigns the snapshot replication target cluster
arguments:
- name: "cluster_id"
help: "Cluster id"
dest: cluster_id
type: str
completer: _completer_get_cluster_list
- name: "target_cluster_id"
help: "Target Cluster id"
dest: target_cluster_id
type: str
completer: _completer_get_cluster_list
- name: "--timeout"
help: "Snapshot replication network timeout"
dest: timeout
type: int
default: "3600"
- name: "--target-pool"
help: "Target cluster pool ID or name"
dest: target_pool
type: str
- name: "volume"
help: "Logical volume commands"
aliases:
Expand Down Expand Up @@ -1601,6 +1623,11 @@ commands:
dest: npcs
type: int
default: 0
- name: "--replicate"
help: "Replicate LVol snapshot"
dest: replicate
type: bool
action: store_true
- name: "--allowed-hosts"
help: "Path to JSON file with host NQNs allowed to access this volume's subsystem"
dest: allowed_hosts
Expand Down Expand Up @@ -1849,6 +1876,52 @@ commands:
help: "Logical volume id"
dest: volume_id
type: str
- name: replication-start
help: "Start snapshot replication taken from lvol"
arguments:
- name: "lvol_id"
help: "Logical volume id"
dest: lvol_id
type: str
- name: "--replication-cluster-id"
help: "Cluster ID of the replication target cluster"
dest: replication_cluster_id
type: str
- name: replication-stop
help: "Stop snapshot replication taken from lvol"
arguments:
- name: "lvol_id"
help: "Logical volume id"
dest: lvol_id
type: str
- name: replication-status
help: "Lists replication status"
arguments:
- name: "cluster_id"
help: "Cluster UUID"
dest: cluster_id
type: str
- name: replication-trigger
help: "Start replication for lvol"
arguments:
- name: "lvol_id"
help: "Logical volume id"
dest: lvol_id
type: str
- name: suspend
help: "Suspend lvol subsystems"
arguments:
- name: "lvol_id"
help: "Logical volume id"
dest: lvol_id
type: str
- name: resume
help: "Resume lvol subsystems"
arguments:
- name: "lvol_id"
help: "Logical volume id"
dest: lvol_id
type: str
- name: clone-lvol
help: "Create logical volume clone by taking a snapshot and then cloning it."
arguments:
Expand Down Expand Up @@ -2136,6 +2209,16 @@ commands:
dest: all
type: bool
action: store_true
- name: "--cluster-id"
help: "Filter snapshots by cluster UUID"
dest: cluster_id
type: str
required: false
- name: "--with-details"
help: "List snapshots with replicate and chaining details"
dest: with_details
type: bool
action: store_true
- name: delete
help: "Deletes a snapshot"
arguments:
Expand All @@ -2148,6 +2231,13 @@ commands:
dest: force
type: bool
action: store_true
- name: check
help: "Check a snapshot health"
arguments:
- name: "snapshot_id"
help: "Snapshot id"
dest: snapshot_id
type: str
- name: clone
help: "Provisions a new logical volume from an existing snapshot"
arguments:
Expand All @@ -2164,6 +2254,43 @@ commands:
dest: resize
type: size
default: "0"
- name: replication-status
help: "Lists snapshots replication status"
arguments:
- name: "cluster_id"
help: "Cluster UUID"
dest: cluster_id
type: str
- name: delete-replication-only
help: "Delete replicated version of a snapshot"
arguments:
- name: "snapshot_id"
help: "Snapshot UUID"
dest: snapshot_id
type: str
- name: get
help: "Gets a snapshot information"
arguments:
- name: "snapshot_id"
help: "Snapshot UUID"
dest: snapshot_id
type: str
- name: set
help: "set snapshot db value"
private: true
arguments:
- name: "snapshot_id"
help: "snapshot id"
dest: snapshot_id
type: str
- name: "attr_name"
help: "attr_name"
dest: attr_name
type: str
- name: "attr_value"
help: "attr_value"
dest: attr_value
type: str
- name: backup
help: "Create an S3 backup of an existing snapshot"
arguments:
Expand Down
98 changes: 98 additions & 0 deletions simplyblock_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ def init_cluster(self):
if self.developer_mode:
self.init_cluster__set(subparser)
self.init_cluster__change_name(subparser)
self.init_cluster__add_replication(subparser)


def init_cluster__create(self, subparser):
Expand Down Expand Up @@ -571,6 +572,13 @@ def init_cluster__change_name(self, subparser):
subcommand.add_argument('cluster_id', help='Cluster id', type=str).completer = self._completer_get_cluster_list
subcommand.add_argument('name', help='Name', type=str)

def init_cluster__add_replication(self, subparser):
subcommand = self.add_sub_command(subparser, 'add-replication', 'Assigns the snapshot replication target cluster')
subcommand.add_argument('cluster_id', help='Cluster id', type=str).completer = self._completer_get_cluster_list
subcommand.add_argument('target_cluster_id', help='Target Cluster id', type=str).completer = self._completer_get_cluster_list
argument = subcommand.add_argument('--timeout', help='Snapshot replication network timeout', type=int, default=3600, dest='timeout')
argument = subcommand.add_argument('--target-pool', help='Target cluster pool ID or name', type=str, dest='target_pool')


def init_volume(self):
subparser = self.add_command('volume', 'Logical volume commands', aliases=['lvol',])
Expand Down Expand Up @@ -601,6 +609,12 @@ def init_volume(self):
self.init_volume__migrate_list(subparser)
if self.developer_mode:
self.init_volume__migrate_cancel(subparser)
self.init_volume__replication_start(subparser)
self.init_volume__replication_stop(subparser)
self.init_volume__replication_status(subparser)
self.init_volume__replication_trigger(subparser)
self.init_volume__suspend(subparser)
self.init_volume__resume(subparser)


def init_volume__add(self, subparser):
Expand Down Expand Up @@ -630,6 +644,7 @@ def init_volume__add(self, subparser):
argument = subcommand.add_argument('--pvc-name', '--pvc_name', help='Set logical volume PVC name for k8s clients', type=str, dest='pvc_name')
argument = subcommand.add_argument('--data-chunks-per-stripe', help='Erasure coding schema parameter k (distributed raid), default: 1', type=int, default=0, dest='ndcs')
argument = subcommand.add_argument('--parity-chunks-per-stripe', help='Erasure coding schema parameter n (distributed raid), default: 1', type=int, default=0, dest='npcs')
argument = subcommand.add_argument('--replicate', help='Replicate LVol snapshot', dest='replicate', action='store_true')
argument = subcommand.add_argument('--allowed-hosts', help='Path to JSON file with host NQNs allowed to access this volume\'s subsystem', type=str, dest='allowed_hosts')

def init_volume__add_host(self, subparser):
Expand Down Expand Up @@ -730,6 +745,31 @@ def init_volume__clone_lvol(self, subparser):
subcommand.add_argument('volume_id', help='Logical volume id', type=str)
subcommand.add_argument('clone_name', help='New lvol clone name', type=str)

def init_volume__replication_start(self, subparser):
subcommand = self.add_sub_command(subparser, 'replication-start', 'Start snapshot replication taken from lvol')
subcommand.add_argument('lvol_id', help='Logical volume id', type=str)
argument = subcommand.add_argument('--replication-cluster-id', help='Cluster ID of the replication target cluster', type=str, dest='replication_cluster_id')

def init_volume__replication_stop(self, subparser):
subcommand = self.add_sub_command(subparser, 'replication-stop', 'Stop snapshot replication taken from lvol')
subcommand.add_argument('lvol_id', help='Logical volume id', type=str)

def init_volume__replication_status(self, subparser):
subcommand = self.add_sub_command(subparser, 'replication-status', 'Lists replication status')
subcommand.add_argument('cluster_id', help='Cluster UUID', type=str)

def init_volume__replication_trigger(self, subparser):
subcommand = self.add_sub_command(subparser, 'replication-trigger', 'Start replication for lvol')
subcommand.add_argument('lvol_id', help='Logical volume id', type=str)

def init_volume__suspend(self, subparser):
subcommand = self.add_sub_command(subparser, 'suspend', 'Suspend lvol subsystems')
subcommand.add_argument('lvol_id', help='Logical volume id', type=str)

def init_volume__resume(self, subparser):
subcommand = self.add_sub_command(subparser, 'resume', 'Resume lvol subsystems')
subcommand.add_argument('lvol_id', help='Logical volume id', type=str)

def init_volume__migrate(self, subparser):
subcommand = self.add_sub_command(subparser, 'migrate', 'Migrate a logical volume to a different storage node')
subcommand.add_argument('volume_id', help='Logical volume id', type=str)
Expand Down Expand Up @@ -846,7 +886,13 @@ def init_snapshot(self):
self.init_snapshot__add(subparser)
self.init_snapshot__list(subparser)
self.init_snapshot__delete(subparser)
self.init_snapshot__check(subparser)
self.init_snapshot__clone(subparser)
self.init_snapshot__replication_status(subparser)
self.init_snapshot__delete_replication_only(subparser)
self.init_snapshot__get(subparser)
if self.developer_mode:
self.init_snapshot__set(subparser)
self.init_snapshot__backup(subparser)


Expand All @@ -859,18 +905,42 @@ def init_snapshot__add(self, subparser):
def init_snapshot__list(self, subparser):
subcommand = self.add_sub_command(subparser, 'list', 'Lists all snapshots')
argument = subcommand.add_argument('--all', help='List soft deleted snapshots', dest='all', action='store_true')
argument = subcommand.add_argument('--cluster-id', help='Filter snapshots by cluster UUID', type=str, dest='cluster_id', required=False)
argument = subcommand.add_argument('--with-details', help='List snapshots with replicate and chaining details', dest='with_details', action='store_true')

def init_snapshot__delete(self, subparser):
subcommand = self.add_sub_command(subparser, 'delete', 'Deletes a snapshot')
subcommand.add_argument('snapshot_id', help='Snapshot id', type=str)
argument = subcommand.add_argument('--force', help='Force remove', dest='force', action='store_true')

def init_snapshot__check(self, subparser):
subcommand = self.add_sub_command(subparser, 'check', 'Check a snapshot health')
subcommand.add_argument('snapshot_id', help='Snapshot id', type=str)

def init_snapshot__clone(self, subparser):
subcommand = self.add_sub_command(subparser, 'clone', 'Provisions a new logical volume from an existing snapshot')
subcommand.add_argument('snapshot_id', help='Snapshot id', type=str)
subcommand.add_argument('lvol_name', help='Logical volume name', type=str)
argument = subcommand.add_argument('--resize', help='New logical volume size: 10M, 10G, 10(bytes). Can only increase.', type=size_type(), default='0', dest='resize')

def init_snapshot__replication_status(self, subparser):
subcommand = self.add_sub_command(subparser, 'replication-status', 'Lists snapshots replication status')
subcommand.add_argument('cluster_id', help='Cluster UUID', type=str)

def init_snapshot__delete_replication_only(self, subparser):
subcommand = self.add_sub_command(subparser, 'delete-replication-only', 'Delete replicated version of a snapshot')
subcommand.add_argument('snapshot_id', help='Snapshot UUID', type=str)

def init_snapshot__get(self, subparser):
subcommand = self.add_sub_command(subparser, 'get', 'Gets a snapshot information')
subcommand.add_argument('snapshot_id', help='Snapshot UUID', type=str)

def init_snapshot__set(self, subparser):
subcommand = self.add_sub_command(subparser, 'set', 'set snapshot db value')
subcommand.add_argument('snapshot_id', help='snapshot id', type=str)
subcommand.add_argument('attr_name', help='attr_name', type=str)
subcommand.add_argument('attr_value', help='attr_value', type=str)

def init_snapshot__backup(self, subparser):
subcommand = self.add_sub_command(subparser, 'backup', 'Create an S3 backup of an existing snapshot')
subcommand.add_argument('snapshot_id', help='Snapshot id', type=str)
Expand Down Expand Up @@ -1224,6 +1294,8 @@ def run(self):
ret = self.cluster__set(sub_command, args)
elif sub_command in ['change-name']:
ret = self.cluster__change_name(sub_command, args)
elif sub_command in ['add-replication']:
ret = self.cluster__add_replication(sub_command, args)
else:
self.parser.print_help()

Expand Down Expand Up @@ -1296,6 +1368,18 @@ def run(self):
ret = False
else:
ret = self.volume__migrate_cancel(sub_command, args)
elif sub_command in ['replication-start']:
ret = self.volume__replication_start(sub_command, args)
elif sub_command in ['replication-stop']:
ret = self.volume__replication_stop(sub_command, args)
elif sub_command in ['replication-status']:
ret = self.volume__replication_status(sub_command, args)
elif sub_command in ['replication-trigger']:
ret = self.volume__replication_trigger(sub_command, args)
elif sub_command in ['suspend']:
ret = self.volume__suspend(sub_command, args)
elif sub_command in ['resume']:
ret = self.volume__resume(sub_command, args)
else:
self.parser.print_help()

Expand Down Expand Up @@ -1341,8 +1425,22 @@ def run(self):
ret = self.snapshot__list(sub_command, args)
elif sub_command in ['delete']:
ret = self.snapshot__delete(sub_command, args)
elif sub_command in ['check']:
ret = self.snapshot__check(sub_command, args)
elif sub_command in ['clone']:
ret = self.snapshot__clone(sub_command, args)
elif sub_command in ['replication-status']:
ret = self.snapshot__replication_status(sub_command, args)
elif sub_command in ['delete-replication-only']:
ret = self.snapshot__delete_replication_only(sub_command, args)
elif sub_command in ['get']:
ret = self.snapshot__get(sub_command, args)
elif sub_command in ['set']:
if not self.developer_mode:
print("This command is private.")
ret = False
else:
ret = self.snapshot__set(sub_command, args)
elif sub_command in ['backup']:
ret = self.snapshot__backup(sub_command, args)
else:
Expand Down
Loading
Loading