Git Product home page Git Product logo

Comments (12)

mraineri avatar mraineri commented on August 22, 2024

Are you by any chance using a Cisco system? There is a known issue in the Redfish Python library tracked here: DMTF/python-redfish-library#111

The mockup creator uses that library, so ultimately it relies on the library to perform the logout.

from redfish-mockup-creator.

dan-m-joh avatar dan-m-joh commented on August 22, 2024

No, this is a Huawei XH620 V3 Blade.

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

By any chance did the tool capture the SessionCollection found at "/redfish/v1/SessionService/Sessions"? I'd like to compare the contents of that with the session URI the library was attempting to use to log out.

from redfish-mockup-creator.

dan-m-joh avatar dan-m-joh commented on August 22, 2024

Sadly, No.
In that directory is only one file index.json and it contains the following:

{
    "error": {
        "code": "Base.1.0.GeneralError",
        "Message": "A general error has occurred. See ExtendedInfo for more information.",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#MessageRegistry.1.0.0.MessageRegistry",
                "MessageId": "iBMC.0.1.0.InputError",
                "RelatedProperties": [],
                "Message": "Request failed.",
                "MessageArgs": [],
                "Severity": "Warning",
                "Resolution": "Incorrect URI or method."
            }
        ]
    }
}

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

How about the index.json file for the service root (/redfish/v1)?

I'm starting to wonder if there are conformance issues with this service. If you're willing, I'd like you to collect some debug information for me. I can prepare some scripts for you to run. Unfortunately I don't have access to this type of system to try it myself.

from redfish-mockup-creator.

dan-m-joh avatar dan-m-joh commented on August 22, 2024

Here is the index.json from "the root" (UUID and HostName redacted):

{
    "@odata.context": "/redfish/v1/$metadata#ServiceRoot",
    "@odata.id": "/redfish/v1/",
    "@odata.type": "#ServiceRoot.v1_0_2.ServiceRoot",
    "Id": "RootService",
    "Name": "Root Service",
    "RedfishVersion": "1.0.2",
    "UUID": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX",
    "Systems": {
        "@odata.id": "/redfish/v1/Systems"
    },
    "Chassis": {
        "@odata.id": "/redfish/v1/Chassis"
    },
    "Managers": {
        "@odata.id": "/redfish/v1/Managers"
    },
    "Tasks": {
        "@odata.id": "/redfish/v1/TaskService"
    },
    "SessionService": {
        "@odata.id": "/redfish/v1/SessionService"
    },
    "AccountService": {
        "@odata.id": "/redfish/v1/AccountService"
    },
    "EventService": {
        "@odata.id": "/redfish/v1/EventService"
    },
    "UpdateService": {
        "@odata.id": "/redfish/v1/UpdateService"
    },
    "Registries": {
        "@odata.id": "/redfish/v1/Registries"
    },
    "JsonSchemas": {
        "@odata.id": "/redfish/v1/JSONSchemas"
    },
    "Oem": {
        "Huawei": {
            "SmsUpdateService": null,
            "SecurityBanner": "WARNING! This system is PRIVATE and PROPRIETARY and may only be accessed by authorized users. Unauthorized use of the system is prohibited. The owner, or its agents, may monitor any activity or communication on the system. The owner, or its agents, may retrieve any information stored within the system. By accessing and using the system, you are consenting to such monitoring and information retrieval for law enforcement and other purposes.",
            "ProductName": "XH620 V3",
            "HostName": "xxxxxxxxx",
            "LanguageSet": "en,zh,ja,fr",
            "Copyright": "Huawei Technologies Co., Ltd. 2004-2018. All rights reserved.",
            "DomainName": null,
            "AccountLockoutDuration": 300
        }
    }
}

OK, just send me the scripts so I can review them before running them.

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

Here's the script I have to collect some info. You will need to replace BMC_IP, USERNAME, and PASSWORD with your system's information. It will output to a file to "trace.log"; there will be at least one place where it shows the username and password when establishing the session, so you will want to redact that when sending me the file (and possible portions of the response body like you did above).

import sys
import redfish
import logging
from redfish import redfish_logger

login_host = "https://BMC_IP"
login_account = "USERNAME"
login_password = "PASSWORD"
LOGGERFILE = "trace.log"
LOGGERFORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
LOGGER = redfish_logger(LOGGERFILE, LOGGERFORMAT, logging.DEBUG)

## Create a REDFISH object
REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account,
                          password=login_password, default_prefix='/redfish/v1')

# Login
REDFISH_OBJ.login(auth="session")

# Get and print service root and the session service
response = REDFISH_OBJ.get("/redfish/v1/")
print(response)
response = REDFISH_OBJ.get("/redfish/v1/SessionService")
print(response)

# Logout
REDFISH_OBJ.logout()

from redfish-mockup-creator.

dan-m-joh avatar dan-m-joh commented on August 22, 2024

Here comes the (redacted) trace.log

trace.log.gz

from redfish-mockup-creator.

dan-m-joh avatar dan-m-joh commented on August 22, 2024

Hello Mike,

Before you invest to much time in this!
I have just found out that we probable have an issue with this blade (looking at iBMC some fields (that should be filled) are empty, like Memory and some CPU info).
We will try to get an timeslot to reseat this blade sometime next week.

Sorry for the trouble!

Dan

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

Thanks! Unfortunately with the debug log, the logout was successful; the DELETE operation on the session resource returned a 200.

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

@dan-m-joh by the time you get a chance to use the system again, this tool should have a new option merged into the main build that enables the type of trace logging I had you do in the above script. Hopefully you can reproduce the issue with the new option enabled so we can capture what's going on.

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

Closing; no updates to further debug this. If new details are available and there is still an issue, please reopen and use the debug option to provide further details.

from redfish-mockup-creator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.