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(control): allow specifying max_namespaces on subsystem creation #150

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

rahullepakshi
Copy link
Contributor

This PR gives user a flexibility to specify maximum number of namespaces in a subsystem

Fixes #146

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you have tried it and it works as expected?

I just was surprised to see the current behaviour you reported in #146 (i.e. max_ namespaces=32 by default). Because just glancing through the spdk code it seemed to me that if the param was not specified the default would be 0, i.e. unlimited.

control/cli.py Outdated Show resolved Hide resolved
@rahullepakshi
Copy link
Contributor Author

rahullepakshi commented Jun 6, 2023

I assume you have tried it and it works as expected?

I just was surprised to see the current behaviour you reported in #146 (i.e. max_ namespaces=32 by default). Because just glancing through the spdk code it seemed to me that if the param was not specified the default would be 0, i.e. unlimited.

Yes I did try, few observations below

From GW CLI,
`
python3 -m control.cli create_subsystem -n nqn.2016-06.io.spdk:cnode15 -s SPDK15 -m 500
INFO:main:Created subsystem nqn.2016-06.io.spdk:cnode15: True

[ubuntu@clara011 ceph-nvmeof]$ python3 -m control.cli get_subsystems
INFO:main:Get subsystems:
[
{
"nqn": "nqn.2014-08.org.nvmexpress.discovery",
"subtype": "Discovery",
"listen_addresses": [],
"allow_any_host": true,
"hosts": []
},
{
"nqn": "nqn.2016-06.io.spdk:cnode8",
"subtype": "NVMe",
"listen_addresses": [],
"allow_any_host": false,
"hosts": [],
.......
......
{
"nqn": "nqn.2016-06.io.spdk:cnode15",
"subtype": "NVMe",
"listen_addresses": [],
"allow_any_host": false,
"hosts": [],
"serial_number": "SPDK15",
"model_number": "SPDK bdev Controller",
"max_namespaces": 500,
"min_cntlid": 1,
"max_cntlid": 65519,
"namespaces": []
}
]
`

From GW server,
`INFO:control.grpc:Received request to create subsystem nqn.2016-06.io.spdk:cnode15

INFO:control.grpc:create_subsystem nqn.2016-06.io.spdk:cnode15: True

DEBUG:control.state:omap_key generated: subsystem_nqn.2016-06.io.spdk:cnode15`

Copy link
Contributor

@idryomov idryomov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change the title of the commit to follow Conventional Commits syntax as per https://github.com/ceph/ceph-nvmeof/blob/devel/CONTRIBUTING.md#commit-format.

control/cli.py Outdated Show resolved Hide resolved
@rahullepakshi rahullepakshi changed the title Adding flexibility to specify maximum namespaces in Subsystem control/cli: add maximum namespaces in subsystem creation Jun 7, 2023
@rahullepakshi rahullepakshi force-pushed the max_ns branch 2 times, most recently from d9bd88f to 7877216 Compare June 7, 2023 05:17
@rahullepakshi rahullepakshi requested a review from idryomov June 7, 2023 05:21
control/cli.py Outdated Show resolved Hide resolved
@idryomov idryomov changed the title control/cli: add maximum namespaces in subsystem creation feat(control): allow specifying max_namespaces on subsystem creation Jun 7, 2023
@idryomov
Copy link
Contributor

idryomov commented Jun 7, 2023

Need to change the title of the commit to follow Conventional Commits syntax as per https://github.com/ceph/ceph-nvmeof/blob/devel/CONTRIBUTING.md#commit-format.

@rahullepakshi I see it changed but still not in accordance with https://www.conventionalcommits.org/en/v1.0.0/#summary. I have changed the title of the PR for you, please update the title of the commit to match it.

Fixes ceph#146

Signed-off-by: rahullepakshi <rlepaksh@redhat.com>
@rahullepakshi
Copy link
Contributor Author

Need to change the title of the commit to follow Conventional Commits syntax as per https://github.com/ceph/ceph-nvmeof/blob/devel/CONTRIBUTING.md#commit-format.

@rahullepakshi I see it changed but still not in accordance with https://www.conventionalcommits.org/en/v1.0.0/#summary. I have changed the title of the PR for you, please update the title of the commit to match it.

@idryomov changed to match it. Will keep this updated going forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

User should be able to specify/update maximum number of namespaces in a subsystem during subsystem creation
3 participants