diff mbox series

After swupdate updated application completely, it don't inform to Hawkbit about successful status

Message ID 99bdde36-491a-4901-87a6-5a52b55808a0@googlegroups.com
State Not Applicable
Headers show
Series After swupdate updated application completely, it don't inform to Hawkbit about successful status | expand

Commit Message

Satou Kazuyoshi May 17, 2018, 3:12 p.m. UTC
I couldn't send the patch file by 'git send-email', so that I create new 
topic for this.

I caught the problem as below:

When Hawkbit server request to swupdate about the application need 
swupdate download the swu file and install the application.

The update was successful on the swupdate side, however swupdate did not 
announce the ACK to Hawkbit.

So that, Hawkbit still waits for the ACK to return from the swupdate.

With my little knowledge about swupdate, I created a patch file and 
attached in this topic.

Please take a look to confirm it.

Thanks and best regards
Nguyen Duc Hoa <hoand@vn.fujitsu.com>

Comments

Stefano Babic May 17, 2018, 3:37 p.m. UTC | #1
On 17/05/2018 17:12, Satou Kazuyoshi wrote:
> I couldn't send the patch file by 'git send-email', so that I create new
> topic for this.
> 
> I caught the problem as below:
> 
> When Hawkbit server request to swupdate about the application need 
> swupdate download the swu file and install the application.
> 
> The update was successful on the swupdate side, however swupdate did not
> announce the ACK to Hawkbit.
> 
> So that, Hawkbit still waits for the ACK to return from the swupdate.
> 
> With my little knowledge about swupdate, I created a patch file and
> attached in this topic.
> 
> Please take a look to confirm it.

See my first reply. You can pass the new state to SWUpdate with the -c
parameter or you can let SWUpdate does this for you, but this just work
with U-Boot if you enable CONFIG_SURICATTA_STATE_BOOTLOADER.

Best regards,
Stefano Babic
Satou Kazuyoshi May 23, 2018, 3:07 p.m. UTC | #2
Hi Stefano Babic

Thank you for your suggest. I made a monitor application for manage status 
of updating.

With option "-c", I will inform to Hawkbit about last update action.

I resolved this issue.

Many thanks
Nguyen Duc Hoa

On Thursday, May 17, 2018 at 10:37:45 PM UTC+7, Stefano Babic wrote:
>
> On 17/05/2018 17:12, Satou Kazuyoshi wrote: 
> > I couldn't send the patch file by 'git send-email', so that I create new 
> > topic for this. 
> > 
> > I caught the problem as below: 
> > 
> > When Hawkbit server request to swupdate about the application need  
> > swupdate download the swu file and install the application. 
> > 
> > The update was successful on the swupdate side, however swupdate did not 
> > announce the ACK to Hawkbit. 
> > 
> > So that, Hawkbit still waits for the ACK to return from the swupdate. 
> > 
> > With my little knowledge about swupdate, I created a patch file and 
> > attached in this topic. 
> > 
> > Please take a look to confirm it. 
>
> See my first reply. You can pass the new state to SWUpdate with the -c 
> parameter or you can let SWUpdate does this for you, but this just work 
> with U-Boot if you enable CONFIG_SURICATTA_STATE_BOOTLOADER. 
>
> Best regards, 
> Stefano Babic 
>
>
> -- 
> ===================================================================== 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk 
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany 
> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de 
> <javascript:> 
> ===================================================================== 
>
diff mbox series

Patch

From 122dd5adc4fbf1a0bfdb866394920f0ded57f41e Mon Sep 17 00:00:00 2001
From: hoand <hoand@vn.fujitsu.com>
Date: Thu, 17 May 2018 11:05:09 +0900
Subject: [PATCH 2/2] fix handle acknowledge to hawkbit server

Change from: refs/tags/2018.03

Signed-off-by: hoand <hoand@vn.fujitsu.com>
---
 suricatta/server_hawkbit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c
index ef70e4a..948d9ea 100644
--- a/suricatta/server_hawkbit.c
+++ b/suricatta/server_hawkbit.c
@@ -1299,8 +1299,8 @@  server_op_res_t server_install_update(void)
 
 	if (server_send_deployment_reply(
 		action_id, json_data_chunk_max, json_data_chunk_count,
-		reply_status_result_finished.none,
-		reply_status_execution.proceeding, 1,
+		reply_status_result_finished.success,
+		reply_status_execution.closed, 1,
 		&details[3]) != SERVER_OK) {
 		ERROR("Error while reporting installation success to "
 		      "server.\n");
-- 
2.16.2.windows.1