Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Redfish] redfish/update_service/test_redfish_bmc_code_update.robot check task status failed #2229

Open
ckstyle001 opened this issue Nov 27, 2023 · 2 comments
Assignees

Comments

@ckstyle001
Copy link

ckstyle001 commented Nov 27, 2023

I use openbmc-test-automation v3.0-stable branch and run the redfish/update_service/test_redfish_bmc_code_update.robot test case.

robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:v2.12.2.all.tar --include Redfish_Code_Update_With_ApplyTime_OnResetredfish/update_service/test_redfish_bmc_code_update.robot

image

The Keyword 'Verify Task Progress State' failed after retrying for 5 minutes. The last error was: Completed != Running
Does the status of redfish update correct?
https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/update_service.hpp


I had manually used redfish command to update bmc image by image-bmc tarball

$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/octet-stream" -X POST -T v2.12.2.all.tar https://${bmc}/redfish/v1/UpdateService
{
  "@odata.id": "/redfish/v1/TaskService/Tasks/0",
  "@odata.type": "#Task.v1_4_3.Task",
  "Id": "0",
  "TaskState": "Running",
  "TaskStatus": "OK"
}

The image-bmc already untar to /run/initramfs

# ls -l /run/initramfs/
drwxr-xr-x    2 root     root          1320 Mar  9  2018 bin
drwxr-xr-x    4 root     root           260 Mar  9  2018 etc
-rw-r--r--    1 root     root      33554432 Nov 27 05:37 image-bmc
-rwxr-xr-x    1 root     root          9585 Mar  9  2018 init
-rw-r--r--    1 root     root            40 Nov 27 05:25 init-options
-rw-r--r--    1 root     root             0 Nov 27 05:25 init-options-base
drwxr-xr-x    3 root     root           340 Mar  9  2018 lib
drwxr-xr-x   18 root     root           245 Apr  5  2011 ro
drwxr-xr-x    5 root     root             0 Nov 27 05:25 rw
drwxr-xr-x    2 root     root           680 Mar  9  2018 sbin
-rwxr-xr-x    1 root     root          1917 Mar  9  2018 shutdown
-rwxr-xr-x    1 root     root          5180 Mar  9  2018 update
drwxr-xr-x    6 root     root           120 Mar  9  2018 usr
drwxr-xr-x    4 root     root            80 Mar  9  2018 var
-rw-r--r--    1 root     root           271 Mar  9  2018 whitelist

But the TaskState of task inventory still keeping on Running

$curl -H "X-Auth-Token: $token" -k https://${bmc}/redfish/v1/TaskService/Tasks/
{
  "@odata.id": "/redfish/v1/TaskService/Tasks",
  "@odata.type": "#TaskCollection.TaskCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/TaskService/Tasks/0"
    }
  ],
  "Members@odata.count": 1,
  "Name": "Task Collection"
}
$ curl -H "X-Auth-Token: $token" -k https://${bmc}/redfish/v1/TaskService/Tasks/0
{
  "@odata.id": "/redfish/v1/TaskService/Tasks/0",
  "@odata.type": "#Task.v1_4_3.Task",
  "EndTime": "2023-11-27T05:20:05+00:00",
  "Id": "0",
  "Messages": [
    {
      "@odata.type": "#Message.v1_0_0.Message",
      "Message": "The task with id 0 has started.",
      "MessageArgs": [
        "0"
      ],
      "MessageId": "TaskEvent.1.0.1.TaskStarted",
      "Resolution": "None.",
      "Severity": "OK"
    },
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request failed due to an internal service error.  The service is still operational.",
      "MessageArgs": [],
      "MessageId": "Base.1.11.0.InternalError",
      "MessageSeverity": "Critical",
      "Resolution": "Resubmit the request.  If the problem persists, consider resetting the service."
    }
  ],
  "Name": "Task 0",
  "Payload": {
    "HttpHeaders": [
      "Host: 100.100.100.64",
      "User-Agent: curl/7.68.0",
      "Accept: */*",
      "Content-Length: 33566720"
    ],
    "HttpOperation": "POST",
    "JsonBody": "null",
    "TargetUri": "/redfish/v1/UpdateService"
  },
  "PercentComplete": 0,
  "StartTime": "2023-11-27T05:20:03+00:00",
  "TaskMonitor": "/redfish/v1/TaskService/Tasks/0/Monitor",
  "TaskState": "Running",
  "TaskStatus": "OK"
}
@gkeishin
Copy link
Member

@susilsi7 please take a look into this ?

@susilsi7
Copy link
Contributor

Robot code expecting "TaskState": "Completed" under 5 mins once you upload the image to BMC.

I think you encounter some issue. I see below in your Task 0.

"Messages" -> { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.11.0.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants