[ovs-discuss] OpenvSwitch Version after OpenvSwitch Upgrade

2019-10-25 Thread Gilbert Standen
Doing some testing of a new "ovs" build functionality built-in to Orabuntu-LXC 
which allows Orabuntu-LXC to be used purely as a tool for testing building and 
upgrading OpenvSwitch from source on RedHat-family Linux flavors and distros.  
This mode of Orabuntu-LXC bypasses all the container deployment functionality 
and just builds RPM for any supported version of OpenvSwitch and then installs 
the RPMs, allowing Orabuntu-LXC to be used purely as an OpenvSwitch build 
method development tool separate from Orabuntu-LXC's larger functionalities.

So I build OpenvSwitch 2.4.0 RPMs on Oracle Linux 6.  Install them.  Then I 
build OpenvSwitch 2.5.0 RPM's on same host.  Install them.  Then I build 
OpenvSwitch 2.5.9 RPMs on Oracle Linux 6 (same host) but this time run the full 
Orabuntu-LXC suite and create LXC linux containers and OpenvSwitches for them 
to run on, and VLAN's etc., i.e. a full container landscape, which also 
upgrades OpenvSwitch by RPM from 2.5.0 to 2.5.9.  Alles gut and I check:


[ubuntu@oracle61 uekulele]$ sudo ovs-vsctl --version

ovs-vsctl (Open vSwitch) 2.5.9
Compiled Oct 25 2019 14:31:55
DB Schema 7.12.1


gives 2.5.9

but when I run "ovs-vsctl show" the output gives (at the end) as shown below 
and surprisingly goes all the way back to the original 2.4.0 that I installed 
in Orabuntu-LXC "ovs" mode for just building and install Openvswitch (but not 
creating any switches).  So I'm wondering why if no switches were created 
between the upgrade of OpenvSwitch from 2.4.0 --> 2.5.0 why "ovs-vsctl show" 
does not at least show "2.5.0" since the switches themselves were not created 
until the 3rd run when I ran the full Orabuntu-LXC installer to create a 
container landscape.

[ubuntu@oracle61 uekulele]$ sudo ovs-vsctl show

(output truncated for brevity)
Port "a5"
tag: 11
Interface "a5"
error: "could not open network device a5 (No such device)"
ovs_version: "2.4.0" <-- (Shows the old 2.5.0 version here not the new 
2.5.9 version)

So then I reboot the host, and check again and now alles gut again all is as it 
was meant to be now.

[ubuntu@oracle61 ~]$ sudo ovs-vsctl show
[sudo] password for ubuntu:
181c8422-6caf-42cb-829c-7cc0f2e8c401
Bridge "sw6"
Port "sw6"
Interface "sw6"
type: internal

(output truncated for brevity)
Bridge "sw7"

Port "sw7"
Interface "sw7"
type: internal
ovs_version: "2.5.9"  <-- Now the versions match

[ubuntu@oracle61 ~]$ sudo ovs-vsctl --version

ovs-vsctl (Open vSwitch) 2.5.9 <-- Now the versions match
Compiled Oct 25 2019 14:31:55
DB Schema 7.12.1
[ubuntu@oracle61 ~]$


___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OpenvSwitch Version after OpenvSwitch Upgrade

2019-10-25 Thread Gilbert Standen
Hi Ben, thanks!

Well that solves my problem anyway.  Prior to this "ovs" mode option, 
Orabuntu-LXC deployed a container landscape complete with OpenvSwitch RPM 
deployment and configuration of switches, and that was it.  Any upgrade to 
OpenvSwitch was basically in the hands of the owner of the deployment.  So the 
Orabuntu-LXC code just deployed and started OpenvSwitch up (no "start/stop" 
cycle of OpenvSwitch needed as it was a "one-time" install).  So after your 
reply (thanks) light bulb went on and I had a D'oh! moment and just added the 
stop/start code below and that took care of it of course.

So now Orabuntu-LXC users can maintain and upgrade their OpenvSwitch using 
Orabuntu-LXC "ovs" mode and are not "on their own" to deal with upgrading 
OpenvSwitch independently and therefore can take advantage of all the 
Orabuntu-LXC OpenvSwitch build logic that is built into the Orabuntu-LXC 
software.

