From patchwork Thu Sep 5 14:27:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flaviof X-Patchwork-Id: 1158472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flaviof.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46PNLg6DFYz9s3Z for ; Fri, 6 Sep 2019 00:27:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 8F4F31866; Thu, 5 Sep 2019 14:27:18 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 194FA1861 for ; Thu, 5 Sep 2019 14:27:17 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 592C2756 for ; Thu, 5 Sep 2019 14:27:14 +0000 (UTC) Received: by mail-yb1-f180.google.com with SMTP id s142so853511ybc.6 for ; Thu, 05 Sep 2019 07:27:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id :senderwebaddress; bh=8/2PdNyYFeeMkSguJxIa5I0IjPkOfsFnkHpw+jV8m7c=; b=Uj/MdGODK0FaP18dGIgIJL+eynYeXFVPWj0F7Sx6uOnQbMBp5mxeVuX0e72jX+Tnry 5LbH65CGmAJx+XorK94MQG3vy8GUlcF1ZsTvw6PNswfPEzy1tIaA1fmHNjQ+IYJIxJee 3BUKCxFJxGiOAzQgDHcjqGneRacuvYWDES/MWejbzbqb8Y4hbFipXHlSJDOxHPf76TJW ZhC218OpGTTCsHbP8sUD1PZoMpvpYeu86Ik8gv+TnM4NZ4ue+BDapJd2TtUTNsGqrH1V dQZ5MWXK65BhBSEydj1rx0UV/Uu73GZTUuB30+rooEfXEcwCj9U6tVUV1MbyRRlLvmHX Gopw== X-Gm-Message-State: APjAAAXArrLvqbkg8+0c4a5drX9nNotGXp14wuMpSyeEELRCzn2q1GSn CH0GYDQUamFFXp2Lnnj8UU79fhinArY= X-Google-Smtp-Source: APXvYqy89sZsKlYtq+M974DMtMFQSKy6EZqeJYUuFyPldTLqh9AJMgs++SHw4Y5fzbsJQloUMPfReQ== X-Received: by 2002:a25:6054:: with SMTP id u81mr2464845ybb.416.1567693633040; Thu, 05 Sep 2019 07:27:13 -0700 (PDT) Received: from localhost.localdomain (pool-173-76-169-118.bstnma.fios.verizon.net. [173.76.169.118]) by smtp.gmail.com with ESMTPSA id n9sm224834ywh.19.2019.09.05.07.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 07:27:11 -0700 (PDT) From: Flavio Fernandes To: dev@openvswitch.org Date: Thu, 5 Sep 2019 10:27:04 -0400 Message-Id: <20190905142704.19482-1-flavio@flaviof.com> X-Mailer: git-send-email 2.17.1 SenderWebAddress: http://flaviof.com/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPOOFED_FREEMAIL, SUBJ_OBFU_PUNCT_FEW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH ovn] ovn-openstack.rst: Add check for Gateway_Chassis table X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This is related to the section called "Adding a Gateway". Added workaround command for a known issue in networking-ovn. Even after the issue is resolved, it may be useful to have this in the tutorial, so folks have a feel for how OVN keeps track of chassis gateway. Also, removed redundant route command when assigning an address to the br-ex interface. Signed-off-by: Flavio Fernandes --- Documentation/tutorials/ovn-openstack.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/tutorials/ovn-openstack.rst b/Documentation/tutorials/ovn-openstack.rst index 353ef209e..ed30e3044 100644 --- a/Documentation/tutorials/ovn-openstack.rst +++ b/Documentation/tutorials/ovn-openstack.rst @@ -1331,6 +1331,20 @@ with an IP address from the "private" network, then we create a floating IP address on the "public" network, then we associate the port with the floating IP address. +As of this writing, you may need to run the following to fix a +problem with associating a logical port of router with the external +gateway:: + + $ CHASSIS=$(ovn-nbctl --bare --columns="_uuid" find gateway_chassis) ; \ + [ -z "${CHASSIS}" ] && PORT_NAME='' || \ + PORT_NAME=$(ovn-nbctl --bare --columns=name \ + find logical_router_port gateway_chassis="${CHASSIS}") + + $ [ -z "${PORT_NAME}" ] && { + openstack router unset --external-gateway router1 && \ + openstack router set --external-gateway public router1 + } || echo logical port \"${PORT_NAME}\" in chassis \"${CHASSIS}\" + Let's add a new VM ``d`` with a floating IP:: $ openstack server create --nic net-id=private --flavor m1.nano --image $IMAGE_ID --key-name demo d @@ -1347,7 +1361,6 @@ It's also necessary to configure the "public" network because DevStack does not do it automatically:: $ sudo ip link set br-ex up - $ sudo ip route add 172.24.4.0/24 dev br-ex $ sudo ip addr add 172.24.4.1/24 dev br-ex Now you should be able to "ping" VM ``d`` from the OpenStack host::