From nobody Wed May 15 21:32:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646326242016653.7794498666531; Thu, 3 Mar 2022 08:50:42 -0800 (PST) Received: from localhost ([::1]:37216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPof2-0004Id-4N for importer@patchew.org; Thu, 03 Mar 2022 11:50:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPodA-0001et-Ru for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPod5-0000Aq-GV for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:44 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-452-wpT6uS1ANKGfPE4mlR-QEA-1; Thu, 03 Mar 2022 11:48:32 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 948515200; Thu, 3 Mar 2022 16:48:30 +0000 (UTC) Received: from localhost (unknown [10.39.195.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3AA49106D5B1; Thu, 3 Mar 2022 16:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646326113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Yl+fmCaSIhGwR2YDpHeiSfAGxUECubYnl9zBD9emxQ=; b=WFSsgt+8OF2BUHRiqDuw0Ki1zXK13wuZRJlC52x5TOgBU2GEB673jp7AzENf1PvpttGQuU DFUgmflQq0GwYuK13EMzQsB+DnMeYPKsxGdDPNL3CCG9hoHIOuLV8lNeygKLk5JG1VJ0Ec vhxaNQhtLerqtemTj3KABUKjpP/UadQ= X-MC-Unique: wpT6uS1ANKGfPE4mlR-QEA-1 From: Hanna Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 1/4] os-posix: Add os_set_daemonize() Date: Thu, 3 Mar 2022 17:48:11 +0100 Message-Id: <20220303164814.284974-2-hreitz@redhat.com> In-Reply-To: <20220303164814.284974-1-hreitz@redhat.com> References: <20220303164814.284974-1-hreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=hreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Paolo Bonzini , Hanna Reitz , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646326243888100001 Content-Type: text/plain; charset="utf-8" The daemonizing functions in os-posix (os_daemonize() and os_setup_post()) only daemonize the process if the static `daemonize` variable is set. Right now, it can only be set by os_parse_cmd_args(). In order to use os_daemonize() and os_setup_post() from the storage daemon to have it be daemonized, we need some other way to set this `daemonize` variable, because I would rather not tap into the system emulator's arg-parsing code. Therefore, this patch adds an os_set_daemonize() function, which will return an error on os-win32 (because daemonizing is not supported there). Signed-off-by: Hanna Reitz --- include/sysemu/os-posix.h | 1 + include/sysemu/os-win32.h | 5 +++++ os-posix.c | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 2edf33658a..dd64fb401d 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -55,6 +55,7 @@ int os_mlock(void); typedef struct timeval qemu_timeval; #define qemu_gettimeofday(tp) gettimeofday(tp, NULL) =20 +int os_set_daemonize(bool d); bool is_daemonized(void); =20 /** diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index 43f569b5c2..68af96907e 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -77,6 +77,11 @@ typedef struct { } qemu_timeval; int qemu_gettimeofday(qemu_timeval *tp); =20 +static inline int os_set_daemonize(bool d) +{ + return -ENOTSUP; +} + static inline bool is_daemonized(void) { return false; diff --git a/os-posix.c b/os-posix.c index ae6c9f2a5e..24692c8593 100644 --- a/os-posix.c +++ b/os-posix.c @@ -317,6 +317,12 @@ bool is_daemonized(void) return daemonize; } =20 +int os_set_daemonize(bool d) +{ + daemonize =3D d; + return 0; +} + int os_mlock(void) { #ifdef HAVE_MLOCKALL --=20 2.34.1 From nobody Wed May 15 21:32:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646326244346263.89867621359974; Thu, 3 Mar 2022 08:50:44 -0800 (PST) Received: from localhost ([::1]:37430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPof5-0004R6-1w for importer@patchew.org; Thu, 03 Mar 2022 11:50:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPodB-0001ey-1n for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:45706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPod9-0000BY-22 for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:44 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-o9HAlsWuMqeCam1AShQYsA-1; Thu, 03 Mar 2022 11:48:36 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 87C878145F7; Thu, 3 Mar 2022 16:48:35 +0000 (UTC) Received: from localhost (unknown [10.39.195.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 593FE7C04B; Thu, 3 Mar 2022 16:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646326117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TzNVJTw9XfbqAngDFXQJT+f7SYmwcvWm4nrqhTOXpaI=; b=eo93C96nfWivLZBr9JNXWa7WFhD9eMXSDOkVzQF/+DAPuVuwT16tWYgrVrfkUYhvrkm4a/ fckY/dGfET053D0I/nVBd0ejdRYMXXFTriHqCl1riuP7SGXkMVUvtb5GgoWMm3/6ZAs+EO wGKOKdvHzdLo9VPUGJ6fJ23WLMud6j0= X-MC-Unique: o9HAlsWuMqeCam1AShQYsA-1 From: Hanna Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 2/4] qsd: Add pre-init argument parsing pass Date: Thu, 3 Mar 2022 17:48:12 +0100 Message-Id: <20220303164814.284974-3-hreitz@redhat.com> In-Reply-To: <20220303164814.284974-1-hreitz@redhat.com> References: <20220303164814.284974-1-hreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=hreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Paolo Bonzini , Hanna Reitz , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646326245604100003 Content-Type: text/plain; charset="utf-8" In contrast to qemu-nbd (where it is called --fork) and the system emulator, QSD does not have a --daemonize switch yet. Just like them, QSD allows setting up block devices and exports on the command line. When doing so, it is often necessary for whoever invoked the QSD to wait until these exports are fully set up. A --daemonize switch allows precisely this, by virtue of the parent process exiting once everything is set up. Note that there are alternative ways of waiting for all exports to be set up, for example: - Passing the --pidfile option and waiting until the respective file exists (but I do not know if there is a way of implementing this without a busy wait loop) - Set up some network server (e.g. on a Unix socket) and have the QSD connect to it after all arguments have been processed by appending corresponding --chardev and --monitor options to the command line, and then wait until the QSD connects Having a --daemonize option would make this simpler, though, without having to rely on additional tools (to set up a network server) or busy waiting. Implementing a --daemonize switch means having to fork the QSD process. Ideally, we should do this as early as possible: All the parent process has to do is to wait for the child process to signal completion of its set-up phase, and therefore there is basically no initialization that needs to be done before the fork. On the other hand, forking after initialization steps means having to consider how those steps (like setting up the block layer or QMP) interact with a later fork, which is often not trivial. In order to fork this early, we must scan the command line for --daemonize long before our current process_options() call. Instead of adding custom new code to do so, just reuse process_options() and give it a @pre_init_pass argument to distinguish the two passes. I believe there are some other switches but --daemonize that deserve parsing in the first pass: - --help and --version are supposed to only print some text and then immediately exit (so any initialization we do would be for naught). This changes behavior, because now "--blockdev inv-drv --help" will print a help text instead of complaining about the --blockdev argument. Note that this is similar in behavior to other tools, though: "--help" is generally immediately acted upon when finding it in the argument list, potentially before other arguments (even ones before it) are acted on. For example, "ls /does-not-exist --help" prints a help text and does not complain about ENOENT. - --pidfile does not need initialization, and is already exempted from the sequential order that process_options() claims to strictly follow (the PID file is only created after all arguments are processed, not at the time the --pidfile argument appears), so it makes sense to include it in the same category as --daemonize. - Invalid arguments should always be reported as soon as possible. (The same caveat with --help applies: That means that "--blockdev inv-drv --inv-arg" will now complain about --inv-arg, not inv-drv.) This patch does make some references to --daemonize without having implemented it yet, but that will happen in the next patch. Signed-off-by: Hanna Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- storage-daemon/qemu-storage-daemon.c | 43 ++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-sto= rage-daemon.c index 504d33aa91..b798954edb 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -177,7 +177,23 @@ static int getopt_set_loc(int argc, char **argv, const= char *optstring, return c; } =20 -static void process_options(int argc, char *argv[]) +/** + * Process QSD command-line arguments. + * + * This is done in two passes: + * + * First (@pre_init_pass is true), we do a pass where all global + * arguments pertaining to the QSD process (like --help or --daemonize) + * are processed. This pass is done before most of the QEMU-specific + * initialization steps (e.g. initializing the block layer or QMP), and + * so must only process arguments that are not really QEMU-specific. + * + * Second (@pre_init_pass is false), we (sequentially) process all + * QEMU/QSD-specific arguments. Many of these arguments are effectively + * translated to QMP commands (like --blockdev for blockdev-add, or + * --export for block-export-add). + */ +static void process_options(int argc, char *argv[], bool pre_init_pass) { int c; =20 @@ -196,11 +212,26 @@ static void process_options(int argc, char *argv[]) }; =20 /* - * In contrast to the system emulator, options are processed in the or= der - * they are given on the command lines. This means that things must be - * defined first before they can be referenced in another option. + * In contrast to the system emulator, QEMU-specific options are proce= ssed + * in the order they are given on the command lines. This means that t= hings + * must be defined first before they can be referenced in another opti= on. */ + optind =3D 1; while ((c =3D getopt_set_loc(argc, argv, "-hT:V", long_options)) !=3D = -1) { + bool handle_option_pre_init; + + /* Should this argument be processed in the pre-init pass? */ + handle_option_pre_init =3D + c =3D=3D '?' || + c =3D=3D 'h' || + c =3D=3D 'V' || + c =3D=3D OPTION_PIDFILE; + + /* Process every option only in its respective pass */ + if (pre_init_pass !=3D handle_option_pre_init) { + continue; + } + switch (c) { case '?': exit(EXIT_FAILURE); @@ -334,6 +365,8 @@ int main(int argc, char *argv[]) qemu_init_exec_dir(argv[0]); os_setup_signal_handling(); =20 + process_options(argc, argv, true); + module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_TRACE); qemu_add_opts(&qemu_trace_opts); @@ -348,7 +381,7 @@ int main(int argc, char *argv[]) qemu_set_log(LOG_TRACE); =20 qemu_init_main_loop(&error_fatal); - process_options(argc, argv); + process_options(argc, argv, false); =20 /* * Write the pid file after creating chardevs, exports, and NBD server= s but --=20 2.34.1 From nobody Wed May 15 21:32:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646326361940621.5455234726456; Thu, 3 Mar 2022 08:52:41 -0800 (PST) Received: from localhost ([::1]:44702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPogz-0000vq-IX for importer@patchew.org; Thu, 03 Mar 2022 11:52:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPodD-0001ih-IO for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPodA-0000ln-U4 for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:47 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-338-1zffhKgvOZyJ3-61Zhc9lQ-1; Thu, 03 Mar 2022 11:48:42 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7D5CC81CCF1; Thu, 3 Mar 2022 16:48:41 +0000 (UTC) Received: from localhost (unknown [10.39.195.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C4457C04B; Thu, 3 Mar 2022 16:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646326124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tT8v2xkK8dE0AwH7hHwXA0EYqiVqL7bIVjBqluPDg4A=; b=FyL9019RfCnuZzzOjFBTe3RScHCc4YDHG9npAKns9UJ8VuGioXWZVid6Jwn69/diLRIZwu NMQ6bOT6mdfaEFvLQAu/nVTfsg9Lq0kJKqmeQ2fxDGIJAN+t6tuvUeN0EBpQKjVlrzBrh0 4nDDlUwIhEbMRdJXW/Tl3rzeUr9diSQ= X-MC-Unique: 1zffhKgvOZyJ3-61Zhc9lQ-1 From: Hanna Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 3/4] qsd: Add --daemonize Date: Thu, 3 Mar 2022 17:48:13 +0100 Message-Id: <20220303164814.284974-4-hreitz@redhat.com> In-Reply-To: <20220303164814.284974-1-hreitz@redhat.com> References: <20220303164814.284974-1-hreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=hreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Paolo Bonzini , Hanna Reitz , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646326380930100001 Content-Type: text/plain; charset="utf-8" To implement this, we reuse the existing daemonizing functions from the system emulator, which mainly do the following: - Fork off a child process, and set up a pipe between parent and child - The parent process waits until the child sends a status byte over the pipe (0 means that the child was set up successfully; anything else (including errors or EOF) means that the child was not set up successfully), and then exits with an appropriate exit status - The child process enters a new session (forking off again), changes the umask, and will ignore terminal signals from then on - Once set-up is complete, the child will chdir to /, redirect all standard I/O streams to /dev/null, and tell the parent that set-up has been completed successfully In contrast to qemu-nbd's --fork implementation, during the set up phase, error messages are not piped through the parent process. qemu-nbd mainly does this to detect errors, though (while os_daemonize() has the child explicitly signal success after set up); because we do not redirect stderr after forking, error messages continue to appear on whatever the parent's stderr was (until set up is complete). Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake --- docs/tools/qemu-storage-daemon.rst | 7 +++++++ storage-daemon/qemu-storage-daemon.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/tools/qemu-storage-daemon.rst b/docs/tools/qemu-storage-d= aemon.rst index 878e6a5c5c..8b97592663 100644 --- a/docs/tools/qemu-storage-daemon.rst +++ b/docs/tools/qemu-storage-daemon.rst @@ -154,6 +154,13 @@ Standard options: created but before accepting connections. The daemon has started success= fully when the pid file is written and clients may begin connecting. =20 +.. option:: --daemonize + + Daemonize the process. The parent process will exit once startup is comp= lete + (i.e., after the pid file has been or would have been written) or failure + occurs. Its exit code reflects whether the child has started up successf= ully + or failed to do so. + Examples -------- Launch the daemon with QMP monitor socket ``qmp.sock`` so clients can exec= ute diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-sto= rage-daemon.c index b798954edb..9f2c3332bf 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -137,6 +137,9 @@ static void help(void) "\n" " --pidfile write process ID to a file after startup\n" "\n" +" --daemonize daemonize the process, and have the parent exit\= n" +" once startup is complete\n" +"\n" QEMU_HELP_BOTTOM "\n", error_get_progname()); } @@ -144,6 +147,7 @@ QEMU_HELP_BOTTOM "\n", enum { OPTION_BLOCKDEV =3D 256, OPTION_CHARDEV, + OPTION_DAEMONIZE, OPTION_EXPORT, OPTION_MONITOR, OPTION_NBD_SERVER, @@ -200,6 +204,7 @@ static void process_options(int argc, char *argv[], boo= l pre_init_pass) static const struct option long_options[] =3D { {"blockdev", required_argument, NULL, OPTION_BLOCKDEV}, {"chardev", required_argument, NULL, OPTION_CHARDEV}, + {"daemonize", no_argument, NULL, OPTION_DAEMONIZE}, {"export", required_argument, NULL, OPTION_EXPORT}, {"help", no_argument, NULL, 'h'}, {"monitor", required_argument, NULL, OPTION_MONITOR}, @@ -225,6 +230,7 @@ static void process_options(int argc, char *argv[], boo= l pre_init_pass) c =3D=3D '?' || c =3D=3D 'h' || c =3D=3D 'V' || + c =3D=3D OPTION_DAEMONIZE || c =3D=3D OPTION_PIDFILE; =20 /* Process every option only in its respective pass */ @@ -277,6 +283,12 @@ static void process_options(int argc, char *argv[], bo= ol pre_init_pass) qemu_opts_del(opts); break; } + case OPTION_DAEMONIZE: + if (os_set_daemonize(true) < 0) { + error_report("--daemonize not supported in this build"); + exit(EXIT_FAILURE); + } + break; case OPTION_EXPORT: { Visitor *v; @@ -367,6 +379,8 @@ int main(int argc, char *argv[]) =20 process_options(argc, argv, true); =20 + os_daemonize(); + module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_TRACE); qemu_add_opts(&qemu_trace_opts); @@ -389,6 +403,7 @@ int main(int argc, char *argv[]) * it. */ pid_file_init(); + os_setup_post(); =20 while (!exit_requested) { main_loop_wait(false); --=20 2.34.1 From nobody Wed May 15 21:32:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646326254076973.003260269638; Thu, 3 Mar 2022 08:50:54 -0800 (PST) Received: from localhost ([::1]:38148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPofE-0004uE-U2 for importer@patchew.org; Thu, 03 Mar 2022 11:50:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPodM-0002Ac-Nw for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:54671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPodJ-0001KO-8Z for qemu-devel@nongnu.org; Thu, 03 Mar 2022 11:48:56 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-347-Snb9KPmqOZOfvdwnGvIpiQ-1; Thu, 03 Mar 2022 11:48:51 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EF2B6824FAA; Thu, 3 Mar 2022 16:48:48 +0000 (UTC) Received: from localhost (unknown [10.39.195.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 566B9303E5; Thu, 3 Mar 2022 16:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646326132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wSxSL+f0M8nFUQcfvmSxUf412Cy+LsPHlTN6qYlHFx0=; b=ccbzZHL/6dNeM8X2bZhWvKKe2+PhddiWgF3HoFd+Jt8J+XCGRrbSHfkFRax8tn8OJT+M5z VJ5krIOLrwITFX/gC/3lKFlOkYPDvbSgwch8fwmPZtxY2079O+EGAvK62Me0qUtn6s9B1j E2v3ZbEbJJRwNILPJQc5sVfh2r+GNDw= X-MC-Unique: Snb9KPmqOZOfvdwnGvIpiQ-1 From: Hanna Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 4/4] iotests/185: Add post-READY quit tests Date: Thu, 3 Mar 2022 17:48:14 +0100 Message-Id: <20220303164814.284974-5-hreitz@redhat.com> In-Reply-To: <20220303164814.284974-1-hreitz@redhat.com> References: <20220303164814.284974-1-hreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=hreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Paolo Bonzini , Hanna Reitz , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646326255729100004 Content-Type: text/plain; charset="utf-8" 185 tests quitting qemu while a block job is active. It does not specifically test quitting qemu while a mirror or active commit job is in its READY phase. Add two test cases for this, where we respectively mirror or commit to an external QSD instance, which provides a throttled block device. qemu is supposed to cancel the job so that it can quit as soon as possible instead of waiting for the job to complete (which it did before 6.2). Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/185 | 190 ++++++++++++++++++++++++++++++++++++- tests/qemu-iotests/185.out | 48 ++++++++++ 2 files changed, 237 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185 index f2ec5c5ceb..8b1143dc16 100755 --- a/tests/qemu-iotests/185 +++ b/tests/qemu-iotests/185 @@ -33,6 +33,12 @@ _cleanup() _rm_test_img "${TEST_IMG}.copy" _cleanup_test_img _cleanup_qemu + + if [ -f "$TEST_DIR/qsd.pid" ]; then + kill -SIGKILL "$(cat "$TEST_DIR/qsd.pid")" + rm -f "$TEST_DIR/qsd.pid" + fi + rm -f "$SOCK_DIR/qsd.sock" } trap "_cleanup; exit \$status" 0 1 2 3 15 =20 @@ -45,7 +51,7 @@ _supported_fmt qcow2 _supported_proto file _supported_os Linux =20 -size=3D64M +size=3D$((64 * 1048576)) TEST_IMG=3D"${TEST_IMG}.base" _make_test_img $size =20 echo @@ -216,6 +222,188 @@ wait=3D1 _cleanup_qemu | grep -v 'JOB_STATUS_CHANGE' =20 _check_test_img =20 +echo +echo =3D=3D=3D Start mirror to throttled QSD and exit qemu =3D=3D=3D +echo + +# Mirror to a throttled QSD instance (so that qemu cannot drain the +# throttling), wait for READY, then write some data to the device, +# and then quit qemu. +# (qemu should force-cancel the job and not wait for the data to be +# written to the target.) + +_make_test_img $size + +# Will be used by this and the next case +set_up_throttled_qsd() { + $QSD \ + --object throttle-group,id=3Dthrgr,limits.bps-total=3D1048576 \ + --blockdev null-co,node-name=3Dnull,size=3D$size \ + --blockdev throttle,node-name=3Dthrottled,throttle-group=3Dthrgr,f= ile=3Dnull \ + --nbd-server addr.type=3Dunix,addr.path=3D"$SOCK_DIR/qsd.sock" \ + --export nbd,id=3Dexp,node-name=3Dthrottled,name=3Dtarget,writable= =3Dtrue \ + --pidfile "$TEST_DIR/qsd.pid" \ + --daemonize +} + +set_up_throttled_qsd + +# Need a virtio-blk device so that qemu-io writes will not block the monit= or +_launch_qemu \ + --blockdev file,node-name=3Dsource-proto,filename=3D"$TEST_IMG" \ + --blockdev qcow2,node-name=3Dsource-fmt,file=3Dsource-proto \ + --device virtio-blk,id=3Dvblk,drive=3Dsource-fmt \ + --blockdev "{\"driver\": \"nbd\", + \"node-name\": \"target\", + \"server\": { + \"type\": \"unix\", + \"path\": \"$SOCK_DIR/qsd.sock\" + }, + \"export\": \"target\"}" + +h=3D$QEMU_HANDLE +_send_qemu_cmd $h '{"execute": "qmp_capabilities"}' 'return' + +# Use sync=3Dtop, so the first pass will not copy the whole image +_send_qemu_cmd $h \ + '{"execute": "blockdev-mirror", + "arguments": { + "job-id": "mirror", + "device": "source-fmt", + "target": "target", + "sync": "top" + }}' \ + 'return' \ + | grep -v JOB_STATUS_CHANGE # Ignore these events during creation + +# This too will be used by this and the next case +# $1: QEMU handle +# $2: Image size +wait_for_job_and_quit() { + h=3D$1 + size=3D$2 + + # List of expected events + capture_events=3D'BLOCK_JOB_READY JOB_STATUS_CHANGE' + _wait_event $h 'BLOCK_JOB_READY' + QEMU_EVENTS=3D # Ignore all JOB_STATUS_CHANGE events that came before = READY + + # Write something to the device for post-READY mirroring. Write it in + # blocks matching the cluster size, each spaced one block apart, so + # that the mirror job will have to spawn one request per cluster. + # Because the number of concurrent requests is limited (to 16), this + # limits the number of bytes concurrently in flight, which speeds up + # cancelling the job (in-flight requests still are waited for). + # To limit the number of bytes in flight, we could alternatively pass + # something for blockdev-mirror's @buf-size parameter, but + # block-commit does not have such a parameter, so we need to figure + # something out that works for both. + + cluster_size=3D65536 + step=3D$((cluster_size * 2)) + + echo '--- Writing data to the virtio-blk device ---' + + for ofs in $(seq 0 $step $((size - step))); do + qemu_io_cmd=3D"qemu-io -d vblk/virtio-backend " + qemu_io_cmd+=3D"\\\"aio_write $ofs $cluster_size\\\"" + + # Do not include these requests in the reference output + # (it's just too much) + silent=3Dyes _send_qemu_cmd $h \ + "{\"execute\": \"human-monitor-command\", + \"arguments\": { + \"command-line\": \"$qemu_io_cmd\" + }}" \ + 'return' + done + + # Wait until the job's length is updated to reflect the write requests + + # We have written to half of the device, so this is the expected job l= ength + final_len=3D$((size / 2)) + timeout=3D100 # unit: 0.1 seconds + while true; do + len=3D$( + _send_qemu_cmd $h \ + '{"execute": "query-block-jobs"}' \ + 'return.*"len": [0-9]\+' \ + | grep 'return.*"len": [0-9]\+' \ + | sed -e 's/.*"len": \([0-9]\+\).*/\1/' + ) + if [ "$len" -eq "$final_len" ]; then + break + fi + timeout=3D$((timeout - 1)) + if [ "$timeout" -eq 0 ]; then + echo "ERROR: Timeout waiting for job to reach len=3D$final_len" + break + fi + sleep 0.1 + done + + sleep 1 + + _send_qemu_cmd $h \ + '{"execute": "quit"}' \ + 'return' + + # List of expected events + capture_events=3D'BLOCK_JOB_CANCELLED JOB_STATUS_CHANGE SHUTDOWN' + _wait_event $h 'SHUTDOWN' + QEMU_EVENTS=3D # Ignore all JOB_STATUS_CHANGE events that came before = SHUTDOWN + _wait_event $h 'JOB_STATUS_CHANGE' # standby + _wait_event $h 'JOB_STATUS_CHANGE' # ready + _wait_event $h 'JOB_STATUS_CHANGE' # aborting + # Filter the offset (depends on when exactly `quit` was issued) + _wait_event $h 'BLOCK_JOB_CANCELLED' \ + | sed -e 's/"offset": [0-9]\+/"offset": (filtered)/' + _wait_event $h 'JOB_STATUS_CHANGE' # concluded + _wait_event $h 'JOB_STATUS_CHANGE' # null + + wait=3Dyes _cleanup_qemu + + kill -SIGTERM "$(cat "$TEST_DIR/qsd.pid")" +} + +wait_for_job_and_quit $h $size + +echo +echo =3D=3D=3D Start active commit to throttled QSD and exit qemu =3D=3D= =3D +echo + +# Same as the above, but instead of mirroring, do an active commit + +_make_test_img $size + +set_up_throttled_qsd + +_launch_qemu \ + --blockdev "{\"driver\": \"nbd\", + \"node-name\": \"target\", + \"server\": { + \"type\": \"unix\", + \"path\": \"$SOCK_DIR/qsd.sock\" + }, + \"export\": \"target\"}" \ + --blockdev file,node-name=3Dsource-proto,filename=3D"$TEST_IMG" \ + --blockdev qcow2,node-name=3Dsource-fmt,file=3Dsource-proto,backing=3D= target \ + --device virtio-blk,id=3Dvblk,drive=3Dsource-fmt + +h=3D$QEMU_HANDLE +_send_qemu_cmd $h '{"execute": "qmp_capabilities"}' 'return' + +_send_qemu_cmd $h \ + '{"execute": "block-commit", + "arguments": { + "job-id": "commit", + "device": "source-fmt" + }}' \ + 'return' \ + | grep -v JOB_STATUS_CHANGE # Ignore these events during creation + +wait_for_job_and_quit $h $size + # success, all done echo "*** done" rm -f $seq.full diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out index 754a641258..70e8dd6c87 100644 --- a/tests/qemu-iotests/185.out +++ b/tests/qemu-iotests/185.out @@ -116,4 +116,52 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 cluste= r_size=3D65536 extended_l2=3Doff {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 524288, "speed": 65536, "type": "stream"}} No errors were found on the image. + +=3D=3D=3D Start mirror to throttled QSD and exit qemu =3D=3D=3D + +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{"execute": "qmp_capabilities"} +{"return": {}} +{"execute": "blockdev-mirror", + "arguments": { + "job-id": "mirror", + "device": "source-fmt", + "target": "target", + "sync": "top" + }} +{"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "mirror", "len": 0, "offset": 0, "s= peed": 0, "type": "mirror"}} +--- Writing data to the virtio-blk device --- +{"execute": "quit"} +{"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "mirror", "len": 33554432, "off= set": (filtered), "speed": 0, "type": "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "mirror"}} + +=3D=3D=3D Start active commit to throttled QSD and exit qemu =3D=3D=3D + +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{"execute": "qmp_capabilities"} +{"return": {}} +{"execute": "block-commit", + "arguments": { + "job-id": "commit", + "device": "source-fmt" + }} +{"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "commit", "len": 0, "offset": 0, "s= peed": 0, "type": "commit"}} +--- Writing data to the virtio-blk device --- +{"execute": "quit"} +{"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "commit", "len": 33554432, "off= set": (filtered), "speed": 0, "type": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "commit"}} *** done --=20 2.34.1