Bug: 'host1' is not of type 'object' validation error on correct JSON
Describe the bug
When running psconfig validate (and using pSConfig pScheduler agent) on a valid psconfig JSON file, validation fails with the error:
Error: 'host1' is not of type 'object'
This happens even though the file matches the official documentation (https://docs.perfsonar.net/psconfig_templates_intro.html) and contains the required sections.
To Reproduce
Steps to reproduce the behavior:
- Save the following as
/tmp/pscheduler-agent.json:
{
"addresses": {
"host1": { "address": "192.0.2.1" },
"host2": { "address": "192.0.2.2" }
},
"groups": {
"my_mesh": {
"type": "mesh",
"addresses": [ "host1", "host2" ]
}
},
"tests": {
"my_ping_test": {
"type": "pscheduler",
"spec": {
"test": { "type": "ping" },
"schedule": { "interval": "PT5M" }
}
}
},
"archives": {
"local-esmond": {
"archiver": "esmond",
"data": {
"url": "http://localhost/esmond/perfsonar/archive/"
}
}
},
"tasks": {
"ping_all": {
"group": "my_mesh",
"test": "my_ping_test",
"archives": [ "local-esmond" ]
}
}
}
- Run:
psconfig validate /tmp/pscheduler-agent.json
- Observe the output:
Validating JSON schema ...... FAIL
Error: 'host1' is not of type 'object'
System info
- OS: NAME="AlmaLinux" VERSION="9.5 (Teal Serval)"
- perfsonar-psconfig-utils version: 5.1.4-1.el9.noarch
- perfsonar-psconfig-pscheduler version: 5.1.4-1.el9.noarch
- Python version: Python 3.9.21
Additional context
- The JSON file is valid (checked with
python3 -m json.tool).
- The file matches the example in the official documentation.
- This error blocks the agent from accepting valid psconfig templates.
Thank you for your help!
Bug:
'host1' is not of type 'object'validation error on correct JSONDescribe the bug
When running
psconfig validate(and using pSConfig pScheduler agent) on a valid psconfig JSON file, validation fails with the error:This happens even though the file matches the official documentation (https://docs.perfsonar.net/psconfig_templates_intro.html) and contains the required sections.
To Reproduce
Steps to reproduce the behavior:
/tmp/pscheduler-agent.json:{ "addresses": { "host1": { "address": "192.0.2.1" }, "host2": { "address": "192.0.2.2" } }, "groups": { "my_mesh": { "type": "mesh", "addresses": [ "host1", "host2" ] } }, "tests": { "my_ping_test": { "type": "pscheduler", "spec": { "test": { "type": "ping" }, "schedule": { "interval": "PT5M" } } } }, "archives": { "local-esmond": { "archiver": "esmond", "data": { "url": "http://localhost/esmond/perfsonar/archive/" } } }, "tasks": { "ping_all": { "group": "my_mesh", "test": "my_ping_test", "archives": [ "local-esmond" ] } } }System info
Additional context
python3 -m json.tool).Thank you for your help!