From patchwork Sun Dec 8 04:11:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Bryant X-Patchwork-Id: 1205579 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47VtFH0FdRz9sPJ for ; Sun, 8 Dec 2019 15:12:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 35BAE8708C; Sun, 8 Dec 2019 04:11:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hq0gi2cSzk1G; Sun, 8 Dec 2019 04:11:54 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 8C4EF86776; Sun, 8 Dec 2019 04:11:54 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6EC4FC1D7D; Sun, 8 Dec 2019 04:11:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3BBD8C077D for ; Sun, 8 Dec 2019 04:11:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 20FCC85161 for ; Sun, 8 Dec 2019 04:11:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eYC5920KWKSX for ; Sun, 8 Dec 2019 04:11:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 22DED81EAF for ; Sun, 8 Dec 2019 04:11:51 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-0-voGs5YOi-777zrdGOd0w-1; Sat, 07 Dec 2019 23:11:48 -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 BCAFD1005513; Sun, 8 Dec 2019 04:11:47 +0000 (UTC) Received: from t480s.redhat.com (ovpn-120-66.rdu2.redhat.com [10.10.120.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1321E5D9D6; Sun, 8 Dec 2019 04:11:46 +0000 (UTC) From: Russell Bryant To: dev@openvswitch.org Date: Sat, 7 Dec 2019 23:11:43 -0500 Message-Id: <20191208041143.374689-2-russell@ovn.org> In-Reply-To: <20191208041143.374689-1-russell@ovn.org> References: <20191208041143.374689-1-russell@ovn.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 0-voGs5YOi-777zrdGOd0w-1 X-Mimecast-Spam-Score: 0 Subject: [ovs-dev] [PATCH ovn v1 2/2] northd: Log all dynamic address assignments X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This patch adds INFO level log messages for all dynamic address assignments (MAC, IPv4, IPv6). While debugging some issues in ovn-kubernetes, I found it would be helpful to see ovn-northd's view of what addresses were assigned where and when from its perspective. Signed-off-by: Russell Bryant Acked-by: Numan Siddique . --- northd/ovn-northd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c index f0847d81e..33d3ff2ad 100644 --- a/northd/ovn-northd.c +++ b/northd/ovn-northd.c @@ -1714,6 +1714,8 @@ update_dynamic_addresses(struct dynamic_address_update *update) break; case DYNAMIC: ip4 = htonl(ipam_get_unused_ip(update->od)); + VLOG_INFO("Assigned dynamic IPv4 address '"IP_FMT"' to port '%s'", + IP_ARGS(ip4), update->op->nbsp->name); } struct eth_addr mac; @@ -1728,6 +1730,8 @@ update_dynamic_addresses(struct dynamic_address_update *update) break; case DYNAMIC: eth_addr_from_uint64(ipam_get_unused_mac(ip4), &mac); + VLOG_INFO("Assigned dynamic MAC address '"ETH_ADDR_FMT"' to port '%s'", + ETH_ADDR_ARGS(mac), update->op->nbsp->name); break; } @@ -1745,6 +1749,11 @@ update_dynamic_addresses(struct dynamic_address_update *update) break; case DYNAMIC: in6_generate_eui64(mac, &update->od->ipam_info.ipv6_prefix, &ip6); + struct ds ip6_ds = DS_EMPTY_INITIALIZER; + ipv6_format_addr(&ip6, &ip6_ds); + VLOG_INFO("Assigned dynamic IPv6 address '%s' to port '%s'", + ip6_ds.string, update->op->nbsp->name); + ds_destroy(&ip6_ds); break; }