Bug 2140535 - [RFE] : osd spec : orchestrator could recognise errors on indentation and provide easier inputs to user
Summary: [RFE] : osd spec : orchestrator could recognise errors on indentation and pro...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Cephadm
Version: 5.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 7.0
Assignee: Adam King
QA Contact: Manasa
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-07 05:16 UTC by Vasishta
Modified: 2023-07-17 18:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-5565 0 None None None 2022-11-07 06:03:17 UTC

Description Vasishta 2022-11-07 05:16:48 UTC
Description of problem:
In OSD spec, 
1) Had missed data_devices, orchestrator errored out saying data_devices missing
2) Had mentioned unrecognised key 'all', orchestrator helped by error'ing out saying 
Error EINVAL: Failed to validate OSD spec "osd": Feature `all` is not supported

But when data_devices was added outside without indentation, error message could have been more easier similar to above helps by orchestrator.

Version-Release number of selected component (if applicable):
16.2.10-69.el8cp

How reproducible:
Always (1/1)

Steps to Reproduce:
1. After cluster bootstrap, use below spec and try to add OSDs
service_type: osd
service_id: osd_all
service_name: osd.osd_all
placement:
  host_pattern: '*'
spec:
  osds_per_device: 2
data_devices:
  all: true

Actual results:
[ceph: root@f12-h10-000-1029u /]# ceph orch apply -i spec.yaml --dry-run
Error EINVAL: ServiceSpec: 'dict' object has no attribute 'validate'

Expected results:
ceph orchestrator to help user with easier error message to immediately know the error
something like

>> Error EINVAL: Failed to validate data_devices


Note You need to log in before you can comment on or make changes to this bug.