Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-836

corenetwork's bridge-openvswitch should upgrade db schema if needed before starting

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None

    Description

      Currently, bridge-openvswitch starts whatever version of openvswitch is installed.

      Upgrading to (unreleased on the tree) openvswitch 1.11.0 requires a schema update. Such update cannot be done while ovsdb-server is running, so it must be stopped first.

      This is a problem for those whom uses bridge-openvswitch remotely, as they cannot upgrade due they will lost connectivity. Also, I'm guessing ovsdb-server could not start after an upgrade due schema changes.

      The idea is add the following logic before "need" lines on netif_depend():

      local db="/var/lib/openvswitch/conf.db"
      
      if [ ! -e "${db}" ] ; then
         ovsdb-tool create "${db}" "/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
      fi
      
      if [ $(ovsdb-tool needs-conversion) = "yes" ]; then
         ovsdb-tool convert ${db}
      fi
      

      It also creates the openvswitch database if the user forgot to run "emerge --config openvswitch" after installing, causing it won't start.

      Attachments

        Activity

          People

            vroman vroman
            vroman vroman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: