summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-add-sufficient-delay-to-create-fw-update-object.patch
blob: e6fd85f853a659ccb25c33c15d03a7a1a7fe6e86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From d7df47f5df9c6e389c3deeb418be8fb7c32bc6f4 Mon Sep 17 00:00:00 2001
From: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Date: Tue, 25 Aug 2020 15:44:35 +0000
Subject: [PATCH] add sufficient delay to create fw update object

Add support to increase timeoutTimeSeconds to 10 secs to allow firmware
object to create successfully to proceed for firmware update.

Tested:
Redfish validator passed.

Updated the firmware using redfish for 16 times continuously.
POST: https://<BMC_IP>/redfish/v1/UpdateService/
      with <BMC_signed_cap> binary file
firmware updated.
{
  "@odata.id": "/redfish/v1/TaskService/Tasks/0",
  "@odata.type": "#Task.v1_4_3.Task",
  "Id": "0",
  "TaskState": "Running",
  "TaskStatus": "OK"
}

Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
---
 redfish-core/lib/update_service.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 9407d75..ec5ab8c 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -363,7 +363,7 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
 static void monitorForSoftwareAvailable(
     std::shared_ptr<AsyncResp> asyncResp, const crow::Request& req,
     const std::string& url, const std::vector<std::string>& imgUriTargets,
-    int timeoutTimeSeconds = 5)
+    int timeoutTimeSeconds = 10)
 {
     // Only allow one FW update at a time
     if (fwUpdateInProgress != false)
-- 
2.17.1