Message ID | ebdf9e3b-90ff-425d-b9d9-2396ac50c0b9@googlegroups.com |
---|---|
State | Not Applicable |
Headers | show |
Series | Issue: swupdate cannot update application in 2nd round | expand |
Hi Satou, On 17/05/2018 17:18, 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: > > In the 1st round, Hawkbit server inform to swupdate target about the > newer version application (ex: version 1.0.1). Swupdate download and > install successfully the newer version. > But, in the 2nd round, Hawkbit server inform to swupdate target about > the newest version application (ex: version 1.0.2). Swupdate download > and recognize that update process is unnecessary and do nothing. > > With my little knowledge about swupdate, I created a patch file and > attached in this topic. I think you are doing something wrong. A sane update concept should be: - Hawkbit inform SWUpdate about a new release - new release is downloaded and installed by SWUpdate In the meantime, Hawkbit can stop the update with a CancelUpdate message. This comes if you cancel the update from the GUI. This is the first part - if everything is fine, the new software is installed but *not* activated. - New Software must be activated. The easy way is by rebooting into the new software - if new software runs (and only if new software is running without issues), the procedure is completed. SWUpdate is started see parameter "-c" for suricatta) and SWUpdate sends the status to Hawkbit. - if the new software cannot be started, a fallback can happen and SWUPdate is started with a FAILURE status (even with -c parameter in suricatta, that means -u "-c <status>") and SWUpdate sends the message to Hawkbit. You are trying to force to complete the update without rebooting the target or without completing the procedure. That is wrong. > > Please take a look to confirm it. > I don't confirm, patch is wrong. > Thanks and best regards > Nguyen Duc Hoa <hoand@vn.fujitsu.com> Satou or Nguyen ? Best regards, Stefano Babic
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. >Satou or Nguyen ? I'm Nguyen. :) Many thanks Nguyen Duc Hoa On Thursday, May 17, 2018 at 10:35:26 PM UTC+7, Stefano Babic wrote: > > Hi Satou, > > On 17/05/2018 17:18, 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: > > > > In the 1st round, Hawkbit server inform to swupdate target about the > > newer version application (ex: version 1.0.1). Swupdate download and > > install successfully the newer version. > > But, in the 2nd round, Hawkbit server inform to swupdate target about > > the newest version application (ex: version 1.0.2). Swupdate download > > and recognize that update process is unnecessary and do nothing. > > > > With my little knowledge about swupdate, I created a patch file and > > attached in this topic. > > I think you are doing something wrong. A sane update concept should be: > > - Hawkbit inform SWUpdate about a new release > - new release is downloaded and installed by SWUpdate > In the meantime, Hawkbit can stop the update with a CancelUpdate > message. This comes if you cancel the update from the GUI. > This is the first part - if everything is fine, the new software is > installed but *not* activated. > > - New Software must be activated. The easy way is by rebooting into the > new software > - if new software runs (and only if new software is running without > issues), the procedure is completed. SWUpdate is started see parameter > "-c" for suricatta) and SWUpdate sends the status to Hawkbit. > - if the new software cannot be started, a fallback can happen and > SWUPdate is started with a FAILURE status (even with -c parameter in > suricatta, that means -u "-c <status>") and SWUpdate sends the message > to Hawkbit. > > You are trying to force to complete the update without rebooting the > target or without completing the procedure. That is wrong. > > > > > Please take a look to confirm it. > > > > I don't confirm, patch is wrong. > > > Thanks and best regards > > Nguyen Duc Hoa <ho...@vn.fujitsu.com <javascript:>> > > Satou or Nguyen ? > > 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:> > ===================================================================== >
Hi Nguyen, On 23/05/2018 17:08, Satou Kazuyoshi wrote: > 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. > >>Satou or Nguyen ? > I'm Nguyen. :) > > Many thanks > Nguyen Duc Hoa You're welcome. Best regards, Stefano > > On Thursday, May 17, 2018 at 10:35:26 PM UTC+7, Stefano Babic wrote: > > Hi Satou, > > On 17/05/2018 17:18, 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: > > > > In the 1st round, Hawkbit server inform to swupdate target about the > > newer version application (ex: version 1.0.1). Swupdate download and > > install successfully the newer version. > > But, in the 2nd round, Hawkbit server inform to swupdate target about > > the newest version application (ex: version 1.0.2). Swupdate download > > and recognize that update process is unnecessary and do nothing. > > > > With my little knowledge about swupdate, I created a patch file and > > attached in this topic. > > I think you are doing something wrong. A sane update concept should be: > > - Hawkbit inform SWUpdate about a new release > - new release is downloaded and installed by SWUpdate > In the meantime, Hawkbit can stop the update with a CancelUpdate > message. This comes if you cancel the update from the GUI. > This is the first part - if everything is fine, the new software is > installed but *not* activated. > > - New Software must be activated. The easy way is by rebooting into the > new software > - if new software runs (and only if new software is running without > issues), the procedure is completed. SWUpdate is started see parameter > "-c" for suricatta) and SWUpdate sends the status to Hawkbit. > - if the new software cannot be started, a fallback can happen and > SWUPdate is started with a FAILURE status (even with -c parameter in > suricatta, that means -u "-c <status>") and SWUpdate sends the message > to Hawkbit. > > You are trying to force to complete the update without rebooting the > target or without completing the procedure. That is wrong. > > > > > Please take a look to confirm it. > > > > I don't confirm, patch is wrong. > > > Thanks and best regards > > Nguyen Duc Hoa <ho...@vn.fujitsu.com <javascript:>> > > Satou or Nguyen ? > > 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:> > ===================================================================== > > -- > You received this message because you are subscribed to the Google > Groups "swupdate" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to swupdate+unsubscribe@googlegroups.com > <mailto:swupdate+unsubscribe@googlegroups.com>. > To post to this group, send email to swupdate@googlegroups.com > <mailto:swupdate@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout.
From a8d96eb446e6858e7d35c40043c0ad8d09aa40ba Mon Sep 17 00:00:00 2001 From: hoand <hoand@vn.fujitsu.com> Date: Thu, 17 May 2018 10:41:10 +0900 Subject: [PATCH 1/2] fix issue swupdate cannot update application in 2nd round Change from: refs/tags/2018.03 Signed-off-by: hoand <hoand@vn.fujitsu.com> --- suricatta/server_hawkbit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 2b06ee5..ef70e4a 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -778,7 +778,7 @@ server_op_res_t server_has_pending_action(int *action_id) INFO("Please restart SWUpdate to report the test results " "upstream."); check_action_changed(*action_id, update_action); - result = SERVER_NO_UPDATE_AVAILABLE; + reset_state((char *)STATE_KEY); } return result; -- 2.16.2.windows.1