Skip to content

python-common: Improve profile name string validation - #67384

Merged
rkachach merged 2 commits into
ceph:mainfrom
ashjosh1git:ceph-tracker-74986-validate-pro-name
Jun 12, 2026
Merged

rkachach merged 2 commits into
ceph:mainfrom
ashjosh1git:ceph-tracker-74986-validate-pro-name

Conversation

@ashjosh1git

@ashjosh1git ashjosh1git commented Feb 18, 2026 •

Copy link
Copy Markdown
Contributor

The fix improves the validation for profile_name string passed to ceph orch tuned-profile apply -I <os_tune.spec>

Before Fix:

With empty ‘’ profile_name
[ceph: root@ceph-node-0 /]# ceph orch tuned-profile apply -i os.tune.spec                                                                                                                                                                                                                                                             
Saved tuned profile                                                                                                                                                
[ceph: root@ceph-node-0 /]#          
                                                                                             

With no profile_name                                                                                                                                                                   

[ceph: root@ceph-node-0 /]# ceph orch tuned-profile apply -i os.tune.spec                                                                                          
Error EINVAL: Tuned profile spec must include "profile_name" field                                                                                                 
[ceph: root@ceph-node-0 /]#

After Fix with empty profile name string:

[ceph: root@ceph-node-0 /]# ceph orch tuned-profile apply -i os.tune.spec
Error EINVAL: Invalid profile_name: Must be a non-empty string.
[ceph: root@ceph-node-0 /]# cat os.tune.spec
profile_name: ''                                                                                                                                                   
placement:                                                                                                                                                         
  hosts:                                                                                                                                                           
    - ceph-node-0                                                                                                                                                  
    - ceph-node-1                                                                                                                                                  
    - ceph-node-2                                                                                                                                                  
settings:                                                                                                                                                          
  fs.file-max: 100000 
[ceph: root@ceph-node-0 /]#

With no profile_name

[ceph: root@ceph-node-0 /]# vi os.tune.spec
[ceph: root@ceph-node-0 /]# ceph orch tuned-profile apply -i os.tune.spec
Error EINVAL: Tuned profile spec must include "profile_name" field
[ceph: root@ceph-node-0 /]#
Fixes: https://tracker.ceph.com/issues/74986
Signed-off-by: Ashwin M. Joshi <[email protected]>

Fixes: https://tracker.ceph.com/issues/74986
Signed-off-by: Ashwin M. Joshi [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

13 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ashjosh1git
ashjosh1git requested a review from a team as a code owner March 4, 2026 05:46

@ashjosh1git ashjosh1git left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

comments incorporated, please review.

@ashjosh1git
ashjosh1git force-pushed the ceph-tracker-74986-validate-pro-name branch from 080aeb8 to 4311950 Compare March 4, 2026 06:46

@rkachach rkachach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes LGTM. Just a small change request.

@ashjosh1git

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@adk3798

adk3798 commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

ok to test

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@ashjosh1git
ashjosh1git force-pushed the ceph-tracker-74986-validate-pro-name branch from 25a9bb9 to c856821 Compare May 12, 2026 07:03
@ashjosh1git
ashjosh1git requested a review from rkachach May 12, 2026 07:06
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Fixes: https://tracker.ceph.com/issues/74986
Signed-off-by: Ashwin M. Joshi <[email protected]>

	src/python-common/ceph/tests/test_service_spec.py

 Conflicts:
	src/python-common/ceph/deployment/service_spec.py
@ashjosh1git
ashjosh1git force-pushed the ceph-tracker-74986-validate-pro-name branch from c856821 to e081860 Compare June 1, 2026 09:03
@ashjosh1git
ashjosh1git force-pushed the ceph-tracker-74986-validate-pro-name branch 2 times, most recently from 2e606d2 to 4dcda7f Compare June 2, 2026 09:58
@ashjosh1git
ashjosh1git requested a review from Kushal-deb June 2, 2026 11:30
Fixes: https://tracker.ceph.com/issues/74986
Signed-off-by: Ashwin M. Joshi <[email protected]>

 Conflicts:
	src/python-common/ceph/deployment/service_spec.py
	src/python-common/ceph/deployment/utils.py
@ashjosh1git
ashjosh1git force-pushed the ceph-tracker-74986-validate-pro-name branch from 4dcda7f to 7b37c21 Compare June 3, 2026 15:54

@rkachach rkachach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rkachach

rkachach commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

@rkachach
rkachach merged commit 831c5c0 into ceph:main Jun 12, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I found one or more Fixes: tags in the commit messages in

git log 831c5c0dd44b71d481ffa186e999c26fef3723f7^..831c5c0dd44b71d481ffa186e999c26fef3723f7

The referenced tickets are:

Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them.

Update Log: https://github.com/ceph/ceph/actions/runs/27410466861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants