DMTF / Redfish-Service-Validator

The Redfish Service Validator is a Python3 tool for checking conformance of any "device" with a Redfish service interface against Redfish CSDL schema
Other
37 stars 33 forks source link

Now seeing "No schema for property AssignedPrivileges" and others #585

Closed blakehilliard closed 1 month ago

blakehilliard commented 1 month ago

Just one example, I have this resource:

{
    "@odata.etag": "\"bc796d5738ff804d11302144c903cb51\"",
    "@odata.id": "/redfish/v1/AccountService/Roles/ReadOnly",
    "@odata.type": "#Role.v1_3_1.Role",
    "AssignedPrivileges": [
        "ConfigureSelf",
        "Login"
    ],
    "Id": "ReadOnly",
    "IsPredefined": true,
    "Name": "User Role ReadOnly",
    "RoleId": "ReadOnly"
}

Which results in this error being logged:

VERBOSE1 -
*** ServiceRoot -> AccountService -> Roles -> Members#3, /redfish/v1/AccountService/Roles/ReadOnly
INFO -
*** /redfish/v1/AccountService/Roles/ReadOnly
VERBOSE1 -
*** None, False
WARNING - Schema not found for Collection(Privileges.PrivilegeType)
ERROR - Property AssignedPrivileges should not be a List
INFO -   Type (Role.v1_3_1.Role), GET SUCCESS (time: 0:00:00.015606)
VERBOSE1 - Restricted
VERBOSE1 -  value: n/a <class 'str'>
VERBOSE1 -  is Optional
VERBOSE1 -  prop Does not exist, skip...
VERBOSE1 - AlternateRoleId
VERBOSE1 -  value: n/a <class 'str'>
VERBOSE1 -  is Optional
VERBOSE1 -  prop Does not exist, skip...
VERBOSE1 - RoleId
VERBOSE1 -  value: ReadOnly <class 'str'>
VERBOSE1 -  is Optional
VERBOSE1 -  Success
VERBOSE1 - Actions
VERBOSE1 -  value: n/a <class 'str'>
VERBOSE1 -  is Optional
VERBOSE1 -  prop Does not exist, skip...
VERBOSE1 - IsPredefined
VERBOSE1 -  value: True <class 'bool'>
VERBOSE1 -  is Optional
VERBOSE1 -  Success
ERROR - No Schema for property AssignedPrivileges
VERBOSE1 - OemPrivileges
VERBOSE1 -  value: n/a <class 'str'>
VERBOSE1 -  is Optional
VERBOSE1 -  prop Does not exist, skip...
VERBOSE1 - Id
VERBOSE1 -  value: ReadOnly <class 'str'>
VERBOSE1 -  Mandatory Test: OK
VERBOSE1 -  Success
VERBOSE1 - Description
VERBOSE1 -  value: n/a <class 'str'>
VERBOSE1 -  is Optional
VERBOSE1 -  prop Does not exist, skip...
VERBOSE1 - Name
VERBOSE1 -  value: User Role ReadOnly <class 'str'>
VERBOSE1 -  Mandatory Test: OK
VERBOSE1 -  Success
VERBOSE1 - Oem
VERBOSE1 -  value: n/a <class 'str'>
VERBOSE1 -  is Optional
VERBOSE1 -  prop Does not exist, skip...
VERBOSE1 - ServiceRoot -> AccountService -> Roles -> Members#3, Role.v1_3_1, Role
VERBOSE1 - @odata.etag                                             PASS
VERBOSE1 - @odata.id                                               PASS
VERBOSE1 - @odata.type                                             PASS
VERBOSE1 - AssignedPrivileges                   Exists, no schema check
VERBOSE1 - Id                                                      PASS
VERBOSE1 - IsPredefined                                            PASS
VERBOSE1 - Name                                                    PASS
VERBOSE1 - RoleId                                                  PASS
VERBOSE1 - Restricted                                          Optional
VERBOSE1 - AlternateRoleId                                     Optional
VERBOSE1 - Actions                                             Optional
VERBOSE1 - OemPrivileges                                       Optional
VERBOSE1 - Description                                         Optional
VERBOSE1 - Oem                                                 Optional
INFO -    FAIL...
VERBOSE1 - Role.v1_3_1.Role, Counter({'skipOptional': 6, 'pass': 4, 'passGet': 1, 'passRedfishUri': 1, 'errorNoSchema': 1})
VERBOSE1 - Members#3, Counter({'skipOptional': 6, 'pass': 4, 'passGet': 1, 'passRedfishUri': 1, 'errorNoSchema': 1})
VERBOSE1 - Roles, Counter({'pass': 5, 'skipOptional': 2, 'passGet': 1, 'passRedfishUri': 1})

I am seeing similar errors for:

This started yesterday, but there have been no changes to the redfish server or this tool in that time. So I wonder if this is related to some 2024.1 schema changes going live?

mraineri commented 1 month ago

Can you provide the entire text log with --debugging provided while running the tool?

blakehilliard commented 1 month ago

The part from the ConformanceLog.txt for this ReadOnly role resource with --debugging: RoleConformanceLog.txt

The SchemaFiles/metadata/Role_v1.xml it downloaded and used: Role_v1.txt (changed from .xml to .txt so github will let me add it)

I notice the comments in Role_v1.xml say it's v1.3.2, but the latest at https://redfish.dmtf.org/redfish/schema_index is v1.3.1. Further evidence that this started breaking when something from 2024.1 partially went live.

mraineri commented 1 month ago

I'd like to see the full log; there are lots of earlier statements in the log that will show schema files cached and how they're decoded.

jautor commented 1 month ago

I notice the comments in Role_v1.xml say it's v1.3.2, but the latest at https://redfish.dmtf.org/redfish/schema_index is v1.3.1. Further evidence that this started breaking when something from 2024.1 partially went live.

That's just the Redfish Developer Hub static pages that were updated once the new release was posted. While that index page was out of date for a few hours today until the site was updated, none of that should affect the schema repository or file access itself.

mraineri commented 1 month ago

Closing; DMTF site has been fully updated