[ovs-discuss] upgrading openvswitch

Carlos Konstanski ckonstanski at pippiandcarlos.com
Mon Jul 6 20:28:26 UTC 2015


Again looking at the ebuild, this is how it tries to upgrade the db:

/usr/bin/ovsdb-tool convert /var/lib/openvswitch/conf.db 
/usr/share/openvswitch/vswitch.ovsschema

Carlos

On 06.07.15 14:25, Carlos Konstanski wrote:
> I'll enter this as a gentoo bug.
>
> Carlos
>
> On 06.07.15 14:22, Gurucharan Shetty wrote:
>> Looks like Gentoo has screwed it up for you without providing a proper
>> way to upgrade OVS.
>>
>> On Mon, Jul 6, 2015 at 1:18 PM, Carlos Konstanski
>> <ckonstanski at pippiandcarlos.com> wrote:
>>> Gentoo. Looking at the ebuild script, I see that it downloads the source
>>> from:
>>>
>>> http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz
>>>
>>> I actually have two service scripts:
>>>
>>> /etc/init.d/ovsdb-server
>>> /etc/init.d/ovs-vswitchd
>>>
>>> ovs-vswitchd depends on ovsdb-server.
>>>
>>> The moment I tried to restart these services after the upgrade, it
>>> complained that conf.db was incompatible. That's when it all started.
>>>
>>> Carlos
>>>
>>>
>>> On 06.07.15 14:03, Gurucharan Shetty wrote:
>>>>
>>>> On Mon, Jul 6, 2015 at 11:50 AM, Carlos Konstanski
>>>> <ckonstanski at pippiandcarlos.com> wrote:
>>>>>
>>>>> I am in the middle of an openvswitch upgrade from version 2.3.0 to
>>>>> 2.3.1.
>>>>> It
>>>>> is not going well. The issue: conf.db.
>>>>>
>>>>> The format of the JSON changed, so it is not possible to start
>>>>> 2.3.1 with
>>>>> a
>>>>> file generated under 2.3.0. The file must be regenerated.
>>>>
>>>>
>>>> What is the platform on which you have installed openvswitch? (i.e.
>>>> Ubuntu, Rhel etc)
>>>> Usually a simple '/etc/init.d/openvswitch* restart' should
>>>> automatically take care of the changes in database schema. If it did
>>>> not, it is an unfortunate bug.
>>>>
>>>>
>>>>>
>>>>> In order to regenerate it, I had to do the following:
>>>>>
>>>>> - stop openvswitch services
>>>>> - delete conf.db
>>>>> - generate a new conf.db (used emerge --config openvswitch in gentoo)
>>>>> - start openvswitch services
>>>>> - re-configure openvswitch from scratch because all the config in
>>>>> conf.db
>>>>> was lost
>>>>>
>>>>> I tried a modified version of these steps to attempt doing the
>>>>> procedure
>>>>> over an SSH connection. (I temporarily made eth0 the primary
>>>>> interface.)
>>>>> In
>>>>> the end it proved to be impossible. There comes a point when you
>>>>> have to
>>>>> turn on openvswitch with a blank config, and at point you have no
>>>>> network
>>>>> connectivity.
>>>>>
>>>>> I thought of copying the relevant portions of the old conf.db to paste
>>>>> into
>>>>> the new file. But that seemed like a bad idea because the format fo
>>>>> the
>>>>> JSON
>>>>> could have changed. Indeed some part of the file changed enough to
>>>>> render
>>>>> the old format unusable, which is why this entire procedure was
>>>>> necessary
>>>>> to
>>>>> begin with.
>>>>>
>>>>> Openvswith must be running in order to execute the commands needed
>>>>> to add
>>>>> interfaces to the config. Had it been possible to edit the config
>>>>> while
>>>>> openvswitch was down, I would have had a way out of this quandry.
>>>>>
>>>>> It seems that a highly advanced networking software package needs
>>>>> to be
>>>>> capable of being upgraded over a network connection. There should
>>>>> be an
>>>>> upgrade path for non-backward-compatible changes.
>>>>>
>>>>> Is there an alternative to running ovs-vsctl commands for writing the
>>>>> config
>>>>> that can be done while openvswitch is down?
>>>>>
>>>>> Thanks,
>>>>> Carlos Konstanski
>>>>> _______________________________________________
>>>>> discuss mailing list
>>>>> discuss at openvswitch.org
>>>>> http://openvswitch.org/mailman/listinfo/discuss
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss



More information about the discuss mailing list