Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(topology): add show labels in pools #855

Merged

Conversation

sinhaashish
Copy link
Member

@sinhaashish sinhaashish commented Sep 3, 2024

Get pool

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pool pool-on-node-1 -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

List pools

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

List Pools with node filter

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-2-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-1-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-0-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1

@sinhaashish sinhaashish marked this pull request as ready for review September 3, 2024 07:25
control-plane/plugin/src/resources/pool.rs Outdated Show resolved Hide resolved
control-plane/plugin/src/resources/pool.rs Outdated Show resolved Hide resolved
control-plane/plugin/src/resources/pool.rs Outdated Show resolved Hide resolved
control-plane/plugin/src/resources/pool.rs Outdated Show resolved Hide resolved
control-plane/plugin/src/resources/pool.rs Outdated Show resolved Hide resolved
control-plane/plugin/src/resources/pool.rs Outdated Show resolved Hide resolved
@sinhaashish sinhaashish force-pushed the show-labels-pools branch 2 times, most recently from 4790d9d to 7ba1cb7 Compare September 6, 2024 12:25
@sinhaashish
Copy link
Member Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Sep 6, 2024
855: feat(topology): add show labels in pools r=sinhaashish a=sinhaashish

Get pool 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pool pool-on-node-1 -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
```
List pools 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
 ```
List Pools with node filter
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-2-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-1-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-0-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
```


Co-authored-by: sinhaashish <[email protected]>
@bors-openebs-mayastor
Copy link

Canceled.

@sinhaashish
Copy link
Member Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Sep 6, 2024
855: feat(topology): add show labels in pools r=sinhaashish a=sinhaashish

Get pool 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pool pool-on-node-1 -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
```
List pools 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
 ```
List Pools with node filter
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-2-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-1-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-0-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
```


Co-authored-by: sinhaashish <[email protected]>
@bors-openebs-mayastor
Copy link

Canceled.

@sinhaashish
Copy link
Member Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Sep 6, 2024
855: feat(topology): add show labels in pools r=sinhaashish a=sinhaashish

Get pool 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pool pool-on-node-1 -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
```
List pools 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
 ```
List Pools with node filter
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-2-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-1-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-0-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
```


Co-authored-by: sinhaashish <[email protected]>
@sinhaashish
Copy link
Member Author

bors cancel

@bors-openebs-mayastor
Copy link

Canceled.

@sinhaashish
Copy link
Member Author

bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit a2564c1 into openebs:develop Sep 6, 2024
4 checks passed
@sinhaashish sinhaashish deleted the show-labels-pools branch September 6, 2024 13:34
sinhaashish added a commit to sinhaashish/mayastor-control-plane that referenced this pull request Sep 6, 2024
855: feat(topology): add show labels in pools r=sinhaashish a=sinhaashish

Get pool 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pool pool-on-node-1 -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
```
List pools 
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
 ```
List Pools with node filter
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-2-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-1-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-0-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
```


Co-authored-by: sinhaashish <[email protected]>
sinhaashish added a commit to sinhaashish/mayastor-control-plane that referenced this pull request Sep 6, 2024
855: feat(topology): add show labels in pools r=sinhaashish a=sinhaashish

Get pool
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pool pool-on-node-1 -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
```
List pools
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value
 ```
List Pools with node filter
```
[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-2-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-2  aio:///dev/sdb?uuid=8045fe61-ae51-429b-9c73-4f8f60c42d44  true     node-2-237668  Online  10GiB     0 B        10GiB      0 B

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-1-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-1  aio:///dev/sdb?uuid=b324aa79-c8b3-4859-a6e8-1a51fbc5d944  true     node-1-237668  Online  10GiB     0 B        10GiB      0 B        topology-key=topology-value

[nix-shell:~/code/rust/mayastor-extensions]$ ./target/debug/kubectl-mayastor get pools  -n openebs --show-labels --node  node-0-237668
 ID              DISKS                                                     MANAGED  NODE           STATUS  CAPACITY  ALLOCATED  AVAILABLE  COMMITTED  LABELS
 pool-on-node-0  aio:///dev/sdb?uuid=4b12de79-fa6c-4bfd-9ed0-4f5f57cfeb4c  true     node-0-237668  Online  10GiB     0 B        10GiB      0 B        zone=us-east-1
```

Co-authored-by: sinhaashish <[email protected]>
Signed-off-by: sinhaashish <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants