[Bug 1915829] Re: FQDN / hostname recorded in OVSDB is unreliable

James Page 1915829 at bugs.launchpad.net
Thu May 13 12:53:09 UTC 2021


$ sudo ovs-vsctl remove open-vswitch . external-ids hostname

$ sudo ovs-vsctl remove open-vswitch . external-ids hostname

$ sudo ovs-vsctl list open-vswitch
_uuid               : c81d24ea-3ca1-4064-8e67-b91ac6ca801b
bridges             : [1c3c998d-7158-46b0-bea3-04f94d474ed0, 6d4fa31d-07a6-4ca7-b9b9-7ca0adefd8d3]
cur_cfg             : 21
datapath_types      : [netdev, system]
datapaths           : {}
db_version          : "8.2.0"
dpdk_initialized    : false
dpdk_version        : none
external_ids        : {hostname=juju-9060b4-zaza-f9005861d6e6-23.project.serverstack, ovn-bridge-mappings="physnet1:br-ex", ovn-cms-options=enable-chassis-as-gw, ovn-encap-ip="10.5.0.32", ovn-encap-type=geneve, ovn-remote="ssl:10.5.0.35:6642,ssl:10.5.0.38:6642,ssl:10.5.0.9:6642", rundir="/var/run/openvswitch", system-id=juju-9060b4-zaza-f9005861d6e6-23.project.serverstack}
iface_types         : [erspan, geneve, gre, internal, ip6erspan, ip6gre, lisp, patch, stt, system, tap, vxlan]
manager_options     : [a1ec106e-50fb-4238-bc74-880353c222ff]
next_cfg            : 21
other_config        : {}
ovs_version         : "2.13.3"
ssl                 : 7126380d-a763-4a03-81df-d16dfc35f513
statistics          : {}
system_type         : ubuntu
system_version      : "20.10"


$ apt-cache policy openvswitch-switch
openvswitch-switch:
  Installed: 2.13.3-0ubuntu0.20.10.1
  Candidate: 2.13.3-0ubuntu0.20.10.1
  Version table:
 *** 2.13.3-0ubuntu0.20.10.1 500
        500 http://archive.ubuntu.com/ubuntu groovy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.13.1-0ubuntu1.3 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu groovy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu groovy-security/main amd64 Packages
     2.13.1-0ubuntu1 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu groovy/main amd64 Packages


** Tags removed: verification-needed-groovy
** Tags added: verification-done-groovy

** Changed in: cloud-archive/victoria
       Status: Triaged => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to openvswitch in Ubuntu.
https://bugs.launchpad.net/bugs/1915829

Title:
  FQDN / hostname recorded in OVSDB is unreliable

Status in Ubuntu Cloud Archive:
  Fix Released
Status in Ubuntu Cloud Archive ussuri series:
  Fix Committed
Status in Ubuntu Cloud Archive victoria series:
  Invalid
Status in Ubuntu Cloud Archive wallaby series:
  Fix Released
Status in openvswitch package in Ubuntu:
  Fix Released
Status in openvswitch source package in Focal:
  Fix Committed
Status in openvswitch source package in Groovy:
  Fix Committed
Status in openvswitch source package in Hirsute:
  Fix Released

Bug description:
  [ Impact ]

  The Open vSwitch init script `ovs-ctl` determines the system hostname
  and records it in the `external-ids:hostname` field of the `Open-
  vSwitch` table in the local OVSDB.

  This value may be consumed by downstream software and having it unset
  or set to a incorrect value could lead to erratic behavior of a
  system.

  In recent Ubuntu development we have also made it possible to
  configure Open vSwitch with netplan.io, which allows for a Open
  vSwitch controlled data path to be the only external network
  connection on a system.

  As such the current startup sequence of Open vSwitch is insufficient
  to allow for reliable recording of FQDN / hostname at system boot-up
  time.

  Examples of downstream issues can be viewed in bug 1896630 and bug
  1912844 comment #26.

  [ Test Case ]

  1) Deploy bundle on metal:

  series: focal
  machines:
    '0':
      constraints: cores=48
  relations:
   - - octavia:ovsdb-subordinate
     - ovn-chassis:ovsdb-subordinate
  applications:
    ovn-chassis:
      charm: cs:ovn-chassis
      bindings:
        "": public-space
    octavia:
      charm: cs:octavia
      options:
        openstack-origin: distro
      num_units: 1
      to:
      - 'lxd:0'
      bindings:
        "": public-space

  2) juju run --unit ovn-chassis/0 'ovs-vsctl remove open-vswitch . external-ids hostname'
  3) juju run --unit ovn-chassis/0 'sudo shutdown -r now'
  4) Observe external-ids:hostname being recorded as a shortname
  5) Add proposed and install openvswitch packages, repeat step 2-3
  6) Observe external-ids:hostname  being recorded as a FQDN

  [ Regression potential ]

  Minimal, the update uses the exact same methods to accomplish the end
  result of recording the hostname as before, we have only re-ordered
  when the events occur to ensure successful operation.

  [racb] A new service is added in packaging. Users who have overridden
  existing services to change behaviour (eg. "disable all OVS-related
  services") may have that configuration not have the same effect after
  this update (eg. "I thought I disabled all OVS-related services but
  what's this ovs-record-hostname thing now?")

  [ Other Info ]

  A possible solution to this would be to extend the upstream `ovs-ctl`
  script to allow controlling when the hostname is recorded and adding a
  new Systemd service file to the package that calls the `record-
  hostname` function at a more appropriate time, i.e. after or as part
  of the `network-online.target`.

  An example of downstream issues can be viewed in bug 1896630.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1915829/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list