From patchwork Mon Jul 29 20:47:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosemarie O'Riorden X-Patchwork-Id: 1966225 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Yi4tFhOV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WXr5T0cP5z1yZD for ; Tue, 30 Jul 2024 06:47:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D0EB7608B4; Mon, 29 Jul 2024 20:47:20 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id RGVRou54NaHz; Mon, 29 Jul 2024 20:47:19 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 94B53606D0 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Yi4tFhOV Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 94B53606D0; Mon, 29 Jul 2024 20:47:19 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2142EC002B; Mon, 29 Jul 2024 20:47:19 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 47F4FC002A for ; Mon, 29 Jul 2024 20:47:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2AC4740245 for ; Mon, 29 Jul 2024 20:47:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id T6o8Ft-vlmPU for ; Mon, 29 Jul 2024 20:47:16 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=roriorden@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org A2CBD40148 Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A2CBD40148 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Yi4tFhOV Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id A2CBD40148 for ; Mon, 29 Jul 2024 20:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722286034; 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; bh=VAkbxirsZtcjpy+LqPwvf1+Ctj/aXYy8B7QQk1Tx9sA=; b=Yi4tFhOVG5xmQ0bm7dP+qNJfukHsp6M417KLFXB4mSLozmlQnbyN2mz46zCvu4h1JBmmyy uQySBct/IST0v9GhLCNGO/39KuQpcZ4tXorYF6YGCFRP8FjNBEfuSuhnzhhH22+7E8/3E8 Ma/Rvc3d+b+k5vznNmst6T79SB13gHM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-172-JW2qCBOINe-ZoWhgZGwViQ-1; Mon, 29 Jul 2024 16:47:13 -0400 X-MC-Unique: JW2qCBOINe-ZoWhgZGwViQ-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4EFAD19560A2; Mon, 29 Jul 2024 20:47:12 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.9.22]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9FB151955F40; Mon, 29 Jul 2024 20:47:10 +0000 (UTC) From: Rosemarie O'Riorden To: ovs-dev@openvswitch.org Cc: roriorden@redhat.com, dceara@redhat.com, i.maximets@ovn.org Date: Mon, 29 Jul 2024 16:47:04 -0400 Message-ID: <20240729204704.51030-1-roriorden@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn] controller, controller-vtep: Add --unixctl option. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" All other OVN daemons have the --unixctl option to specify the control socket file. It was missing from ovn-controller and ovn-controller-vtep, which this patch fixes. The ovn-controller-vtep documentation was also missing the already supported --help and --version options, which are now reflected in the docs. Reported-at: https://issues.redhat.com/browse/FDP-714 Signed-off-by: Rosemarie O'Riorden --- controller-vtep/ovn-controller-vtep.8.xml | 5 +++++ controller-vtep/ovn-controller-vtep.c | 11 ++++++++++- controller/ovn-controller.8.xml | 3 ++- controller/ovn-controller.c | 11 ++++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/controller-vtep/ovn-controller-vtep.8.xml b/controller-vtep/ovn-controller-vtep.8.xml index 89acae7ed..6aec43fa7 100644 --- a/controller-vtep/ovn-controller-vtep.8.xml +++ b/controller-vtep/ovn-controller-vtep.8.xml @@ -28,6 +28,11 @@ +

Other Options

+ +

+ +

Configuration

ovn-controller-vtep retrieves its configuration diff --git a/controller-vtep/ovn-controller-vtep.c b/controller-vtep/ovn-controller-vtep.c index 4472e5285..698511482 100644 --- a/controller-vtep/ovn-controller-vtep.c +++ b/controller-vtep/ovn-controller-vtep.c @@ -58,6 +58,9 @@ static char *vtep_remote; static char *ovnsb_remote; static char *default_db_; +/* --unixctl-path: Path to use for unixctl server socket. */ +static char *unixctl_path; + /* Returns true if the northd internal version stored in SB_Global * and ovn-controller-vtep internal version match. */ @@ -118,7 +121,7 @@ main(int argc, char *argv[]) daemonize_start(false, false); - char *abs_unixctl_path = get_abs_unix_ctl_path(NULL); + char *abs_unixctl_path = get_abs_unix_ctl_path(unixctl_path); retval = unixctl_server_create(abs_unixctl_path, &unixctl); free(abs_unixctl_path); @@ -287,6 +290,7 @@ parse_options(int argc, char *argv[]) {"vtep-db", required_argument, NULL, 'D'}, {"help", no_argument, NULL, 'h'}, {"version", no_argument, NULL, 'V'}, + {"unixctl", required_argument, NULL, 'u'}, VLOG_LONG_OPTIONS, OVN_DAEMON_LONG_OPTIONS, STREAM_SSL_LONG_OPTIONS, @@ -322,6 +326,10 @@ parse_options(int argc, char *argv[]) ovn_print_version(OFP13_VERSION, OFP13_VERSION); exit(EXIT_SUCCESS); + case 'u': + unixctl_path = optarg; + break; + VLOG_OPTION_HANDLERS OVN_DAEMON_OPTION_HANDLERS STREAM_SSL_OPTION_HANDLERS @@ -364,6 +372,7 @@ Options:\n\ (default: %s)\n\ --ovnsb-db=DATABASE connect to ovn-sb database at DATABASE\n\ (default: %s)\n\ + -u, --unixctl=SOCKET set control socket name\n\ -h, --help display this help message\n\ -o, --options list available options\n\ -V, --version display version information\n\ diff --git a/controller/ovn-controller.8.xml b/controller/ovn-controller.8.xml index faefa77b9..bcae4617e 100644 --- a/controller/ovn-controller.8.xml +++ b/controller/ovn-controller.8.xml @@ -47,7 +47,8 @@

Other Options

- + +

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index f5674184a..936b42636 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -137,6 +137,9 @@ static const char *ssl_private_key_file; static const char *ssl_certificate_file; static const char *ssl_ca_cert_file; +/* --unixctl-path: Path to use for unixctl server socket. */ +static char *unixctl_path; + /* By default don't set an upper bound for the lflow cache and enable auto * trimming above 10K logical flows when reducing cache size by 50%. */ @@ -4835,7 +4838,7 @@ main(int argc, char *argv[]) daemonize_start(true, false); - char *abs_unixctl_path = get_abs_unix_ctl_path(NULL); + char *abs_unixctl_path = get_abs_unix_ctl_path(unixctl_path); retval = unixctl_server_create(abs_unixctl_path, &unixctl); free(abs_unixctl_path); if (retval) { @@ -5957,6 +5960,7 @@ parse_options(int argc, char *argv[]) static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"version", no_argument, NULL, 'V'}, + {"unixctl", required_argument, NULL, 'u'}, VLOG_LONG_OPTIONS, OVN_DAEMON_LONG_OPTIONS, STREAM_SSL_LONG_OPTIONS, @@ -5986,6 +5990,10 @@ parse_options(int argc, char *argv[]) printf("SB DB Schema %s\n", sbrec_get_db_version()); exit(EXIT_SUCCESS); + case 'u': + unixctl_path = optarg; + break; + VLOG_OPTION_HANDLERS OVN_DAEMON_OPTION_HANDLERS @@ -6061,6 +6069,7 @@ usage(void) daemon_usage(); vlog_usage(); printf("\nOther options:\n" + " -u, --unixctl=SOCKET set control socket name\n" " -n custom chassis name\n" " -h, --help display this help message\n" " -V, --version display version information\n");