if   [ $Release -ge 7 ]
then
 sudo systemctl stop  openvswitch.service   <-- code added for 
"ovs" mode
sudo systemctl start openvswitch.service
elif [ $Release -eq 6 ]
then
sudo service openvswitch stop   <-- code added 
for "ovs" mode
sudo service openvswitch start
sudo chkconfig openvswitch on
fi

And now the result immediate after the upgrade from 2.4.0 --> 2.5.0

[ubuntu@oracle61 anylinux]$ sudo ovs-vsctl show

6ed8c2bd-2cb0-4a9c-9f98-1626bff4357b
ovs_version: "2.5.0"

[ubuntu@oracle61 anylinux]$ ovs-vsctl --version

ovs-vsctl (Open vSwitch) 2.5.0
Compiled Oct 25 2019 15:48:42
DB Schema 7.12.1
[ubuntu@oracle61 anylinux]$


From: Ben Pfaff 
Sent: Friday, October 25, 2019 3:14 PM
To: Gilbert Standen 
Cc: ovs-discuss@openvswitch.org 
Subject: Re: [ovs-discuss] OpenvSwitch Version after OpenvSwitch Upgrade

Hi, good to hear from you.  Thanks for maintaining OVS on Orabuntu-LXC.

I took a look at the OVS scripts.  The ovs-version gets set in the
database at the step where ovs-ctl prints out "Configuring Open vSwitch
system IDs".  This happens just after starting ovsdb-server.  If the
upgrade process you're using does not go through that step, then it's
possible that the database entry doesn't get updated.  Can you check to
see whether that's what is happening?

(I guess that we could make ovs-vswitchd set this value, which might
make it closer to 100% reliable, but that is not how it works now.)

On Fri, Oct 25, 2019 at 08:02:11PM +, Gilbert Standen wrote:
> Doing some testing of a new "ovs" build functionality built-in to 
> Orabuntu-LXC which allows Orabuntu-LXC to be used purely as a tool for 
> testing building and upgrading OpenvSwitch from source on RedHat-family Linux 
> flavors and distros.  This mode of Orabuntu-LXC bypasses all the container 
> deployment functionality and just builds RPM for any supported version of 
> OpenvSwitch and then installs the RPMs, allowing Orabuntu-LXC to be used 
> purely as an OpenvSwitch build method development tool separate from 
> Orabuntu-LXC's larger functionalities.
>
> So I build OpenvSwitch 2.4.0 RPMs on Oracle Linux 6.  Install them.  Then I 
> build OpenvSwitch 2.5.0 RPM's on same host.  Install them.  Then I build 
> OpenvSwitch 2.5.9 RPMs on Oracle Linux 6 (same host) but this time run the 
> full Orabuntu-LXC suite and create LXC linux containers and OpenvSwitches for 
> them to run on, and VLAN's etc., i.e. a full container landscape, which also 
> upgrades OpenvSwitch by RPM from 2.5.0 to 2.5.9.  Alles gut and I check:
>
>
> [ubuntu@oracle61 uekulele]$ sudo ovs-vsctl --version
>
> ovs-vsctl (Open vSwitch) 2.5.9
> Compiled Oct 25 2019 14:31:55
> DB Schema 7.12.1
>
>
> gives 2.5.9
>
> but when I run "ovs-vsctl show" the output gives (at the end) as shown below 
> and surprisingly goes all the way back to the original 2.4.0 that I installed 
> in Orabuntu-LXC "ovs" mode for just building and install Openvswitch (but not 
> creating any switches).  So I'm wondering why if no switches were created 
> between the upgrade of OpenvSwitch from 2.4.0 --> 2.5.0 why "ovs-vsctl show" 
> does not at least show "2.5.0" since the switches themselves were not created 
> until the 3rd run when I ran the full Orabuntu-LXC installer to create a 
> container landscape.
>
> [ubuntu@oracle61 uekulele]$ sudo ovs-vsctl show
>
> (output truncated for brevity)
> Port "a5"
> tag: 11
> Interface "a5"
> error: "could not open network device a5 (No such device)"
> ovs_version: "2.4.0&qu

