On Thu, Feb 28, 2013 at 03:28:53PM -0800, Gurucharan Shetty wrote:
> When we upgrade from pre-1.9 to 1.10 or later branches, when just
> the user space daemons are restarted, with the older kernel module
> intact, datapaths are recreated.
>
> This results in loosing the internal interface states like ip addresses,
> routing table entries etc. Also, the 'ofport' value of the older interfaces
> change.
>
> With this patch we restore the interface states, ofport values etc,
> when "ovs-ctl restart" or "/etc/init.d/openvswitch[-switch] restart
> --save-flows" is called. The later command is automatically called
> when debian packages are installed.
>
> Signed-off-by: Gurucharan Shetty <[email protected]>
Looks good, only a few trivial comments.
> @@ -378,14 +378,27 @@ force_reload_kmod () {
> ## ------- ##
> ## restart ##
> ## ------- ##
> +save_interfaces_if_required () {
Can we preserve the blank line above the function?
> + # Save interfaces if we are upgrading from a pre-1.10 branch.
> + case `ovs-appctl version | sed 1q` in
> + "ovs-vswitchd (Open vSwitch) 1."[0-9].*)
> + ifaces=`internal_interfaces`
> + action "Detected internal interfaces: $ifaces" true
> + if action "Saving interface configuration" save_interfaces; then
> + chmod +x "$script_interfaces"
> + fi
> + ;;
I don't think the empty catch-all case below is necessary:
> + *)
> + ;;
> + esac
> +}
>
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev