[{"id":1752745,"web_url":"http://patchwork.ozlabs.org/comment/1752745/","msgid":"<806ac84a-2304-a735-db5b-6cef22016d8f@denx.de>","list_archive_url":null,"date":"2017-08-21T11:54:04","subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","submitter":{"id":5771,"url":"http://patchwork.ozlabs.org/api/people/5771/","name":"Stefano Babic","email":"sbabic@denx.de"},"content":"Hi Christian,\n\nOn 18/08/2017 10:27, Christian Storm wrote:\n> Allow aborting suricatta_wait() via IPC by server_ipc()\n> returning SERVER_OK_WAKEUP.\n> \n\nThe commit message is misleading because there is a mix of Abort and\nWake-up. It is not clear if something is aborted or just waken-up.\n\nAnyway, I am missing the goal because this seems just a hack to ping the\nprocess without returning any information and without any communication\nwith the hawkbit server. One poit is that the IPC to the subprocesses\n(mainly suricatta) is poorly documented, and you can maybe already\nobtain your information from the already implemented IPC.\n\nI start to describe it - this should then land into documentation.\n\nWe have currently two IPC commands:\n\n- CMD_ACTIVATION: this is used when the confirm for a successful update\nis done outside SWUpdate.\n\nUse case: everything was fine and board reboots. After reboot, an\napplication starts with its own checks - it knows if everything is fine\nand it has to communicate this to SWUpdate.\n\nSWUPdate ist startet with \"-u -c 6\" ==> WAIT State\n\nThat means that SWUpdate just waits until a process tells him what he\nhas to do. If you are using your patch as synchronization to check if\nSWUPdate is running, you are just quite good served. SWUpdate won't go\non and it stops until you send a IPC.\n\nThe CMD_ACTIVATION will then send the result of the last update, and\nthis result is forwarded to Hawkbit, moving the state machine. SWUpdate\nwill leave the WAIT state and go the \"normal\" (check for update state\".\n\n- CMD_CONFIG: used to tune some parameters. Up now, it is just for\npolling, but it can be extended with other cases.\n\nYour use case seems just to know \"is SWUpdate running ?\", and it looks\ntoo less to introduce a new (undocumented) IPC command.\n\n> Signed-off-by: Christian Storm <christian.storm@siemens.com>\n> ---\n>  include/network_ipc.h         |  3 ++-\n>  include/suricatta/suricatta.h |  1 +\n>  suricatta/server_hawkbit.c    | 23 ++++++++++-------------\n>  suricatta/suricatta.c         |  6 +++++-\n>  4 files changed, 18 insertions(+), 15 deletions(-)\n> \n> diff --git a/include/network_ipc.h b/include/network_ipc.h\n> index e0d6672..9cd947b 100644\n> --- a/include/network_ipc.h\n> +++ b/include/network_ipc.h\n> @@ -37,7 +37,8 @@ typedef enum {\n>  \n>  enum {\n>  \tCMD_ACTIVATION,\n> -\tCMD_CONFIG\n> +\tCMD_CONFIG,\n> +\tCMD_WAKEUP\n>  };\n>  \n>  typedef union {\n> diff --git a/include/suricatta/suricatta.h b/include/suricatta/suricatta.h\n> index c04aff4..2419d8c 100644\n> --- a/include/suricatta/suricatta.h\n> +++ b/include/suricatta/suricatta.h\n> @@ -44,6 +44,7 @@ typedef enum {\n>  \n>  typedef enum {\n>  \tSERVER_OK,\n> +\tSERVER_OK_WAKEUP,\n>  \tSERVER_EERR,\n>  \tSERVER_EBADMSG,\n>  \tSERVER_EINIT,\n> diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c\n> index 605733f..6550835 100644\n> --- a/suricatta/server_hawkbit.c\n> +++ b/suricatta/server_hawkbit.c\n> @@ -871,6 +871,7 @@ static server_op_res_t handle_feedback(int action_id, server_op_res_t result,\n>  \n>  \tswitch (result) {\n>  \tcase SERVER_OK:\n> +\tcase SERVER_OK_WAKEUP:\n>  \tcase SERVER_ID_REQUESTED:\n>  \tcase SERVER_UPDATE_CANCELED:\n>  \tcase SERVER_NO_UPDATE_AVAILABLE:\n> @@ -1193,6 +1194,7 @@ server_op_res_t server_install_update(void)\n>  \tcase SERVER_UPDATE_AVAILABLE:\n>  \tcase SERVER_ID_REQUESTED:\n>  \tcase SERVER_OK:\n> +\tcase SERVER_OK_WAKEUP:\n>  \t\tbreak;\n>  \tcase SERVER_EERR:\n>  \tcase SERVER_EBADMSG:\n> @@ -1916,12 +1918,11 @@ static server_op_res_t server_configuration_ipc(ipc_message *msg)\n>  server_op_res_t server_ipc(int fd)\n>  {\n>  \tipc_message msg;\n> -\tserver_op_res_t result = SERVER_OK;\n> -\tint ret;\n> +\tserver_op_res_t result;\n>  \n> -\tret = read(fd, &msg, sizeof(msg));\n> -\tif (ret != sizeof(msg))\n> +\tif (read(fd, &msg, sizeof(msg)) != sizeof(msg)) {\n>  \t\treturn SERVER_EERR;\n> +\t}\n>  \n>  \tswitch (msg.data.instmsg.cmd) {\n>  \tcase CMD_ACTIVATION:\n> @@ -1930,23 +1931,19 @@ server_op_res_t server_ipc(int fd)\n>  \tcase CMD_CONFIG:\n>  \t\tresult = server_configuration_ipc(&msg);\n>  \t\tbreak;\n> +\tcase CMD_WAKEUP:\n> +\t\tresult = SERVER_OK_WAKEUP;\n> +\t\tbreak;\n>  \tdefault:\n>  \t\tresult = SERVER_EERR;\n>  \t\tbreak;\n>  \t}\n>  \n> -\tif (result == SERVER_EERR) {\n> -\t\tmsg.type = NACK;\n> -\t} else\n> -\t\tmsg.type = ACK;\n> -\n> +\tmsg.type = (result == SERVER_EERR) ? NACK : ACK;\n>  \tmsg.data.instmsg.len = 0;\n> -\n>  \tif (write(fd, &msg, sizeof(msg)) != sizeof(msg)) {\n>  \t\tTRACE(\"IPC ERROR: sending back msg\");\n>  \t}\n>  \n> -\t/* Send ipc back */\n> -\n> -\treturn SERVER_OK;\n> +\treturn result;\n>  }\n> diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c\n> index b520978..e1b161b 100644\n> --- a/suricatta/suricatta.c\n> +++ b/suricatta/suricatta.c\n> @@ -47,7 +47,11 @@ int suricatta_wait(int seconds)\n>  \t}\n>  \tif (retval && FD_ISSET(sw_sockfd, &readfds)) {\n>  \t\tTRACE(\"Suricatta woke up for IPC at %ld seconds\", tv.tv_sec);\n> -\t\tif (server.ipc(sw_sockfd) != SERVER_OK){\n> +\t\tserver_op_res_t result = server.ipc(sw_sockfd);\n> +\t\tif (result == SERVER_OK_WAKEUP) {\n> +\t\t\treturn 0;\n> +\t\t}\n\nI think that this breaks the concept. Suricatta (as standalone daemone)\nshould not know what the single servers (even if we have just\nserver_hawkbit) are doing. The logic should be in server hawkbit and not\nhere, if necessary.\n\nBest regards,\nStefano","headers":{"Return-Path":"<swupdate+bncBAABBZET5PGAKGQERWADT2A@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:400c:c0c::238;\n\thelo=mail-wr0-x238.google.com;\n\tenvelope-from=swupdate+bncbaabbzet5pgakgqerwadt2a@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"ad7SfBCu\"; dkim-atps=neutral"],"Received":["from mail-wr0-x238.google.com (mail-wr0-x238.google.com\n\t[IPv6:2a00:1450:400c:c0c::238])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xbXCr09ppz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 21 Aug 2017 21:54:15 +1000 (AEST)","by mail-wr0-x238.google.com with SMTP id z91sf3882358wrc.2\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 21 Aug 2017 04:54:15 -0700 (PDT)","by 10.25.157.83 with SMTP id g80ls274648lfe.17.gmail; Mon, 21 Aug\n\t2017 04:54:11 -0700 (PDT)","from mail-out.m-online.net (mail-out.m-online.net.\n\t[2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id\n\ta195si2588398wme.4.2017.08.21.04.54.11\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 21 Aug 2017 04:54:11 -0700 (PDT)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xbXCl40fzz1r0ql;\n\tMon, 21 Aug 2017 13:54:11 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xbXCl3GW3z3j37P;\n\tMon, 21 Aug 2017 13:54:11 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id 6VMgeTixjn7S; Mon, 21 Aug 2017 13:54:09 +0200 (CEST)","from babic.homelinux.org\n\t(host-88-217-136-221.customer.m-online.net [88.217.136.221])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPS;\n\tMon, 21 Aug 2017 13:54:09 +0200 (CEST)","from localhost (mail.babic.homelinux.org [127.0.0.1])\n\tby babic.homelinux.org (Postfix) with ESMTP id C6BB24540535;\n\tMon, 21 Aug 2017 13:54:07 +0200 (CEST)","from babic.homelinux.org ([127.0.0.1])\n\tby localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id beGmSFBw5fZe; Mon, 21 Aug 2017 13:54:05 +0200 (CEST)","from [192.168.178.132] (papero.fritz.box [192.168.178.132])\n\tby babic.homelinux.org (Postfix) with ESMTP id E003345401BB;\n\tMon, 21 Aug 2017 13:54:04 +0200 (CEST)"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503316452; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=QNZBAkdMChJd1cL+8iz8MB9ZtMSPpYunpUwBYugQ6SbeT/szLgHblScXuDoXDzIS6M\n\tV3QB8HwskIWWBKhQfv31UEC2gkmu3xNzInnVDcm/eNqL1QkEr+H1QvOrUsTnRenUVHAg\n\tT4g6fopg6SmNTGryRwZrLQsIY99DdyHezH2IOgYYmdXHW41JkhmzoBgMdHKJlV6at0bG\n\tPMUXgRDEcS+m1DTs9fCpn+P+Bf7coXumUY1OR4Kc4yOWArouX2j5Ix8rKYwho/jYKOwy\n\tvvZeZkAOQRPwBlk4AKD+Guveruul6gTJEop41fKrCb5D9jnEnHv69T0Li3oO27Z1X1KQ\n\tOK3g==","i=1; a=rsa-sha256; t=1503316451; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=j5NW5HGGH3AeSDXqjHtj2g8OUyr3rQ8M/wYMQiivHDlYoCytO/QVcVQQwqJCJxN2yB\n\tMmN8BUObiTz8YpA9X/FJslhHROaemAM7d9N9y2yJalk4Vtx5KDrf1k1or+bC1WCdAXIW\n\tTbw0mS5bAzDIGm8sTPZPgvf8KTxTnxqYeWdmNjtHuILqyXWhYN6mn/kPdYTF0V7Vi2r4\n\tp+RJ4ZmBw5zvPkdPxTjfjtAg+O8GX8vC/C+oTlZswPqsjAQq/TjWZqkxJBdH+PbdR6YC\n\tRS8I9h1pDQD04GU/RnioRCNFvemMjBkLKH7+tK6F6BrKvWlOxpBGxYzr9O/F5W0kndHy\n\tU0uQ=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:content-language:in-reply-to\n\t:mime-version:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=wQ62l8K/MVmlvEODTxYJ1dbqW55xAmUdxAvFKLiUBwo=;\n\tb=VimmdmUzs1hW8jfuCXYqfFQ4UKuxfSu0UXrp+ULG14s7+p56k8S8yG0VorhRsFxl+m\n\t7Ec6VgLGJtWjYP4NU5U2Q0oMLLpouwuxdAXfR3W8FtFrlL2RQDp32aw2TzrNVNKbDdG4\n\tbSJNuDKSl9F9svs+JFe2+PAYk5U60wQgQQ1EZQBIoOtnbCGS7Dt9oGCQhp42BYavZzZ6\n\tHXIMctzrnHDFYsW4bQbCj6nKJWIjjTmGuvuQrqGf6i7pZov6i84OPGx7rcewzEeZrCZ6\n\t/SYnJhoawYAqGm0szjiZ4Wq8MxUDyooiSfPf7qsM/x1n6KxX3BYRLtFGzWtlGhoBK8Zs\n\teb5Q==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=content-transfer-encoding:content-language:in-reply-to:mime-version\n\t:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results;\n\tbh=JTW41A7p55kjYH+r33LI+QTb8FjQHlZGKVrZCUKxWi0=;\n\tb=qgvr9UwVwlmOzfpt9z2uAKqRSfWmYjHiHUIkGe3dtbVeAvf2JZIQIrrnumrQ7APm9F\n\tXG+GDB5MAGchz0diGTMkiZqhzqoXW8tcLbWXedz6O7C2OqwU9SNt5xBRP/QqKdn1lOFj\n\tbgAzAmhnTI7D+bYHaTELuon4RUt9N+6eFXjKvJJPqaa56Njn0ReHw6CoENzn+JcsrSiH\n\ttIowAyzCLANEfxMAVBgMQcvjLGcIv3oONcO7auGg1afKthXXViJW8GSUTFkQQ1igQZ5o\n\tGATRLVeFANMR1GbPtv3q40pAEd1W48uASTkNAPYEht15BfikBpkhCwqVnQGIiUhqi0KY\n\tggwQ=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted\n\tnor denied by best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted\n\tnor denied by best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:subject:to:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=wQ62l8K/MVmlvEODTxYJ1dbqW55xAmUdxAvFKLiUBwo=;\n\tb=ad7SfBCu5rWeNghwdE7t5dKKKW9clH3NuUkQthyE556F6v1UUTf6t+Oe2t95pFAfUj\n\tr8wF73TP34uVBCbtXbi00f0DVvy6t+cOgRGQuTdUtsUWuG7iThYFlTj1h31mf5XweTiI\n\t5YmhIN109ipwhCodHWfwBWG8zBd99qVQ1DR9priWDzkRooYDKPZvbjQAdTKFMpxjCn3J\n\tjTQjF3X5Oaozf/vfU4yihO7Y1SUbmbghfCgOHI1dJ+rivnavtCfx0RKItehvsDcmf0le\n\tFYBgtCBC8aKMuTy1N/JiqIxg3bBsj2997eADAztDAHtSbF4dtilm22LGiRgTcykGp6Ri\n\tozew==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:subject:to:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:x-spam-checked-in-group:list-post:list-help\n\t:list-archive:list-subscribe:list-unsubscribe;\n\tbh=wQ62l8K/MVmlvEODTxYJ1dbqW55xAmUdxAvFKLiUBwo=;\n\tb=erjCItoQOgX2hJYTkYNRV6D60sUJi2z4aBq0/IbfKQoTXHAqzi8ZFKPkH1EVDKxxAr\n\t4OuzcKf6yAX6z/1TLPYnUJYt7i7VgkcASVPZO0dFWGe0U7OiXhYrK8pc1L2Ig3P1bTDo\n\tmNobdnCTJPY6u9718yPT0sHc4B/3A312RdF+ABdR0J/YWhni9sfyQuttjaxg7xYovqSE\n\tsgb0HhdYV5g7/N0V3TSRdP8e3yJA39X7zprlezfHbsbvpX+VIBLN05jfgCkr6Y2Ne5+N\n\tBOukTw9PyGWUuRiT/YZeLecv6auO4sOpX4eXL+0o0eI0TcSypzEAOX1VLxwhoNnC+W09\n\tIqSw==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5jJCQPlj3oWfq8OiLcu0YzEamCW8mwakVYghkYwzoxzafT6V2/t\n\tU3KnKsu61helyA==","X-Received":["by 10.46.81.90 with SMTP id b26mr33578lje.2.1503316452423;\n\tMon, 21 Aug 2017 04:54:12 -0700 (PDT)","by 10.46.19.26 with SMTP id 26mr2272535ljt.25.1503316451891;\n\tMon, 21 Aug 2017 04:54:11 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither\n\tpermitted nor denied by best guess record for domain of\n\tsbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; ","X-Virus-Scanned":["amavisd-new at mnet-online.de","Debian amavisd-new at babic.homelinux.org"],"Subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","To":"Christian Storm <christian.storm@siemens.com>, swupdate@googlegroups.com","References":"<20170818082704.11873-1-christian.storm@siemens.com>","From":"Stefano Babic <sbabic@denx.de>","Message-ID":"<806ac84a-2304-a735-db5b-6cef22016d8f@denx.de>","Date":"Mon, 21 Aug 2017 13:54:04 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170818082704.11873-1-christian.storm@siemens.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Language":"en-GB","X-Original-Sender":"sbabic@denx.de","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied\n\tby best\n\tguess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1752876,"web_url":"http://patchwork.ozlabs.org/comment/1752876/","msgid":"<20170821134523.5l7oanyu5civ4szf@MD1KR9XC.ww002.siemens.net>","list_archive_url":null,"date":"2017-08-21T13:45:23","subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","submitter":{"id":72180,"url":"http://patchwork.ozlabs.org/api/people/72180/","name":"Storm, Christian","email":"christian.storm@siemens.com"},"content":"Hi Stefano,\n\n> On 18/08/2017 10:27, Christian Storm wrote:\n> > Allow aborting suricatta_wait() via IPC by server_ipc()\n> > returning SERVER_OK_WAKEUP.\n> > \n> \n> The commit message is misleading because there is a mix of Abort and\n> Wake-up. It is not clear if something is aborted or just waken-up.\n> \n> Anyway, I am missing the goal because this seems just a hack to ping the\n> process without returning any information and without any communication\n> with the hawkbit server. One poit is that the IPC to the subprocesses\n> (mainly suricatta) is poorly documented, and you can maybe already\n> obtain your information from the already implemented IPC.\n> \n> I start to describe it - this should then land into documentation.\n> \n> We have currently two IPC commands:\n> \n> - CMD_ACTIVATION: this is used when the confirm for a successful update\n> is done outside SWUpdate.\n> \n> Use case: everything was fine and board reboots. After reboot, an\n> application starts with its own checks - it knows if everything is fine\n> and it has to communicate this to SWUpdate.\n> \n> SWUPdate ist startet with \"-u -c 6\" ==> WAIT State\n> \n> That means that SWUpdate just waits until a process tells him what he\n> has to do. If you are using your patch as synchronization to check if\n> SWUPdate is running, you are just quite good served. SWUpdate won't go\n> on and it stops until you send a IPC.\n> \n> The CMD_ACTIVATION will then send the result of the last update, and\n> this result is forwarded to Hawkbit, moving the state machine. SWUpdate\n> will leave the WAIT state and go the \"normal\" (check for update state\".\n> \n> - CMD_CONFIG: used to tune some parameters. Up now, it is just for\n> polling, but it can be extended with other cases.\n> \n> Your use case seems just to know \"is SWUpdate running ?\", and it looks\n> too less to introduce a new (undocumented) IPC command.\n\n\nAh, OK, the commit message is misleading :)\nThe intention for this patch was to create the ability to send a wake up\ncall to suricatta while it is sleeping in order to abort the sleep and\nresume work immediately. Something along the lines of waking up a daemon\nvia UNIX signal but for suricatta and via its IPC. The motivation was that,\nsay, suricatta sleeps and then some external trigger comes in so that\nsuricatta should resume operation immediately.\n\n\n> [....]\n> > diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c\n> > index b520978..e1b161b 100644\n> > --- a/suricatta/suricatta.c\n> > +++ b/suricatta/suricatta.c\n> > @@ -47,7 +47,11 @@ int suricatta_wait(int seconds)\n> >  \t}\n> >  \tif (retval && FD_ISSET(sw_sockfd, &readfds)) {\n> >  \t\tTRACE(\"Suricatta woke up for IPC at %ld seconds\", tv.tv_sec);\n> > -\t\tif (server.ipc(sw_sockfd) != SERVER_OK){\n> > +\t\tserver_op_res_t result = server.ipc(sw_sockfd);\n> > +\t\tif (result == SERVER_OK_WAKEUP) {\n> > +\t\t\treturn 0;\n> > +\t\t}\n> \n> I think that this breaks the concept. Suricatta (as standalone daemone)\n> should not know what the single servers (even if we have just\n> server_hawkbit) are doing. The logic should be in server hawkbit and not\n> here, if necessary.\n\nOK, then suricatta has to become a supervisor process for the server\nprocesses, right? Currently, suricatta.c sleeps and calls out to the\nserver implementation, i.e., for now hawkbit. This way, suricatta.c can\nthen forward such IPC to the multiple server implementations.\n\n\nKind regards,\n   Christian","headers":{"Return-Path":"<swupdate+bncBDD6BWV65QPBB2OI5PGAKGQEWOR3EXY@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::23b;\n\thelo=mail-lf0-x23b.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbb2oi5pgakgqewor3exy@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"M0D7WUpt\"; dkim-atps=neutral"],"Received":["from mail-lf0-x23b.google.com (mail-lf0-x23b.google.com\n\t[IPv6:2a00:1450:4010:c07::23b])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xbZkP2dPqz9rxm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 21 Aug 2017 23:47:24 +1000 (AEST)","by mail-lf0-x23b.google.com with SMTP id a5sf4031991lfb.3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 21 Aug 2017 06:47:24 -0700 (PDT)","by 10.25.20.158 with SMTP id 30ls613591lfu.7.gmail;\n\tMon, 21 Aug 2017 06:47:21 -0700 (PDT)","from goliath.siemens.de (goliath.siemens.de. [192.35.17.28])\n\tby gmr-mx.google.com with ESMTPS id\n\tm78si3059481wmg.5.2017.08.21.06.47.21\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 21 Aug 2017 06:47:21 -0700 (PDT)","from mail1.siemens.de (mail1.siemens.de [139.23.33.14])\n\tby goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v7LDlLYC021608\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Mon, 21 Aug 2017 15:47:21 +0200","from localhost ([139.25.68.253])\n\tby mail1.siemens.de (8.15.2/8.15.2) with ESMTPS id v7LDlKVQ008791\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)\n\tfor <swupdate@googlegroups.com>; Mon, 21 Aug 2017 15:47:21 +0200"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503323242; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=MTGW/FTQe5j9RGhhn6E3rNKC7tT0KWabyJoRulRYvYsZMmrUyPMfD3JZBvZqBruaFY\n\td5QnZU8ID89qeCcp/nlo5EteBzZfgtlsk/82jXHSuT9SjIWKodtAsh7AyKWdPy0JjRkF\n\tg55xUO7aDjGLEDrRCFKQ4dyigl5P68SJfXq68wyZ/rL0G6A0/TmbN3DNPTQejhB9OCiQ\n\taVaOxbshyCfHqd0IFv+/dBxJ+zK3gfWlsXiZu3RbYFC7lUD+o4Ki2RgbHm9cpD70Uy7j\n\ttF8T9NmToxNJXVWG1H1/pIrJQXX7MdoImkFC/zqhUh1gxNTdkFWXCHd1QdCdsH7jxo8C\n\t2sUw==","i=1; a=rsa-sha256; t=1503323241; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=y4NAc6S4WW71rf4jOKiV68dDL3Pidt+Lrve40fWkcjwntU2gNQkvY3AUgo1NUX8Xy/\n\tX/NBZZXiGRJHH3Pk74IJpv68cQfWGhB/ZN/WOhsfkXcpvPgNBQnbFFGhy5uvwlwmg5hb\n\t4nipUk75EsZ7TWN8FQvtk5uAgtVL4Maw6KPkZpTEN4b3Ef5aa+KdX1pKPxC+7QKe77my\n\t5VPVil5Ofuudz5yAJpeYkzHhs3lmL23NJzEsQWdNbMl+IPZs03gJgjKA8iiBFNcDfLA2\n\tzsRTLkvUn4S/UYjXruFgFEjn1FOr20Q8lO8mq3fJSaxVan/ZB/KUiOdgxJwaVHssQ6fP\n\tB49g=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:user-agent:in-reply-to\n\t:content-transfer-encoding:content-disposition:mime-version\n\t:mail-followup-to:message-id:subject:to:from:date\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=+fN9RecJwGK+gxFynADeFdgbUKKNTRl2XKX1LtQaMuo=;\n\tb=kUntC0JrH7MQlbeqKZh0Noed2yaRN55i9YjaHukY+HagWCprdk6M61XfGRSmJsB5RY\n\t/lr9rXx+VbNcbI4Qcgh2z9UMkk5u/Df4sAqJhNe/ezoxTT6g/wK4Bi2jFGau2uYfrP1W\n\tnwqj4g0ouITxn1WR6Y8v7fFb99z3aqUEslGAqEcspLPuRoMUzFKzmR7StUKwwDHXnwmv\n\tEDCIwe5RTa2jc40D2LwtJk0YfHB792ZpwFIEVkDhfbTx2EEPI1CxzO0BPpyHl5/sch+4\n\tSf/So7kyyyWVXpqb+vGecE9UF3wIH/Q4MnaerbUwvDKGThQK82JgiSaeoVdCZCLXyalM\n\tLA5Q==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=user-agent:in-reply-to:content-transfer-encoding\n\t:content-disposition:mime-version:mail-followup-to:message-id\n\t:subject:to:from:date:arc-authentication-results;\n\tbh=gzhLfCzjnChx10Vo6g1jEQ7tDGFFJIX2T64l46x7nRU=;\n\tb=YQv3HdmF6BVuLK1n3BeRBKUCRRS5tiACfE+KyCXqEFXPEuzco+m7V2l4/m69/77gxQ\n\tdzILeYLYec1zNVaD2IrmSvFAq//xr4P8BXw9ehS1BDMyJE2plAYmud2aTa1TfctWWGyV\n\tVfSl/zIMuSXY3psxHHtiuFhb4WqWipLQsKHowOpeN0tkfCh0hkT1GmURKw2yiRX/WUgk\n\tQIhzUQgdAC1VXxoDClVT6Ke2AItJhYdJoqXp7BCSaneYmCxhKJJVb9bboiDIyj79O6Rr\n\tseqoRXL2+wjiVU9EKF2hhnGcP004Z2Ol481Shy/E4/l0qlJdy6s7V+qRH3plM44JAaSA\n\toziA=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:date:from:to:subject:message-id:mail-followup-to\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=+fN9RecJwGK+gxFynADeFdgbUKKNTRl2XKX1LtQaMuo=;\n\tb=M0D7WUptqXMUWfhmB4ey9mNmA/F5Ui4X3Xhk11/h1F9Hv2OIx+wKexu90gvscisbis\n\tM/wSj9KEYVSqzfu676Lf7Iawv/TRgYBjhpFBNbchhCDh5D7R+UjLBKwJgpELNfh5Tj9D\n\tpEF8/tjCc3bKdYme7qjSmRoJz/9ctESwfuLKD5jr0IUKwNgrwQkg/i9yeJ09WxsRwE3m\n\tf7NDT1+akfdbjzDEBaoQE8lg1B61iRG0rr2Fs+wYtncAQarjxkISh4iTJTiC8w9GTmlE\n\tNKvMhx+jFHejwq9SCKQhmQEBwZFjjkiZ9HKaHm76FH2VghvYma+IR9o0JkLDSvVYKU8k\n\t8ehQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:date:from:to:subject:message-id\n\t:mail-followup-to:mime-version:content-disposition\n\t:content-transfer-encoding:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:x-spam-checked-in-group:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=+fN9RecJwGK+gxFynADeFdgbUKKNTRl2XKX1LtQaMuo=;\n\tb=ThkRUg+Oa0dy3APSb7eoDrnRVe1aPYGz391d72wEFkkdMunTwrLqZw+3lW3Dt533xc\n\tGFZoG0mPhCVRlUjA5vC7OCAqWWdLe/XdNzn/QgZR8/1mjTakUqUGQnnZmgBs7tNYZQ/e\n\t8GI/RPQoVeL5OHDKESToWzLwLrTZdJRdOmAKMmt0EQV5FxdqE5QWFrHwX7DTsJFa6bNX\n\tfGFHLnFo5Uc6c9x5dnUI0KbZbBKFTLGKCWPPytndntgbNbbzKQEd9VzAMvX3Bnjpx4lh\n\tnbmkXru9krJPd4u29XLGbJUvLo5tThu6FjCJFrukLZCR/Fkl4+YPzLYdpf9GJc4R5jkT\n\tfv/Q==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5g3zXG9TVarlkNBuOyeIBmtKQiSRWhTp2jmu+s6eVM2BIvTtLkw\n\tr8got63HRXTVKA==","X-Received":["by 10.25.40.148 with SMTP id o142mr22892lfo.3.1503323242159;\n\tMon, 21 Aug 2017 06:47:22 -0700 (PDT)","by 10.25.29.148 with SMTP id d142mr670121lfd.29.1503323241470;\n\tMon, 21 Aug 2017 06:47:21 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 192.35.17.28 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.28; ","Date":"Mon, 21 Aug 2017 15:45:23 +0200","From":"Christian Storm <christian.storm@siemens.com>","To":"swupdate@googlegroups.com","Subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","Message-ID":"<20170821134523.5l7oanyu5civ4szf@MD1KR9XC.ww002.siemens.net>","Mail-Followup-To":"swupdate@googlegroups.com","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Disposition":"inline","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<806ac84a-2304-a735-db5b-6cef22016d8f@denx.de>","User-Agent":"Mutt/20170113 (1.7.2)","X-Original-Sender":"christian.storm@siemens.com","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.28 is neither permitted nor denied by best\n\tguess\n\trecord for domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1752894,"web_url":"http://patchwork.ozlabs.org/comment/1752894/","msgid":"<2ae4fac6-04fc-a0b3-02c9-0192de20005d@denx.de>","list_archive_url":null,"date":"2017-08-21T14:04:23","subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","submitter":{"id":5771,"url":"http://patchwork.ozlabs.org/api/people/5771/","name":"Stefano Babic","email":"sbabic@denx.de"},"content":"Hi Christian,\n\nOn 21/08/2017 15:45, Christian Storm wrote:\n> Hi Stefano,\n> \n>> On 18/08/2017 10:27, Christian Storm wrote:\n>>> Allow aborting suricatta_wait() via IPC by server_ipc()\n>>> returning SERVER_OK_WAKEUP.\n>>>\n>>\n>> The commit message is misleading because there is a mix of Abort and\n>> Wake-up. It is not clear if something is aborted or just waken-up.\n>>\n>> Anyway, I am missing the goal because this seems just a hack to ping the\n>> process without returning any information and without any communication\n>> with the hawkbit server. One poit is that the IPC to the subprocesses\n>> (mainly suricatta) is poorly documented, and you can maybe already\n>> obtain your information from the already implemented IPC.\n>>\n>> I start to describe it - this should then land into documentation.\n>>\n>> We have currently two IPC commands:\n>>\n>> - CMD_ACTIVATION: this is used when the confirm for a successful update\n>> is done outside SWUpdate.\n>>\n>> Use case: everything was fine and board reboots. After reboot, an\n>> application starts with its own checks - it knows if everything is fine\n>> and it has to communicate this to SWUpdate.\n>>\n>> SWUPdate ist startet with \"-u -c 6\" ==> WAIT State\n>>\n>> That means that SWUpdate just waits until a process tells him what he\n>> has to do. If you are using your patch as synchronization to check if\n>> SWUPdate is running, you are just quite good served. SWUpdate won't go\n>> on and it stops until you send a IPC.\n>>\n>> The CMD_ACTIVATION will then send the result of the last update, and\n>> this result is forwarded to Hawkbit, moving the state machine. SWUpdate\n>> will leave the WAIT state and go the \"normal\" (check for update state\".\n>>\n>> - CMD_CONFIG: used to tune some parameters. Up now, it is just for\n>> polling, but it can be extended with other cases.\n>>\n>> Your use case seems just to know \"is SWUpdate running ?\", and it looks\n>> too less to introduce a new (undocumented) IPC command.\n> \n> \n> Ah, OK, the commit message is misleading :)\n> The intention for this patch was to create the ability to send a wake up\n> call to suricatta while it is sleeping in order to abort the sleep and\n> resume work immediately. Something along the lines of waking up a daemon\n> via UNIX signal but for suricatta and via its IPC.\n\nright - instead of UNIX signals, the server is triggered via IPC.\n\n> The motivation was that,\n> say, suricatta sleeps and then some external trigger comes in so that\n> suricatta should resume operation immediately.\n\nI do this in two ways:\n\n- at the startup: swupdate started with -u \"-c 6\" (WAIT) and it blocks\nuntil I send a IPC message.\n\n- during \"normal\" activities: I send a \"CONFIG\" ipc (that wakes up\nsuricatta immediately) with a low value for \"polling\". Value is active\nafter server_hawkbit process the IPC. And when I do not need that\nsuricatta processes immediately, Isend a further CONFIG increasing the\npolling (or the \"polling\" value set by hawkbit will be taken).\n\n\n> \n> \n>> [....]\n>>> diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c\n>>> index b520978..e1b161b 100644\n>>> --- a/suricatta/suricatta.c\n>>> +++ b/suricatta/suricatta.c\n>>> @@ -47,7 +47,11 @@ int suricatta_wait(int seconds)\n>>>  \t}\n>>>  \tif (retval && FD_ISSET(sw_sockfd, &readfds)) {\n>>>  \t\tTRACE(\"Suricatta woke up for IPC at %ld seconds\", tv.tv_sec);\n>>> -\t\tif (server.ipc(sw_sockfd) != SERVER_OK){\n>>> +\t\tserver_op_res_t result = server.ipc(sw_sockfd);\n>>> +\t\tif (result == SERVER_OK_WAKEUP) {\n>>> +\t\t\treturn 0;\n>>> +\t\t}\n>>\n>> I think that this breaks the concept. Suricatta (as standalone daemone)\n>> should not know what the single servers (even if we have just\n>> server_hawkbit) are doing. The logic should be in server hawkbit and not\n>> here, if necessary.\n> \n> OK, then suricatta has to become a supervisor process for the server\n> processes, right?\n\nRight, this is the concept. It is just the daemon / supervisor without\nany knowledge of the current server implementation.\n\n> Currently, suricatta.c sleeps and calls out to the\n> server implementation, i.e., for now hawkbit.\n\nFor now just Hawkbit. In the future, we can add multiple implementations\nand we could also think if all these implementations are allowed to run\nat the same time. IMHO several implementatiosn is just a question of\ntime, when someone will require further backend to be supported.\nMultiple instances at once is maybe not a use case.\n\n> This way, suricatta.c can\n> then forward such IPC to the multiple server implementations.\n\nRight.\n\nBest regards,\nStefano","headers":{"Return-Path":"<swupdate+bncBAABB3GQ5PGAKGQEDRKE3TQ@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::23d;\n\thelo=mail-lf0-x23d.google.com;\n\tenvelope-from=swupdate+bncbaabb3gq5pgakgqedrke3tq@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"gTm+JlRA\"; dkim-atps=neutral"],"Received":["from mail-lf0-x23d.google.com (mail-lf0-x23d.google.com\n\t[IPv6:2a00:1450:4010:c07::23d])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xbb691Vshz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 22 Aug 2017 00:04:32 +1000 (AEST)","by mail-lf0-x23d.google.com with SMTP id c136sf2004789lfc.1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 21 Aug 2017 07:04:32 -0700 (PDT)","by 10.28.13.73 with SMTP id 70ls119957wmn.5.canary-gmail; Mon, 21\n\tAug 2017 07:04:28 -0700 (PDT)","from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10])\n\tby gmr-mx.google.com with ESMTPS id\n\to62si2520476wmo.2.2017.08.21.07.04.28\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 21 Aug 2017 07:04:28 -0700 (PDT)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xbb642Bdqz1r77L;\n\tMon, 21 Aug 2017 16:04:28 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xbb641C5Dz3jgYv;\n\tMon, 21 Aug 2017 16:04:28 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id g6k5Xc21U83t; Mon, 21 Aug 2017 16:04:27 +0200 (CEST)","from babic.homelinux.org\n\t(host-88-217-136-221.customer.m-online.net [88.217.136.221])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPS;\n\tMon, 21 Aug 2017 16:04:26 +0200 (CEST)","from localhost (mail.babic.homelinux.org [127.0.0.1])\n\tby babic.homelinux.org (Postfix) with ESMTP id 6281B4540556;\n\tMon, 21 Aug 2017 16:04:26 +0200 (CEST)","from babic.homelinux.org ([127.0.0.1])\n\tby localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id 8ITK5RywP8XJ; Mon, 21 Aug 2017 16:04:23 +0200 (CEST)","from [192.168.178.132] (papero.fritz.box [192.168.178.132])\n\tby babic.homelinux.org (Postfix) with ESMTP id A86A04540535;\n\tMon, 21 Aug 2017 16:04:23 +0200 (CEST)"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503324269; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=TOsee22/k90h5kyLBwoTzXDWO3bfcI6ynFOzeghfdpjn4KigloMrWsMGDjpRTjP+Iv\n\tyaOKtDvk7HsUCKw4uv3GdNmJ9OBkWAja46Rzg4U/u+FFKAo/tzxmoS/SAxT0UBGmeRmm\n\tZ9OgOPXYzOkAIVQK6m2C/zC5NeMB7cccwd/86qcvrBt437kkNf0IW3QkU6Ej6WpXKjv9\n\tkcYZlx+dAD3wizZaTr2UEcFwPRSMFxPnpjhsAyYbPCxH+tbwcbTuQDkIN/OV6AVwuPmI\n\txgPX8w6uChAO/A25EU7STkAcFXSIP5yxPoUs8VzZmCK6fNXzdVEM8AuqjmbNPMsQ5n0P\n\tFd2g==","i=1; a=rsa-sha256; t=1503324268; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=hi9P9TqKg2sgXVedw20H9Ep862/Bk8A1/M6yM4ytAl9pDR8GULKCgDJzt6zwPcjD2z\n\tqpudv/6+uwUNc2XUDY6Gud1iw7UXHQS37Yx9b5F6ZH9ck7MeJnLGVyIfBeQFH85eQ4nA\n\tmw5PxsCmccFbjozTf69ywYE38crpyUGTh7E9yy88FqYDTKr6dbue0VjFw9cZ6IdWIZVz\n\t3Uez6ns++KmE9VZdaYHyQ80ipIaEIa+lBwroNXa4q5CT7ftofqQS30TbtNo7dDP/3Dc3\n\tUQY5eNJ5iQ6tLnsSJM3ux2kpVzOAWVUz4ePelYEJI1pCEMpUq/7hRkS6eYtWeEG/gR8B\n\toucw=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:content-language:in-reply-to\n\t:mime-version:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=IVcN9afU5/f9/1PHPHfnmnsarwq207mq9YMduKDirAg=;\n\tb=JAT1Svkr8wvMlt+/OLwzlOxeFx5OKkNHeYWDTVth2syxsDKnFLe05LSH2buA3WPDkT\n\t/XXMS8KXt9QXL8lVRByl5FDBBjsN8/9yjPOhnshQFbKSfJDCVvcTdperLL36OKO9GwHK\n\tRrU4YMKXO4RA78+nJpivnXgR6y0ov2PfccG7nvMAGMoysi9d+myOAA9MPy36qIyzUYO5\n\tnLvDn7vhwGuaa9ppHTfQQLnaQeENe91H3fwLk+PYpJS+FvDz7xHDAM9EFMGvCiRov0Uz\n\tTp31LpIhudpwZfLk2+lNp9RmwMXMfXu3hL4RyxKEnOf2uGXcgCVRMaYWdXAUWmzBQSiA\n\t7mXw==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=content-transfer-encoding:content-language:in-reply-to:mime-version\n\t:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results;\n\tbh=+K1Clw/WVy+P13c91ZS8ZnuwO0YTJ4aVEOPpUyYwqAI=;\n\tb=ghYq3RUl2iNJ6iJHy0T2NSYEll3Dz7B+GzfB5nO2802zZ9tMbVHvdjxvyth/pb5+zg\n\ttStD6tN7xpwcmik5dF0lS/HmIGEa69fogdMVe7mY0h9NxnhGWSCPvOdVLg8AAxa1uN1S\n\tKrqthyV8g2gBNAQxZSlBkxToOqc5/RT6R3lSruUEffS6kLHAwKAiygImXDpMCNc0T7jQ\n\td5fmhjp+TiroOhus5luIcW6MY8vac9HN4MewDqZwJvMMOJHv8yUqFjf0QKtbp1fCbrRL\n\t00x0Y0169yo7rrQErJ6rqFCaY4mrFiC+cuIbVfpW6xzIO64neCUDqiXR6O+SfUXnl3y3\n\t4JWA=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.10 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.10 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:subject:to:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=IVcN9afU5/f9/1PHPHfnmnsarwq207mq9YMduKDirAg=;\n\tb=gTm+JlRAAwOCKAXzJ6X7C3kjUrfmWeUcs5/CCIwHkZ13em7SA9j4QWXcw57XgQnN/S\n\t8CaHF/bhkvY1BlP5n1Bf+34Ccpugwxzdd42LA4XqCzcO4X4wxT8KecgP+DoYLfsmJv9j\n\t7AH+0lfMt0lCodJ2s7p0rPRQCE9wbzf8c8gUnLxeAcq65Ce9HDjkPaw5OIguBX8wQM5E\n\ttWgog8QslH03VIW5pZWt7a/UHfVkqXN4/AQ7eI+LBjygxAyFOIOxkrOhKn90/vCFQHqR\n\tCs1p9LbNG10XcudXc39g4LBW0jNrDbGrbVTlM6sKOvRArg5PchJ9XQgAmQmgsk6NNDTM\n\t6L+Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:subject:to:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:x-spam-checked-in-group:list-post:list-help\n\t:list-archive:list-subscribe:list-unsubscribe;\n\tbh=IVcN9afU5/f9/1PHPHfnmnsarwq207mq9YMduKDirAg=;\n\tb=d5j28KT+tJ+4c2+nQUAA1mBP6WtvPrV5d9lHCHIZeVovPEMaND49jfIGNH+qwyDGB/\n\ta7CHippCGSbruItAhZjpxSJ+IT4EmgOik19fX56NHS3ceTlR0VdBJypmRLNpgv0tP3h6\n\twAEYPgugxixQNOiDGAn8AcyEU8H+O8G50JYbgPnYNQNwN9EIdT1iNHWDxRbQtpv/Y/qN\n\tgGVXIOHXrJuthgiYr17U5u8JdlSceG3Lj3m093nJlDPKr3ZLKH1LO35XmVcHyQSbU85Q\n\tuJeVZbPVK+RpKZvuRWM57SZ39jfJg+k87V8d6XQ8x7bZmoT7q/rJ1WRvcdswneq62zMG\n\tVjdg==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5haP4p1JJD4xlX2hoqMhyyDRoHNU+Y7CR/GYywowD5nzuEk5+Tk\n\teGARLSY9CQj0Mw==","X-Received":["by 10.28.156.20 with SMTP id f20mr16733wme.25.1503324268938;\n\tMon, 21 Aug 2017 07:04:28 -0700 (PDT)","by 10.28.51.131 with SMTP id z125mr1561203wmz.16.1503324268524; \n\tMon, 21 Aug 2017 07:04:28 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 212.18.0.10 is neither permitted nor\n\tdenied by best guess record for domain of sbabic@denx.de)\n\tclient-ip=212.18.0.10; ","X-Virus-Scanned":["amavisd-new at mnet-online.de","Debian amavisd-new at babic.homelinux.org"],"Subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","To":"swupdate@googlegroups.com, Christian Storm <christian.storm@siemens.com>","References":"<20170821134523.5l7oanyu5civ4szf@MD1KR9XC.ww002.siemens.net>","From":"Stefano Babic <sbabic@denx.de>","Message-ID":"<2ae4fac6-04fc-a0b3-02c9-0192de20005d@denx.de>","Date":"Mon, 21 Aug 2017 16:04:23 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170821134523.5l7oanyu5civ4szf@MD1KR9XC.ww002.siemens.net>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Language":"en-GB","X-Original-Sender":"sbabic@denx.de","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 212.18.0.10 is neither permitted nor denied by best\n\tguess record\n\tfor domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1753805,"web_url":"http://patchwork.ozlabs.org/comment/1753805/","msgid":"<20170822115103.hmb33jc4qvdtmptr@MD1KR9XC.ww002.siemens.net>","list_archive_url":null,"date":"2017-08-22T11:51:03","subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","submitter":{"id":72180,"url":"http://patchwork.ozlabs.org/api/people/72180/","name":"Storm, Christian","email":"christian.storm@siemens.com"},"content":"Hi Stefano,\n\n> > [...]\n> > Ah, OK, the commit message is misleading :)\n> > The intention for this patch was to create the ability to send a wake up\n> > call to suricatta while it is sleeping in order to abort the sleep and\n> > resume work immediately. Something along the lines of waking up a daemon\n> > via UNIX signal but for suricatta and via its IPC.\n> \n> right - instead of UNIX signals, the server is triggered via IPC.\n> \n> > The motivation was that,\n> > say, suricatta sleeps and then some external trigger comes in so that\n> > suricatta should resume operation immediately.\n> \n> I do this in two ways:\n> \n> - at the startup: swupdate started with -u \"-c 6\" (WAIT) and it blocks\n> until I send a IPC message.\n> \n> - during \"normal\" activities: I send a \"CONFIG\" ipc (that wakes up\n> suricatta immediately) with a low value for \"polling\". Value is active\n> after server_hawkbit process the IPC. And when I do not need that\n> suricatta processes immediately, Isend a further CONFIG increasing the\n> polling (or the \"polling\" value set by hawkbit will be taken).\n\nYes, right, any IPC wakes up suricatta, so does \"CONFIG\". I think\n(ab)using \"CONFIG\" for this purpose is a bit to implicit for me and/or\ndemands for proper documentation how to use the \"CONFIG\" IPC feature for\nwaking up suricatta. I like to have it explicit and hence came up\nwith this proposal. But I'm also fine with documenting the \"wakeup via\nCONFIG\" feature and dropping this patch.\n\n\n> >> [....]\n> >>> diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c\n> >>> index b520978..e1b161b 100644\n> >>> --- a/suricatta/suricatta.c\n> >>> +++ b/suricatta/suricatta.c\n> >>> @@ -47,7 +47,11 @@ int suricatta_wait(int seconds)\n> >>>  \t}\n> >>>  \tif (retval && FD_ISSET(sw_sockfd, &readfds)) {\n> >>>  \t\tTRACE(\"Suricatta woke up for IPC at %ld seconds\", tv.tv_sec);\n> >>> -\t\tif (server.ipc(sw_sockfd) != SERVER_OK){\n> >>> +\t\tserver_op_res_t result = server.ipc(sw_sockfd);\n> >>> +\t\tif (result == SERVER_OK_WAKEUP) {\n> >>> +\t\t\treturn 0;\n> >>> +\t\t}\n> >>\n> >> I think that this breaks the concept. Suricatta (as standalone daemone)\n> >> should not know what the single servers (even if we have just\n> >> server_hawkbit) are doing. The logic should be in server hawkbit and not\n> >> here, if necessary.\n> > \n> > OK, then suricatta has to become a supervisor process for the server\n> > processes, right?\n> \n> Right, this is the concept. It is just the daemon / supervisor without\n> any knowledge of the current server implementation.\n> \n> > Currently, suricatta.c sleeps and calls out to the\n> > server implementation, i.e., for now hawkbit.\n> \n> For now just Hawkbit. In the future, we can add multiple implementations\n> and we could also think if all these implementations are allowed to run\n> at the same time. IMHO several implementatiosn is just a question of\n> time, when someone will require further backend to be supported.\n> Multiple instances at once is maybe not a use case.\n\nHm, I can imagine installing two \"types\" of artifacts via SWUpdate, one\nbeing firmware and one being, e.g., applications in a broader sense,\ngiven that SWUpdate is used to update distributions as I recently read \non this list :)\nAnd those may come from two different backends, meaning either two\ninstances of a suricatta server implementation running or two separate\nSWUpdate processes running, one for each backend.\n\n> > This way, suricatta.c can\n> > then forward such IPC to the multiple server implementations.\n> \n> Right.\n\nOK, so then we go forward with dropping this and implementing the\nsuricatta.c supervisor feature? This would be fine with me...\n\n\nKind regards,\n   Christian","headers":{"Return-Path":"<swupdate+bncBDD6BWV65QPBBH5W6DGAKGQE6TA6U7A@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::23a;\n\thelo=mail-lf0-x23a.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbbh5w6dgakgqe6ta6u7a@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"nhin0eq6\"; dkim-atps=neutral"],"Received":["from mail-lf0-x23a.google.com (mail-lf0-x23a.google.com\n\t[IPv6:2a00:1450:4010:c07::23a])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xc8833dVPz9t2S\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 22 Aug 2017 21:53:06 +1000 (AEST)","by mail-lf0-x23a.google.com with SMTP id m79sf1204372lfi.11\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 22 Aug 2017 04:53:06 -0700 (PDT)","by 10.25.196.4 with SMTP id u4ls727684lff.30.gmail;\n\tTue, 22 Aug 2017 04:53:03 -0700 (PDT)","from goliath.siemens.de (goliath.siemens.de. [192.35.17.28])\n\tby gmr-mx.google.com with ESMTPS id\n\ti137si54735wmd.9.2017.08.22.04.53.03\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 22 Aug 2017 04:53:03 -0700 (PDT)","from mail3.siemens.de (mail3.siemens.de [139.25.208.14])\n\tby goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v7MBr2FD027756\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Tue, 22 Aug 2017 13:53:03 +0200","from localhost ([139.25.68.253])\n\tby mail3.siemens.de (8.15.2/8.15.2) with ESMTPS id v7MBr2Bn016300\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)\n\tfor <swupdate@googlegroups.com>; Tue, 22 Aug 2017 13:53:02 +0200"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503402784; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=EkR6Lyez0OXSjYcawgh1k7/17RdbF9e1cnuk1wvu32C8kjtPJGppG3iiT3b4bQCNmJ\n\tzzq4iWpOzJ1ocaDs5KJNM+Wy+gTIysPGDL1ZNqURVErpMAm4kYXRfYfjwcMF3zs6q7e1\n\tkCuYQ4hpb8n8xfU8t5JqjVtr5g8XwGDBj5u4QiH197xFCvRXDNc1lz0uAbMNgvFsBo2d\n\tz7E3YoJptsrvr08Fwrnj/TuLR0Qxh8GvwhLrsLy7ygzkHn/wnxBUzI0CapXHYyGV7msw\n\ttNTdR74Mj2/36TeiLAtld5MHdyZlJ81baSBG8J6sIJqNtZLGz+m1pV4zyFiSZQ3Ypisp\n\taofQ==","i=1; a=rsa-sha256; t=1503402783; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=rqV4fRzAVrDp0FNXmiWpqYYioCTZCkHJ6GuTt7ysY8iLKn0gX3+GdJ/j/bv4LMDosf\n\t3u3udHyLc1Rr+Z9ek3sEhH7atP9aYmHW3wAq+8UawvmcUczGWVFWGl1px+RnWg5DVeae\n\t8ioxBbtYWdobLrb5efRZxVSMxVvuqB9gXwPABeAT1WGxwTOpako8zlnY8cJOFXsRDyqc\n\toHT5L5bIrcAKDqzofoD13PeryygplYm+3mZLBNchLVHeYLwsN/JbWloWw6pz37P/S1UP\n\ta+Cwksxe8MI18i4Hh1s3/YZqow0Fx8+lsPlcolXZ3B1x7ZPfZgeTgEZELZlUMjYB0X55\n\t+iBg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:user-agent:in-reply-to\n\t:content-transfer-encoding:content-disposition:mime-version\n\t:mail-followup-to:message-id:subject:to:from:date\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=seRTJwE6DtbIQpwlQPEUkb+qMc4+9yL81IXjLhgmwFs=;\n\tb=V+7qrlPZsTGnAi9//wCI8gada8tOVhZwvP9PGQE4PhqGJMchkgJdQTmSdcm62/u5sV\n\twkidVZiVtXh/bHsicmVU5+soZQ5NOGSzbv7CaHBNpEhIMa2+Wv/ydZJaUYuobufsuVfz\n\tfm/V6E1qcPBrkSyYevH5kTADh++ggkujPvQfxLaP8b7gcF/tTvWALToWKTeIXo7X/W30\n\tr6+Ev8sX5GZgbeLmuiJd5lkhPmgLllat7ndmj2q8ZpQwHj4lWddpaEX1aw3gVA7aqzwK\n\tsVWr+1WFHsgQsrTgJlWkuV6P0BJIPTEXoGfkQ8rdjdq6WjgtKnc2AvkgeNU/gc7tZGTr\n\tmgzg==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=user-agent:in-reply-to:content-transfer-encoding\n\t:content-disposition:mime-version:mail-followup-to:message-id\n\t:subject:to:from:date:arc-authentication-results;\n\tbh=pZS8xSc3kU00ymsdNtTKlIxogTosRVN9jsgjSZsUv4w=;\n\tb=lD2m15UoQmY6xiAYe+7b3h+zbgV3WEQ45e86ZgzxVdqs2BCkEn+QZk9bVm/w3BAnDh\n\tubTi03qlqUAuhxBA7kTfZ9u7k5tesja46OdBf1ERrsmO7jfTWp7uHkN2o5Bv89APT3jG\n\tDIkS5QHyD1N8tAKm7kPn0rXTs8kP83RRoVdSpFid5uylS20wyhtgK3vz/mGK1IEyv3Tx\n\tCgXR0rJUZsu7EppHbH0foiAdcT2Y9PU2TNzx44gBO2v+H6WtDnSOBn8DvSLWOtfq1PFL\n\tjlmyo9orDJSUcnhJ1lAi0J17L1zsWK8KrN/AFS6mN8TB+Exl69R2DkUXsFQsygG+ju6n\n\tvEvg=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:date:from:to:subject:message-id:mail-followup-to\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=seRTJwE6DtbIQpwlQPEUkb+qMc4+9yL81IXjLhgmwFs=;\n\tb=nhin0eq6yuWkBknqPimT0PA+MnGW38JgRfh0HSUemAOSMj3EKwr01hln7fNFFTWVuo\n\tO9BCVc+IfiIhklYI9Tw5WL3V6QtBdt7wFzURV8Eajn2ZHcIjBUkVYaEX05FnypnvhYUr\n\tKDh5m2Qkixlc/LZ9kwujCB809p2a5WGX4+jO+VUhhYZgcKpwmd0gdL22tbkpFpxChyR/\n\tn/aU6nu5ybb4pL/HHzTkacrFqc4Etn1/C00LoLcejbOwHYYh8uu7NSdZ8XX75dcLIINx\n\tUJXGXv/qBWmTeGs4bniHZ3qQyF8uy7R10k9AFZ4l9XxaQ+hYp2kZCrmQHeC5q8DIPiKi\n\t824A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:date:from:to:subject:message-id\n\t:mail-followup-to:mime-version:content-disposition\n\t:content-transfer-encoding:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:x-spam-checked-in-group:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=seRTJwE6DtbIQpwlQPEUkb+qMc4+9yL81IXjLhgmwFs=;\n\tb=bdR8RWZOxL9/UdNx/s2iKM7aoSfp3QmWpSTZFdo40Fe4zLopO0fhkkkJ8A11jQcGMD\n\tmZClLdUPhtM6V9yREmTgJ1p6zDGvpu2ZUBx3mIGPSw7E5fOVMz1MOjp2L2ibyVg3folu\n\teG5oq3IsJlbOFhpjLgHEYYoWa8Bf/XRC5xQAW0KD8S323nvdiw4oAfltTys+lvCgOVzG\n\tzilH9pz7vFovyYqpHRSS8qVLXb9BLIOqAWzlKD41EJtn5mnWFT1l4kVCJiBU2ZcWy42J\n\tA1OjB6CGnYhU18Hf7Q6J2wVKJ2jz3Ktz3JxliR30OKEv9cnahhjSqwvFRYuVGSPvo48Y\n\tOe7g==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5i3SI+/eq6tzKyvVks+PjAMrT/b/en3sIzuboeWpFSjl8LKaAS2\n\thJF/ysasRuZXww==","X-Received":["by 10.25.74.23 with SMTP id x23mr436lfa.15.1503402783912;\n\tTue, 22 Aug 2017 04:53:03 -0700 (PDT)","by 10.46.87.78 with SMTP id r14mr47812ljd.29.1503402783360;\n\tTue, 22 Aug 2017 04:53:03 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 192.35.17.28 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.28; ","Date":"Tue, 22 Aug 2017 13:51:03 +0200","From":"Christian Storm <christian.storm@siemens.com>","To":"swupdate@googlegroups.com","Subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","Message-ID":"<20170822115103.hmb33jc4qvdtmptr@MD1KR9XC.ww002.siemens.net>","Mail-Followup-To":"swupdate@googlegroups.com","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Disposition":"inline","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<2ae4fac6-04fc-a0b3-02c9-0192de20005d@denx.de>","User-Agent":"Mutt/20170113 (1.7.2)","X-Original-Sender":"christian.storm@siemens.com","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.28 is neither permitted nor denied by best\n\tguess\n\trecord for domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1755412,"web_url":"http://patchwork.ozlabs.org/comment/1755412/","msgid":"<535d3e7c-a7b0-61ee-a46a-b22e20165c3b@denx.de>","list_archive_url":null,"date":"2017-08-23T15:39:52","subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","submitter":{"id":5771,"url":"http://patchwork.ozlabs.org/api/people/5771/","name":"Stefano Babic","email":"sbabic@denx.de"},"content":"Hi Christian,\n\nOn 22/08/2017 13:51, Christian Storm wrote:\n> Hi Stefano,\n> \n>>> [...]\n>>> Ah, OK, the commit message is misleading :)\n>>> The intention for this patch was to create the ability to send a wake up\n>>> call to suricatta while it is sleeping in order to abort the sleep and\n>>> resume work immediately. Something along the lines of waking up a daemon\n>>> via UNIX signal but for suricatta and via its IPC.\n>>\n>> right - instead of UNIX signals, the server is triggered via IPC.\n>>\n>>> The motivation was that,\n>>> say, suricatta sleeps and then some external trigger comes in so that\n>>> suricatta should resume operation immediately.\n>>\n>> I do this in two ways:\n>>\n>> - at the startup: swupdate started with -u \"-c 6\" (WAIT) and it blocks\n>> until I send a IPC message.\n>>\n>> - during \"normal\" activities: I send a \"CONFIG\" ipc (that wakes up\n>> suricatta immediately) with a low value for \"polling\". Value is active\n>> after server_hawkbit process the IPC. And when I do not need that\n>> suricatta processes immediately, Isend a further CONFIG increasing the\n>> polling (or the \"polling\" value set by hawkbit will be taken).\n> \n> Yes, right, any IPC wakes up suricatta, so does \"CONFIG\". I think\n> (ab)using \"CONFIG\" for this purpose is a bit to implicit for me and/or\n> demands for proper documentation how to use the \"CONFIG\" IPC feature for\n> waking up suricatta. I like to have it explicit and hence came up\n> with this proposal.\n\nThe weird thing for me is that the \"WAKE\" is not really a IPC command,\nbut the side-effect is to wake-up the process. I think it is nicer to\nhave such as \"GET_CONFIG\" or whatever doing a real IPC, while your\nproposal asks the responder in server_hawkbit to simply come back,\nbecause the goal was already reached.\n\n> But I'm also fine with documenting the \"wakeup via\n> CONFIG\" feature and dropping this patch.\n> \n> \n>>>> [....]\n>>>>> diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c\n>>>>> index b520978..e1b161b 100644\n>>>>> --- a/suricatta/suricatta.c\n>>>>> +++ b/suricatta/suricatta.c\n>>>>> @@ -47,7 +47,11 @@ int suricatta_wait(int seconds)\n>>>>>  \t}\n>>>>>  \tif (retval && FD_ISSET(sw_sockfd, &readfds)) {\n>>>>>  \t\tTRACE(\"Suricatta woke up for IPC at %ld seconds\", tv.tv_sec);\n>>>>> -\t\tif (server.ipc(sw_sockfd) != SERVER_OK){\n>>>>> +\t\tserver_op_res_t result = server.ipc(sw_sockfd);\n>>>>> +\t\tif (result == SERVER_OK_WAKEUP) {\n>>>>> +\t\t\treturn 0;\n>>>>> +\t\t}\n>>>>\n>>>> I think that this breaks the concept. Suricatta (as standalone daemone)\n>>>> should not know what the single servers (even if we have just\n>>>> server_hawkbit) are doing. The logic should be in server hawkbit and not\n>>>> here, if necessary.\n>>>\n>>> OK, then suricatta has to become a supervisor process for the server\n>>> processes, right?\n>>\n>> Right, this is the concept. It is just the daemon / supervisor without\n>> any knowledge of the current server implementation.\n>>\n>>> Currently, suricatta.c sleeps and calls out to the\n>>> server implementation, i.e., for now hawkbit.\n>>\n>> For now just Hawkbit. In the future, we can add multiple implementations\n>> and we could also think if all these implementations are allowed to run\n>> at the same time. IMHO several implementatiosn is just a question of\n>> time, when someone will require further backend to be supported.\n>> Multiple instances at once is maybe not a use case.\n> \n> Hm, I can imagine installing two \"types\" of artifacts via SWUpdate, one\n> being firmware and one being, e.g., applications in a broader sense,\n> given that SWUpdate is used to update distributions as I recently read \n> on this list :)\n> And those may come from two different backends, meaning either two\n> instances of a suricatta server implementation running or two separate\n> SWUpdate processes running, one for each backend.\n> \n>>> This way, suricatta.c can\n>>> then forward such IPC to the multiple server implementations.\n>>\n>> Right.\n> \n> OK, so then we go forward with dropping this and implementing the\n> suricatta.c supervisor feature? This would be fine with me...\n\nI think it is fine if I have correctly interpreted hwat you mean with\nsupervisor feature. IMHO suricatta is just the proxy-interface that let\nto communicate with the implementation (hawkbit, whatever,...) of the\nbackend. Is this what you mind ?\n\nBest regards,\nStefano","headers":{"Return-Path":"<swupdate+bncBAABBTOD63GAKGQEBTJMCOY@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:400c:c0c::23e;\n\thelo=mail-wr0-x23e.google.com;\n\tenvelope-from=swupdate+bncbaabbtod63gakgqebtjmcoy@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"CpHo6Ifh\"; dkim-atps=neutral"],"Received":["from mail-wr0-x23e.google.com (mail-wr0-x23e.google.com\n\t[IPv6:2a00:1450:400c:c0c::23e])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xcs7Q0r4Jz9s5L\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 01:40:01 +1000 (AEST)","by mail-wr0-x23e.google.com with SMTP id p14sf132950wrg.1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 08:40:00 -0700 (PDT)","by 10.28.54.4 with SMTP id d4ls238120wma.13.canary-gmail; Wed, 23\n\tAug 2017 08:39:57 -0700 (PDT)","from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9])\n\tby gmr-mx.google.com with ESMTPS id\n\tb72si77613wmd.7.2017.08.23.08.39.57 for <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 23 Aug 2017 08:39:57 -0700 (PDT)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xcs7K2lgLz1qsDl;\n\tWed, 23 Aug 2017 17:39:57 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xcs7K2HT2z3jgYl;\n\tWed, 23 Aug 2017 17:39:57 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id 2WGcNonaigEX; Wed, 23 Aug 2017 17:39:56 +0200 (CEST)","from babic.homelinux.org\n\t(host-88-217-136-221.customer.m-online.net [88.217.136.221])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPS;\n\tWed, 23 Aug 2017 17:39:56 +0200 (CEST)","from localhost (mail.babic.homelinux.org [127.0.0.1])\n\tby babic.homelinux.org (Postfix) with ESMTP id 474AA454052E;\n\tWed, 23 Aug 2017 17:39:55 +0200 (CEST)","from babic.homelinux.org ([127.0.0.1])\n\tby localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id T5kmfTOcCBLT; Wed, 23 Aug 2017 17:39:52 +0200 (CEST)","from [192.168.178.132] (papero.fritz.box [192.168.178.132])\n\tby babic.homelinux.org (Postfix) with ESMTP id 3EC9D4540447;\n\tWed, 23 Aug 2017 17:39:52 +0200 (CEST)"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503502798; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=zjOezCGw3JTyZc8S52QBxLjLV0b5pU7lZyY8DkjwkJvHpnvz5YN7EbML+jcmEk/Wi0\n\t1gBKOkLwC41Zn2xDkKX2h/rUwhBniGtAP7uyAkxvLyv4ZIjHXGmr6nU4/+wQEz5oUGdN\n\tXeQ147uo6ViylTC2LzScJXlmWSpT+Y0rWhR7zzQDi5QdTks5GzMUbKmDWJWSy1vOiCMI\n\tzomFqvIlFW37p8rHCQuTLkPyki8sAjM9tZhAsT27uunrkUQpr50lsia/FPZWIYtuGmuB\n\tCqW1R4Ibu2KDIJLvldOreVGT77JkYeBjHZynJ4xdAMqMVSE2bAFmQbMAIgzj4A6cNiCJ\n\t29Ew==","i=1; a=rsa-sha256; t=1503502797; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=eQiX0szDYEr3FxI2XRMLsZWh4BtZO8sWSFbs02o1hF/fi9qcGQs9iekrW0isQkENbb\n\tuaZlGv+YGFjiIKJnAseIN8g88EessbC3ngonwF43y9kvKKdFLMmYZv8DbcwtmHnR8aJJ\n\tVBkuY2BU7PNB8NEGJpXXPdRmFtjogcd3fVnB+mHmS5rX5sPd7qarqEFmOkjCC9ZXmU05\n\tlIKaJ46TAEeoinXpwdKB7X01rZj4skKZ5VTUrwTbVbDTNSVLJR72a24GgpFo7cbUuKfI\n\tQMsrRGd7i7jfdFrJ7PvwfO9X77qs9idF06z5iJupRlSeKNtSaNsA8OpYRs/5iYFZK17L\n\tPWfw=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:content-language:in-reply-to\n\t:mime-version:user-agent:date:message-id:from:cc:references:to\n\t:subject:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=nn2r/aoowtOhRiJG1tJZLP6n495OsPyRERfbBhSrqko=;\n\tb=V0PR8puCKnI1c7OgfZZmueQczMyZMstCx6mj12jW2XSeKYyXMjnvUqC+u106g9ok7s\n\txMjN00/h7yrcDORQSkYe/RIeIW7I7TAfp3P2FWtQGdsz5cxJ/Swevk4olf9ByHZBZtMQ\n\t9qXgUsyA1TSOU2XlekQHN3taPDqb1qXcTCfUbM/melKeOIr6O/cEihpxq2A5Ipir9Jr2\n\tcYqDn77R0ESYoUiJeH/Oknie5+lKqrV1DSqBvMUDTMm54SU61g5tz+CuVNManaUy3DL7\n\tTtvzrv2DRplFm6OendL/YVjgQXuPWQrXF82AAwod84H5tpRyF2RRa94j2LEN7+2F9An7\n\t6lvg==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=content-transfer-encoding:content-language:in-reply-to:mime-version\n\t:user-agent:date:message-id:from:cc:references:to:subject\n\t:arc-authentication-results;\n\tbh=Z6vZoyCFDI8uRhzu7+IpGILLe8VXIXxZKXrn0+Wnp1c=;\n\tb=CA7U7xr1zgA1Z1jMaReiphLrN+oAx5Y+ekOVw5vc/8uqiI6kQ35ZyujjNy4cgOVeYz\n\t18PBR641PGGEnmt5kmNOOmlH+f1t5x/0pLsP2evZApsgSCRPIqbpEeraOWQTay5F2aN0\n\tNDCe8D3Q2FyEpyEPkBvMlkUS4DiBiyFMGnoobsJCrC/hLX5r0M7dli4hwJ+7MYCxtkym\n\tUMQAUnHeeUM3qugyCoAcOu518Go1q2zFIvn8NUxUaPuQwg6bTsDOn4yzR7yuFqcWGqr8\n\twMsUMpJ+aDjjT6rYhY9KBJvyZtp3NNFWOaGfjcm7wKJPsOTo0/CHGAx8rV+BYd39Xg/H\n\tCXyQ=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.9 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.9 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=nn2r/aoowtOhRiJG1tJZLP6n495OsPyRERfbBhSrqko=;\n\tb=CpHo6Ifh7ieC7QQR2wYn5fmI95oK3aopOI1e7tDsjrqXiBRjYEpeu12R3qZJZ+5uC1\n\tFFcFtDL3YecAKeZ2wc0+OJ4MM1Cip0WB1PV0xXi2MK55ExS6wyFaX73jPMBIQBIkHPR2\n\trSF26x/an7caaZjvdxLkvU8JIHPB0MLFftxw0qGxSb4WOCPRBkLM+0yK1iT+NvZfvYMs\n\tO4xDJ4NNODqEGz43WiQBLp/ATiqTKXkY1k9SnxTRmMqdzOwmxpuJkygS/MX+zMY1zEEu\n\t0LcImBwTPzlG321FfMBGtlMuhMCKEHpZKE8Chtn+AffXy7anzzoeRW5oiaLkfQP2xPLq\n\tADrw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:subject:to:references:cc:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:x-spam-checked-in-group:list-post:list-help\n\t:list-archive:list-subscribe:list-unsubscribe;\n\tbh=nn2r/aoowtOhRiJG1tJZLP6n495OsPyRERfbBhSrqko=;\n\tb=f5lhOH/8PC+0u1IhAYLcqE9GlkVn8JAJfWtU/lN7Jxw9J1tc4theYdswCPywtSIQto\n\tU6CvGUM6Zf6SQn5326AWO0UjVCfIKdW/bQnGij4N2cBBaDOzGc3MOV5hREV9cyMR92i5\n\tS0xGtRPX1wrmkhxT6cDTYqr80pRdhxukmUgUnZWD52ZCsLAMGGA84/pNJ9cugN8fvOMz\n\tRcBkDqq2/YUZOZTAbgbaR9aSdhz3QS7nIi66rbQYSc9ccSaGM2g7NjyXOXcnmazZaNfH\n\t0+C+f2V9Nh8w3l6jhFESGd052UNDNGOVsfev3xBbWRmmbxJcCEUaOlI3t+O2MtMhyar+\n\toOOA==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5gZagnAfprCKm6r7ElNirACx5fKNhYgXk9KaZO9pLJy5cYaeWVp\n\tnpuZhrqTLlrPjw==","X-Received":["by 10.28.13.134 with SMTP id 128mr7690wmn.29.1503502798001;\n\tWed, 23 Aug 2017 08:39:58 -0700 (PDT)","by 10.28.46.209 with SMTP id u200mr419372wmu.4.1503502797599;\n\tWed, 23 Aug 2017 08:39:57 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 212.18.0.9 is neither permitted nor\n\tdenied by best guess record for domain of sbabic@denx.de)\n\tclient-ip=212.18.0.9; ","X-Virus-Scanned":["amavisd-new at mnet-online.de","Debian amavisd-new at babic.homelinux.org"],"Subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","To":"Christian Storm <christian.storm@siemens.com>","References":"<20170822115103.hmb33jc4qvdtmptr@MD1KR9XC.ww002.siemens.net>","Cc":"swupdate@googlegroups.com","From":"Stefano Babic <sbabic@denx.de>","Message-ID":"<535d3e7c-a7b0-61ee-a46a-b22e20165c3b@denx.de>","Date":"Wed, 23 Aug 2017 17:39:52 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170822115103.hmb33jc4qvdtmptr@MD1KR9XC.ww002.siemens.net>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Language":"en-US","X-Original-Sender":"sbabic@denx.de","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 212.18.0.9 is neither permitted nor denied by best guess\n\trecord\n\tfor domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1755934,"web_url":"http://patchwork.ozlabs.org/comment/1755934/","msgid":"<20170824070702.lv747xiyzfjrntip@MD1KR9XC.ww002.siemens.net>","list_archive_url":null,"date":"2017-08-24T07:07:02","subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","submitter":{"id":72180,"url":"http://patchwork.ozlabs.org/api/people/72180/","name":"Storm, Christian","email":"christian.storm@siemens.com"},"content":"Hi Stefano,\n\n> >>> [...]\n> >>> Ah, OK, the commit message is misleading :)\n> >>> The intention for this patch was to create the ability to send a wake up\n> >>> call to suricatta while it is sleeping in order to abort the sleep and\n> >>> resume work immediately. Something along the lines of waking up a daemon\n> >>> via UNIX signal but for suricatta and via its IPC.\n> >>\n> >> right - instead of UNIX signals, the server is triggered via IPC.\n> >>\n> >>> The motivation was that,\n> >>> say, suricatta sleeps and then some external trigger comes in so that\n> >>> suricatta should resume operation immediately.\n> >>\n> >> I do this in two ways:\n> >>\n> >> - at the startup: swupdate started with -u \"-c 6\" (WAIT) and it blocks\n> >> until I send a IPC message.\n> >>\n> >> - during \"normal\" activities: I send a \"CONFIG\" ipc (that wakes up\n> >> suricatta immediately) with a low value for \"polling\". Value is active\n> >> after server_hawkbit process the IPC. And when I do not need that\n> >> suricatta processes immediately, Isend a further CONFIG increasing the\n> >> polling (or the \"polling\" value set by hawkbit will be taken).\n> > \n> > Yes, right, any IPC wakes up suricatta, so does \"CONFIG\". I think\n> > (ab)using \"CONFIG\" for this purpose is a bit to implicit for me and/or\n> > demands for proper documentation how to use the \"CONFIG\" IPC feature for\n> > waking up suricatta. I like to have it explicit and hence came up\n> > with this proposal.\n> \n> The weird thing for me is that the \"WAKE\" is not really a IPC command,\n> but the side-effect is to wake-up the process. \n\nYes, essentially this command is a NOP as the side effect as you called\nit does the intended operation, namely waking up. But this is purely due\nto the implementation and not \"visible\" to the user.\n\n> I think it is nicer to have such as \"GET_CONFIG\" or whatever doing a\n> real IPC, while your proposal asks the responder in server_hawkbit to\n> simply come back, because the goal was already reached.\n\nOK, but then we should document that whenever someone wants to wake up\nsuricatta \"IPC:GET_CONFIG > /dev/null\" can be used for this purpose.\n\nOK, then let's drop this and implement it when suricatta has become a\nsupervisor of it's backend implementations (see below)?\n\n\n> > But I'm also fine with documenting the \"wakeup via\n> > CONFIG\" feature and dropping this patch.\n> > \n> > \n> >>>> [....]\n> >>>>> diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c\n> >>>>> index b520978..e1b161b 100644\n> >>>>> --- a/suricatta/suricatta.c\n> >>>>> +++ b/suricatta/suricatta.c\n> >>>>> @@ -47,7 +47,11 @@ int suricatta_wait(int seconds)\n> >>>>>  \t}\n> >>>>>  \tif (retval && FD_ISSET(sw_sockfd, &readfds)) {\n> >>>>>  \t\tTRACE(\"Suricatta woke up for IPC at %ld seconds\", tv.tv_sec);\n> >>>>> -\t\tif (server.ipc(sw_sockfd) != SERVER_OK){\n> >>>>> +\t\tserver_op_res_t result = server.ipc(sw_sockfd);\n> >>>>> +\t\tif (result == SERVER_OK_WAKEUP) {\n> >>>>> +\t\t\treturn 0;\n> >>>>> +\t\t}\n> >>>>\n> >>>> I think that this breaks the concept. Suricatta (as standalone daemone)\n> >>>> should not know what the single servers (even if we have just\n> >>>> server_hawkbit) are doing. The logic should be in server hawkbit and not\n> >>>> here, if necessary.\n> >>>\n> >>> OK, then suricatta has to become a supervisor process for the server\n> >>> processes, right?\n> >>\n> >> Right, this is the concept. It is just the daemon / supervisor without\n> >> any knowledge of the current server implementation.\n> >>\n> >>> Currently, suricatta.c sleeps and calls out to the\n> >>> server implementation, i.e., for now hawkbit.\n> >>\n> >> For now just Hawkbit. In the future, we can add multiple implementations\n> >> and we could also think if all these implementations are allowed to run\n> >> at the same time. IMHO several implementatiosn is just a question of\n> >> time, when someone will require further backend to be supported.\n> >> Multiple instances at once is maybe not a use case.\n> > \n> > Hm, I can imagine installing two \"types\" of artifacts via SWUpdate, one\n> > being firmware and one being, e.g., applications in a broader sense,\n> > given that SWUpdate is used to update distributions as I recently read \n> > on this list :)\n> > And those may come from two different backends, meaning either two\n> > instances of a suricatta server implementation running or two separate\n> > SWUpdate processes running, one for each backend.\n> > \n> >>> This way, suricatta.c can\n> >>> then forward such IPC to the multiple server implementations.\n> >>\n> >> Right.\n> > \n> > OK, so then we go forward with dropping this and implementing the\n> > suricatta.c supervisor feature? This would be fine with me...\n> \n> I think it is fine if I have correctly interpreted hwat you mean with\n> supervisor feature. IMHO suricatta is just the proxy-interface that let\n> to communicate with the implementation (hawkbit, whatever,...) of the\n> backend. Is this what you mind ?\n\nYes, just like swupdate itself spawns processes, suricatta then spawns\nprocesses and supervises them. Suricatta should supervise those backend\nimplementation processes (hawkbit,...) and relay IPC to/from them. But\nit is agnostic of the concrete implementations, i.e. rely on IPC only.\nWhether suricatta spawns those processes itself or whether it's done via\nswupdate/core means is to be discussed/designed.\nI guess this is what is meant by the roadmap.rst section \"Support for\nmultiple Servers simultaneously\", right?\n\n\nKind regards,\n   Christian","headers":{"Return-Path":"<swupdate+bncBDD6BWV65QPBBEPX7HGAKGQEKWRTUJY@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:400c:c0c::23b;\n\thelo=mail-wr0-x23b.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbbepx7hgakgqekwrtujy@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"oW6HgmEd\"; dkim-atps=neutral"],"Received":["from mail-wr0-x23b.google.com (mail-wr0-x23b.google.com\n\t[IPv6:2a00:1450:400c:c0c::23b])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xdFlT2dH6z9t2Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 17:09:08 +1000 (AEST)","by mail-wr0-x23b.google.com with SMTP id z91sf613340wrc.2\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 00:09:08 -0700 (PDT)","by 10.28.211.210 with SMTP id k201ls497585wmg.25.gmail; Thu, 24 Aug\n\t2017 00:09:04 -0700 (PDT)","from goliath.siemens.de (goliath.siemens.de. [192.35.17.28])\n\tby gmr-mx.google.com with ESMTPS id\n\t72si354861wmo.9.2017.08.24.00.09.04 for <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 24 Aug 2017 00:09:04 -0700 (PDT)","from mail1.siemens.de (mail1.siemens.de [139.23.33.14])\n\tby goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v7O794Xl024502\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Thu, 24 Aug 2017 09:09:04 +0200","from localhost ([139.25.69.251])\n\tby mail1.siemens.de (8.15.2/8.15.2) with ESMTPS id v7O7944P007435\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)\n\tfor <swupdate@googlegroups.com>; Thu, 24 Aug 2017 09:09:04 +0200"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503558545; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=efje5kQatYhWViAxlZXmfQn+XDvCOY6ONYd/Zn0ixsKTmvuYYl3QAcw5BORTpDxVHA\n\tPVWAdvusQppTOXKB+kBE6CKGkH8nCw30+0KJj1sm5iKVlqb8wWf5pwH/1PjOBrgXqXch\n\tLWrJrwJUItokjDhQ8w1aKlOvbg4QVBkruHKgaRo6CW2dybhS6Ey5VNtWUkqDi5WjbYPP\n\t1iwC49Py2jy3nxIeuWGhwadTWwnS/WLrtsNwDIJBD44ma90klrAsQIRDGguWu2a9jtvw\n\thhe0fSJhO7RBrTHIPsTilK84fiA4h/dpe2w/1aBjVn1KohNl1tiCFBqRcdcSRVavBYYO\n\tO23Q==","i=1; a=rsa-sha256; t=1503558544; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=pWfIdZbVaDWGQPe016xMa+Z1eCBjfvEcJpWogswAHJ3aAISTLBshdSCJ+Z2K4K1IR/\n\tMZrzrZvOQvV/0gOneDJ+kx6om5bz8MU1z2xFJw48ME+5E2Zxa0o2Ifk1wK5OhGkNlpgZ\n\tEyHmHESb2t23U/lhPKClnMcnBq34PUmADFbX3h9nNVia/86L9+BfBEa1KZEfuo/J6fzn\n\tG3Dqk0A/NDS4kKK/z4/XqA57uI8epGLvmXMxU/7x7QCBqpSklAM1FcRYHqnGB/k941QO\n\tmrgHI2rbPVgeMbf0Bs/OgwW5fwQRIYPcfst8Pu51DG4cUJFgfKH5u6aVOP+wkhqyXT6k\n\tyZzg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:user-agent:in-reply-to\n\t:content-transfer-encoding:content-disposition:mime-version\n\t:mail-followup-to:message-id:subject:to:from:date\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=jKzVbL2pP3hGwy+Tv1VEKDhzPLvaftlAgAGYeTAqvBw=;\n\tb=XiMLdJi7A4la8p17NJgE5lel3qtycY8eYM9uxGvN2rVKqoOn0afaksCLJUWqmieVvU\n\tST7jEHA5OYRoB6RNWFnOmYmwxLfuqa7BRkPJoSA4IZ6OjJVehHy94qENvVeMUt7HJfrh\n\tKUmXdt/J2lWYzNUOF5eHu/P+2m7MzjO/TIz984v+ekgEJdNCFMbqapR/Vh86IGmBXUJD\n\tIKDWnboiSh2AQDTpdd+rCWVCuoOxTs3HP25JlIqboCHJbF+IUi7MseND0Xqg3KXMOhhA\n\tMZG0+zsNj8rFLIJlouUakIExwO4JFFZ9vsMjMTp1wEBYJxkJ849PLWTjoF+VaRTpCCKo\n\t4Qtg==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=user-agent:in-reply-to:content-transfer-encoding\n\t:content-disposition:mime-version:mail-followup-to:message-id\n\t:subject:to:from:date:arc-authentication-results;\n\tbh=s/klBnRDuZtafiw/qqE/3H9uExCjtveF3WW2RYZxJkU=;\n\tb=Gup+GNkx3X0+V12/Sj7ZWXuStVJOEwQ2guzX3QA1fPxTWLJC/MDBc+ZwfLYJffZxvm\n\tylGF0hEDr/SwEIW0hM1IF3c9XVEwPrMT1+8219ees1dzWkwDxbrPu5etDBLVUVvp+qd/\n\tJ0X1Tyt5Kbu+UJyVYAgLPDymz0q4p6p1bNRIFuEuYsLljtAykRtxsTDNgqailQvSHYdy\n\tCn/61+GAW9ysyUqHzvCWO2e4IusjkQIgNhBgGbg/iZkwlQBVAxJBq3Ct0jy3fPN7Mawt\n\t/g+LjSK0bxjfDDcDYzq+0ReW6XXZ78MJG/T7gxTMunTQP0rZdKF9FYGy2y7IIsFB31S3\n\tluNw=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:date:from:to:subject:message-id:mail-followup-to\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=jKzVbL2pP3hGwy+Tv1VEKDhzPLvaftlAgAGYeTAqvBw=;\n\tb=oW6HgmEdDfFPcBZJh2mWX+y24UaStoqMULN2/Dp1LrcRv6Tu7sGYcofGmA0U2uLvK1\n\ty0RVmpU+XGGm90R4IjEF1QgrP3i0EXULYxGaZmIEmHPwvoBOlvsvQAQWmir4bd2eKi55\n\tlIczay3tCuNu3wcVF08Ekwvdzd5n1xym8rYbj1b+9Ek2klhW9yhPukyFQ//NGvVuOYHg\n\tpsmcvtD1PZhC/5FPUJIju9Dw5o3wBZrNdOuF50qzFZfX7eCJyivJQ5Q6pEchKiQhQiqP\n\tiixoGXD/SZOWw1beKpLvCaj4JJK6pZZnqtqWGIvBRuwubFVEJx2BkQ/0qlD4/01m9LVr\n\teBxA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:date:from:to:subject:message-id\n\t:mail-followup-to:mime-version:content-disposition\n\t:content-transfer-encoding:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:x-spam-checked-in-group:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=jKzVbL2pP3hGwy+Tv1VEKDhzPLvaftlAgAGYeTAqvBw=;\n\tb=uTyVqo9f5gXUVc95mQN7qBlto/FLnyRNFJSiKv6KVV9T0NPNKoAvZt/conDDL4syOt\n\tkmNF0glklhEhtr/m+4++NW04mZ8qMMNNlIyVDb1+3K0uWE6nmpHdKZ9YNRoSTcV2yGt2\n\tPto2rxVwWRPRgLMZBkUtZl68f6TTrNJjqOh6saolBg6GGVZTUQk3/rdnX2IKaw7+6HbX\n\tFRCC+LIz+X7D+ANF5fTs/g/H9qsymJUrYRLsTegb1d5FXgE/nZK423fRpQq+kadb0Unn\n\t45a7WNvZ57+zWs1t2xaFaPx8C9ayecGCBAQ9BgZ+/r5pR0CdvooR/Jd4I40OTERP1ScI\n\tiRAQ==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5gbjkyv0NX+JVokEBCAlsmIfiD8ELwRC506nFbKButqpZhV0e+t\n\tjOKcFeR0f8azaQ==","X-Received":["by 10.28.12.9 with SMTP id 9mr11072wmm.0.1503558545369;\n\tThu, 24 Aug 2017 00:09:05 -0700 (PDT)","by 10.28.131.206 with SMTP id f197mr600948wmd.23.1503558544949; \n\tThu, 24 Aug 2017 00:09:04 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 192.35.17.28 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.28; ","Date":"Thu, 24 Aug 2017 09:07:02 +0200","From":"Christian Storm <christian.storm@siemens.com>","To":"swupdate@googlegroups.com","Subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","Message-ID":"<20170824070702.lv747xiyzfjrntip@MD1KR9XC.ww002.siemens.net>","Mail-Followup-To":"swupdate@googlegroups.com","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Disposition":"inline","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<535d3e7c-a7b0-61ee-a46a-b22e20165c3b@denx.de>","User-Agent":"Mutt/20170113 (1.7.2)","X-Original-Sender":"christian.storm@siemens.com","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.28 is neither permitted nor denied by best\n\tguess\n\trecord for domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1755936,"web_url":"http://patchwork.ozlabs.org/comment/1755936/","msgid":"<40a14d8a-b92f-c006-ee31-16082e818208@denx.de>","list_archive_url":null,"date":"2017-08-24T07:14:27","subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","submitter":{"id":5771,"url":"http://patchwork.ozlabs.org/api/people/5771/","name":"Stefano Babic","email":"sbabic@denx.de"},"content":"Hi Christian,\n\nOn 24/08/2017 09:07, Christian Storm wrote:\n> Hi Stefano,\n> \n>>>>> [...]\n>>>>> Ah, OK, the commit message is misleading :)\n>>>>> The intention for this patch was to create the ability to send a wake up\n>>>>> call to suricatta while it is sleeping in order to abort the sleep and\n>>>>> resume work immediately. Something along the lines of waking up a daemon\n>>>>> via UNIX signal but for suricatta and via its IPC.\n>>>>\n>>>> right - instead of UNIX signals, the server is triggered via IPC.\n>>>>\n>>>>> The motivation was that,\n>>>>> say, suricatta sleeps and then some external trigger comes in so that\n>>>>> suricatta should resume operation immediately.\n>>>>\n>>>> I do this in two ways:\n>>>>\n>>>> - at the startup: swupdate started with -u \"-c 6\" (WAIT) and it blocks\n>>>> until I send a IPC message.\n>>>>\n>>>> - during \"normal\" activities: I send a \"CONFIG\" ipc (that wakes up\n>>>> suricatta immediately) with a low value for \"polling\". Value is active\n>>>> after server_hawkbit process the IPC. And when I do not need that\n>>>> suricatta processes immediately, Isend a further CONFIG increasing the\n>>>> polling (or the \"polling\" value set by hawkbit will be taken).\n>>>\n>>> Yes, right, any IPC wakes up suricatta, so does \"CONFIG\". I think\n>>> (ab)using \"CONFIG\" for this purpose is a bit to implicit for me and/or\n>>> demands for proper documentation how to use the \"CONFIG\" IPC feature for\n>>> waking up suricatta. I like to have it explicit and hence came up\n>>> with this proposal.\n>>\n>> The weird thing for me is that the \"WAKE\" is not really a IPC command,\n>> but the side-effect is to wake-up the process. \n> \n> Yes, essentially this command is a NOP as the side effect as you called\n> it does the intended operation, namely waking up. But this is purely due\n> to the implementation and not \"visible\" to the user.\n> \n>> I think it is nicer to have such as \"GET_CONFIG\" or whatever doing a\n>> real IPC, while your proposal asks the responder in server_hawkbit to\n>> simply come back, because the goal was already reached.\n> \n> OK, but then we should document that whenever someone wants to wake up\n> suricatta \"IPC:GET_CONFIG > /dev/null\" can be used for this purpose.\n\nRight.\n\n> \n> OK, then let's drop this and implement it when suricatta has become a\n> supervisor of it's backend implementations (see below)?\n\n+1\n\n> \n> \n>>> But I'm also fine with documenting the \"wakeup via\n>>> CONFIG\" feature and dropping this patch.\n>>>\n>>>\n>>>>>> [....]\n>>>>>>> diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c\n>>>>>>> index b520978..e1b161b 100644\n>>>>>>> --- a/suricatta/suricatta.c\n>>>>>>> +++ b/suricatta/suricatta.c\n>>>>>>> @@ -47,7 +47,11 @@ int suricatta_wait(int seconds)\n>>>>>>>  \t}\n>>>>>>>  \tif (retval && FD_ISSET(sw_sockfd, &readfds)) {\n>>>>>>>  \t\tTRACE(\"Suricatta woke up for IPC at %ld seconds\", tv.tv_sec);\n>>>>>>> -\t\tif (server.ipc(sw_sockfd) != SERVER_OK){\n>>>>>>> +\t\tserver_op_res_t result = server.ipc(sw_sockfd);\n>>>>>>> +\t\tif (result == SERVER_OK_WAKEUP) {\n>>>>>>> +\t\t\treturn 0;\n>>>>>>> +\t\t}\n>>>>>>\n>>>>>> I think that this breaks the concept. Suricatta (as standalone daemone)\n>>>>>> should not know what the single servers (even if we have just\n>>>>>> server_hawkbit) are doing. The logic should be in server hawkbit and not\n>>>>>> here, if necessary.\n>>>>>\n>>>>> OK, then suricatta has to become a supervisor process for the server\n>>>>> processes, right?\n>>>>\n>>>> Right, this is the concept. It is just the daemon / supervisor without\n>>>> any knowledge of the current server implementation.\n>>>>\n>>>>> Currently, suricatta.c sleeps and calls out to the\n>>>>> server implementation, i.e., for now hawkbit.\n>>>>\n>>>> For now just Hawkbit. In the future, we can add multiple implementations\n>>>> and we could also think if all these implementations are allowed to run\n>>>> at the same time. IMHO several implementatiosn is just a question of\n>>>> time, when someone will require further backend to be supported.\n>>>> Multiple instances at once is maybe not a use case.\n>>>\n>>> Hm, I can imagine installing two \"types\" of artifacts via SWUpdate, one\n>>> being firmware and one being, e.g., applications in a broader sense,\n>>> given that SWUpdate is used to update distributions as I recently read \n>>> on this list :)\n>>> And those may come from two different backends, meaning either two\n>>> instances of a suricatta server implementation running or two separate\n>>> SWUpdate processes running, one for each backend.\n>>>\n>>>>> This way, suricatta.c can\n>>>>> then forward such IPC to the multiple server implementations.\n>>>>\n>>>> Right.\n>>>\n>>> OK, so then we go forward with dropping this and implementing the\n>>> suricatta.c supervisor feature? This would be fine with me...\n>>\n>> I think it is fine if I have correctly interpreted hwat you mean with\n>> supervisor feature. IMHO suricatta is just the proxy-interface that let\n>> to communicate with the implementation (hawkbit, whatever,...) of the\n>> backend. Is this what you mind ?\n> \n> Yes, just like swupdate itself spawns processes, suricatta then spawns\n> processes and supervises them. Suricatta should supervise those backend\n> implementation processes (hawkbit,...) and relay IPC to/from them.\n\nRight - if we really need to spawn processes or suricatta simply scans\nall backends in the list, can be decided by design.\n\n> But\n> it is agnostic of the concrete implementations, i.e. rely on IPC only.\n\nRight - this is like the \"main\" and it must not need the implementation.\nBackends register itself with suricatta and suricatta handles them in\nthe same way.\n\n> Whether suricatta spawns those processes itself or whether it's done via\n> swupdate/core means is to be discussed/designed.\n\nRight.\n\n> I guess this is what is meant by the roadmap.rst section \"Support for\n> multiple Servers simultaneously\", right?\n\nExactly.\n\nBest regards,\nStefano","headers":{"Return-Path":"<swupdate+bncBAABBW7Z7HGAKGQEKXTTKFA@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::23e;\n\thelo=mail-lf0-x23e.google.com;\n\tenvelope-from=swupdate+bncbaabbw7z7hgakgqekxttkfa@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"ke56ppgZ\"; dkim-atps=neutral"],"Received":["from mail-lf0-x23e.google.com (mail-lf0-x23e.google.com\n\t[IPv6:2a00:1450:4010:c07::23e])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xdFsr01kZz9t2Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 17:14:39 +1000 (AEST)","by mail-lf0-x23e.google.com with SMTP id f189sf682595lfe.10\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 00:14:38 -0700 (PDT)","by 10.25.212.196 with SMTP id l187ls325884lfg.53.gmail; Thu, 24 Aug\n\t2017 00:14:35 -0700 (PDT)","from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9])\n\tby gmr-mx.google.com with ESMTPS id\n\t2si378343wms.6.2017.08.24.00.14.35 for <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 24 Aug 2017 00:14:35 -0700 (PDT)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xdFsl2Fdwz1rBmg;\n\tThu, 24 Aug 2017 09:14:35 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xdFsl1YSZz3hhTQ;\n\tThu, 24 Aug 2017 09:14:35 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id UteG2aV-JuAg; Thu, 24 Aug 2017 09:14:31 +0200 (CEST)","from babic.homelinux.org\n\t(host-88-217-136-221.customer.m-online.net [88.217.136.221])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPS;\n\tThu, 24 Aug 2017 09:14:31 +0200 (CEST)","from localhost (mail.babic.homelinux.org [127.0.0.1])\n\tby babic.homelinux.org (Postfix) with ESMTP id B1CB94540535;\n\tThu, 24 Aug 2017 09:14:30 +0200 (CEST)","from babic.homelinux.org ([127.0.0.1])\n\tby localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id K7Zp_awmsLhk; Thu, 24 Aug 2017 09:14:27 +0200 (CEST)","from [192.168.178.89] (stefano-MacBookPro.fritz.box\n\t[192.168.178.89])\n\tby babic.homelinux.org (Postfix) with ESMTPS id 9C69D454045E;\n\tThu, 24 Aug 2017 09:14:27 +0200 (CEST)"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503558876; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=cd0388gCzZjUQdS9kmsTLxKzRPDOxYLlebHxWg+6e0Zi9HWcfzjT3/f8A76DYECD3z\n\trJ+/shS6M+obA3TRkO4F4FVgq1q2kzRn6NyPlysrcV/zTC3cfVaRoloGdtH44r/6zZlh\n\tqI8a/2SOj/W7zkAbSTDrzyWowv5VCYws55Ab/1tG3aFaB4iOed4JFCHXVM6PTlOBu4SG\n\tRrRsJM+Vl0yC1XiA1tiUr94MqlzFxjCECHS4j9HytWShpfRroCVXsOOcK6imTkfeyhXX\n\toSpbcFYlh2883bo8+p8HxaeU+2dunJ2bFqr13Pp/xjb+3t7V2/aRMdpkoH4Md6I4q3sC\n\tjJ8w==","i=1; a=rsa-sha256; t=1503558875; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=v6kEHzCxkJKQtdKNkqaZ2rKZdjXHxcEqNM+f2pQj5furo48wUGxkAh8vhIRC+g3+nx\n\tM70VhPzY4VL/0fzvz8zTyO6VxtCRdnp6/9ugqAS0eN3LhF/r+i94j2sGn+Zb6bZQICFQ\n\txFM5Gqd5zXrS3hag7cgvxqFMawGu08cm7meWkVqLpjBMMktx0O55mFt+wX6zxgatiW9H\n\t7bb6rvvGzJ0zSnW0FZ6F+B6oppFYZdJEOnGvYFgufWw1V27EkSy1J2qQ1t0St560GrR1\n\tqf4EhwwTcjky4Yxc9xuipDu6XN4s0WseiRlQFqNX3OhHB+YeUf7ywMpcrEmccz9mlBuo\n\tsrhA=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:content-language:in-reply-to\n\t:mime-version:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=J77gV9cyICbZvh+bAv+y1KuTsnRaKGWkDpXnS5P66qo=;\n\tb=sG+KYqFKZZsGL7OvGrsdnuMRENCxYFm/1p2S5a32KTerd5L15s/aK9h2LPOSf0NNYQ\n\tTnEgoR3BiwhtO7DRQd/l62mbQhTxzogOgd8MCBvlhH++hx0L0QzwmUahgfGbcHzp1nGZ\n\tAY/ZfOYwzaIyN6CfEygZxw1pnm0ZyokS4HG5Y3c+amr5jTIyUON9VTEBLc0x0LWzoRLz\n\t42M/WVUSGtJLmZ6NtfMbSp/+Mz3xSYCwWMUsVv2baD4xDCJEKS9vxAHUfGnoEWfbrHG3\n\to5wpZ7trAICmF4+gv/AaH5XfHVM1o53aiCTQ9olL+XYlQ4Ao8rp6aGrWNpHO/mWFzExW\n\th6TA==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=content-transfer-encoding:content-language:in-reply-to:mime-version\n\t:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results;\n\tbh=k4iwa8i1D6P520MDvocOErWAzdw9S7DvCP8ZykGoPt4=;\n\tb=Wic9YWCBs6VzOudBqXlT0g1WrE/SuBmpxv/HqAfdm8zU4hrOctd8bNaTE83XtV9hGc\n\tsHvbVZIVxZ22jT6sYpelUwOMHiLlYtni573xsYKKGyPFfC4wR6k6q/AX0LuFGuOW81/y\n\tz/BSuGUm8RjCwFFZxxMw0Z8wmQJrkH2Ua18aJCjRkSAZkm+kSdcliFhF1bIMAlZJl3IC\n\tXRwo70jpYNI9ndqOnP4KgAT+oTpKvtuFHMu9HoXFbZuvmuiSFFXb/1p9D/deXk/FfCe3\n\tInycI8emBH881eamaErDNnOuITzwTNC+bOQfPG/D7ZdkhE+4Ep+7rycTE7AWc28+B6j1\n\thHXQ=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.9 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.9 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:subject:to:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=J77gV9cyICbZvh+bAv+y1KuTsnRaKGWkDpXnS5P66qo=;\n\tb=ke56ppgZBA8QcUEns2p2NeOHYO7w5uDtdTnJI8rf6EQK3K6nLAji6Rc19oUTro7/jk\n\tDARwyXZQBYygRjyb1fj99gw2OO6nKUe1i9i90KLfRER639TLqyzBctpTQPPqPgEhXog6\n\tcnCxd2KTGfV2Wr+S/NF0JIBsicPbD8hSnwCdffBqv4unWVwv3W+H166FrW5dDheTPhoe\n\tGPhQe1cY1FBm0isJPAGLhS8vKK9+rhaEaJQpVF0La9/RPtew/Klk2KcVNWYIVsV1ObDR\n\tzXc7vTEbSSbXzwBm8fq7EGyr1pskGruiJHkga4UM33iojlXDmbg77d976MN0PVSdm4yi\n\t8w9w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:subject:to:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:x-spam-checked-in-group:list-post:list-help\n\t:list-archive:list-subscribe:list-unsubscribe;\n\tbh=J77gV9cyICbZvh+bAv+y1KuTsnRaKGWkDpXnS5P66qo=;\n\tb=pZbqJanjZia16xfMijv6XAv+gXAMCrWIwNH5ZlnAV1utBeV3KitpXVka8/ySZcr8yP\n\tyIj7YYsc8vuM8FIlwq0QAn2tt7c6ykgPYWxU7tzKDkV6FI5OusaXMbKD2P6ojTMz7Zb1\n\tNPRNpFuXKfvIM5qLaA5ShPu4XekNWTCimRpH/qNmp2yIU4Pmn57IqwMLinkE2iFfM2kn\n\toj15ScOrH6per2IT3H44DeS+vgrOouqMAHP51KyCPS7h7xd22FJcYE4NYwl7PxfdU6h/\n\theOBB9ZZg/33f3MpvXRNcG1bqeS5a4rdjP2BGR13C53Jog2si2spCnMSSC+xvu8HXaiu\n\tyMKQ==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5gX2gH96aaBR4GnUelzy3f/j16joBp+GDyoc7RaQJIpsLN3L0wG\n\tB+KxSz2P3S2sgw==","X-Received":["by 10.25.39.200 with SMTP id n191mr5709lfn.18.1503558876124;\n\tThu, 24 Aug 2017 00:14:36 -0700 (PDT)","by 10.46.84.72 with SMTP id y8mr420828ljd.37.1503558875619;\n\tThu, 24 Aug 2017 00:14:35 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 212.18.0.9 is neither permitted nor\n\tdenied by best guess record for domain of sbabic@denx.de)\n\tclient-ip=212.18.0.9; ","X-Virus-Scanned":["amavisd-new at mnet-online.de","Debian amavisd-new at babic.homelinux.org"],"Subject":"Re: [swupdate] [PATCH resent] suricatta: enable IPC to signal wait\n\tabort","To":"swupdate@googlegroups.com, Christian Storm <christian.storm@siemens.com>","References":"<20170824070702.lv747xiyzfjrntip@MD1KR9XC.ww002.siemens.net>","From":"Stefano Babic <sbabic@denx.de>","Message-ID":"<40a14d8a-b92f-c006-ee31-16082e818208@denx.de>","Date":"Thu, 24 Aug 2017 09:14:27 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170824070702.lv747xiyzfjrntip@MD1KR9XC.ww002.siemens.net>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Language":"en-US","X-Original-Sender":"sbabic@denx.de","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 212.18.0.9 is neither permitted nor denied by best guess\n\trecord\n\tfor domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}}]