Running a dry-run breaks the socket for a running instance

10 views
Skip to first unread message

Lorenzo Arena

unread,
Oct 17, 2022, 10:17:39 AM10/17/22
to swupdate
I have a board with an A/B partitioning running swupdate with systemd (with the default mongoose server). I usually run the update from the webpage, however in some instances the update should be triggered when inserting a USB drive. In that case, before updating, I would like to execute a dryrun on the update file found in the USB drive. However, at the end of the dry-run the ctrl socket is unlinked and the systemd service is broken (the webpage tries to upload the update but receives error).

How can I manage this scenario? Shouldn't the socket creation/destruction be avoided when running a dry-run? Or maybe their path should be more configurable? As of today I have configured them in Yocto using a defconfig file for the "CONFIG_SOCKET_CTRL_PATH" macro, so the name is fixed.

Stefano Babic

unread,
Oct 17, 2022, 11:19:39 AM10/17/22
to Lorenzo Arena, swupdate
Think about how you run the dry-run. If there is a running SWUpdate as
daemon, you have to communicate the update to the running daemon instead
of running a second instance of swupdate (via "swupdate -i", what you
surely did). A second instance will use the same configuration of the
first one and it will break the IPC.

You should use swupdate-client for your purpose.

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

Lorenzo Arena

unread,
Oct 18, 2022, 1:43:22 AM10/18/22
to Stefano Babic, swupdate
Thanks! That's definitely what I was looking for.

Il giorno lun 17 ott 2022 alle ore 17:19 Stefano Babic
<sba...@denx.de> ha scritto:
--
Lorenzo Arena
Reply all
Reply to author
Forward
0 new messages