Re: [ovs-discuss] OpenvSwitch Version after OpenvSwitch Upgrade

2019-10-25 Thread Ben Pfaff
Hi, good to hear from you.  Thanks for maintaining OVS on Orabuntu-LXC.

I took a look at the OVS scripts.  The ovs-version gets set in the
database at the step where ovs-ctl prints out "Configuring Open vSwitch
system IDs".  This happens just after starting ovsdb-server.  If the
upgrade process you're using does not go through that step, then it's
possible that the database entry doesn't get updated.  Can you check to
see whether that's what is happening?

(I guess that we could make ovs-vswitchd set this value, which might
make it closer to 100% reliable, but that is not how it works now.)

On Fri, Oct 25, 2019 at 08:02:11PM +, Gilbert Standen wrote:
> Doing some testing of a new "ovs" build functionality built-in to 
> Orabuntu-LXC which allows Orabuntu-LXC to be used purely as a tool for 
> testing building and upgrading OpenvSwitch from source on RedHat-family Linux 
> flavors and distros.  This mode of Orabuntu-LXC bypasses all the container 
> deployment functionality and just builds RPM for any supported version of 
> OpenvSwitch and then installs the RPMs, allowing Orabuntu-LXC to be used 
> purely as an OpenvSwitch build method development tool separate from 
> Orabuntu-LXC's larger functionalities.
> 
> So I build OpenvSwitch 2.4.0 RPMs on Oracle Linux 6.  Install them.  Then I 
> build OpenvSwitch 2.5.0 RPM's on same host.  Install them.  Then I build 
> OpenvSwitch 2.5.9 RPMs on Oracle Linux 6 (same host) but this time run the 
> full Orabuntu-LXC suite and create LXC linux containers and OpenvSwitches for 
> them to run on, and VLAN's etc., i.e. a full container landscape, which also 
> upgrades OpenvSwitch by RPM from 2.5.0 to 2.5.9.  Alles gut and I check:
> 
> 
> [ubuntu@oracle61 uekulele]$ sudo ovs-vsctl --version
> 
> ovs-vsctl (Open vSwitch) 2.5.9
> Compiled Oct 25 2019 14:31:55
> DB Schema 7.12.1
> 
> 
> gives 2.5.9
> 
> but when I run "ovs-vsctl show" the output gives (at the end) as shown below 
> and surprisingly goes all the way back to the original 2.4.0 that I installed 
> in Orabuntu-LXC "ovs" mode for just building and install Openvswitch (but not 
> creating any switches).  So I'm wondering why if no switches were created 
> between the upgrade of OpenvSwitch from 2.4.0 --> 2.5.0 why "ovs-vsctl show" 
> does not at least show "2.5.0" since the switches themselves were not created 
> until the 3rd run when I ran the full Orabuntu-LXC installer to create a 
> container landscape.
> 
> [ubuntu@oracle61 uekulele]$ sudo ovs-vsctl show
> 
> (output truncated for brevity)
> Port "a5"
> tag: 11
> Interface "a5"
> error: "could not open network device a5 (No such device)"
> ovs_version: "2.4.0" <-- (Shows the old 2.5.0 version here not the 
> new 2.5.9 version)
> 
> So then I reboot the host, and check again and now alles gut again all is as 
> it was meant to be now.
> 
> [ubuntu@oracle61 ~]$ sudo ovs-vsctl show
> [sudo] password for ubuntu:
> 181c8422-6caf-42cb-829c-7cc0f2e8c401
> Bridge "sw6"
> Port "sw6"
> Interface "sw6"
> type: internal
> 
> (output truncated for brevity)
> Bridge "sw7"
> 
> Port "sw7"
> Interface "sw7"
> type: internal
> ovs_version: "2.5.9"  <-- Now the versions match
> 
> [ubuntu@oracle61 ~]$ sudo ovs-vsctl --version
> 
> ovs-vsctl (Open vSwitch) 2.5.9 <-- Now the versions match
> Compiled Oct 25 2019 14:31:55
> DB Schema 7.12.1
> [ubuntu@oracle61 ~]$
> 
> 

> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss