[ovs-dev] [PATCH v2] ovs-ctl: Allow recording hostname separately

aginwala aginwala at asu.edu
Tue Aug 31 18:01:45 UTC 2021


Hi:

Thanks for this improvement. As per our recent tests with ovs 2.16 with
5.4* linux, the problem is that ovs-vswitchd adds ovs-record-hostname as
required in the systemctl params.
Because of that debian installation of ovs always complaints

Setting up openvswitch-switch (2.16.0-1) ...
insserv: warning: script 'iproutepolicy' missing LSB tags and overrides
Failed to restart openvswitch-switch.service: Unit
ovs-record-hostname.service not found.
invoke-rc.d: initscript openvswitch-switch, action "restart" failed.
* openvswitch-switch.service - LSB: Open vSwitch switch
     Loaded: loaded (/etc/init.d/openvswitch-switch; generated)
     Active: inactive (dead) since Tue 2021-08-31 00:59:30 -07; 2h 24min ago
       Docs: man:systemd-sysv-generator(8)

Main PID: 5960 (code=exited, status=0/SUCCESS)

dpkg: error processing package openvswitch-switch (--install):
 installed openvswitch-switch package post-installation script
subprocess returned error exit status 1

Installation is ok as dpkg:error shows confusion
dpkg -l | grep openv

Can be also seen on restart if vswitchd fails as debain install
systemctl restart openvswitch-switch.service
Failed to restart openvswitch-switch.service: Unit
ovs-record-hostname.service not found.

With ovs-ctl things works as expected.
Temp fix if we want to skip ovs-host-record for now is.

rm /etc/systemd/system/openvswitch-switch.service.requires/ovs-record-hostname.service
systemctl daemon-reload


I saw upstream ubuntu does add ovs-record.service for debian packaging
https://code.launchpad.net/~fnordahl/ubuntu/+source/openvswitch/+git/openvswitch/+merge/398174



Seems it makes reasonable to port ovs-record-hostname for ovs debian
packaging too to avoid error for 2.16.0 and master ovs branch to avoid
systemctl issues.

Please advice.



On Tue, Mar 2, 2021 at 2:42 AM Ilya Maximets <i.maximets at ovn.org> wrote:

> On 3/2/21 6:52 AM, Frode Nordahl wrote:
> > On Mon, Mar 1, 2021 at 9:26 PM Ilya Maximets <i.maximets at ovn.org> wrote:
> >>
> >> On 2/25/21 4:28 PM, Frode Nordahl wrote:
> >>> ovs-ctl determines the system FQDN or hostname and records it in
> >>> the `external-ids:hostname` field of the `Open-vSwitch` table on
> >>> system startup if it is not already set.
> >>>
> >>> 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.
> >>>
> >>> When a system is configured to use an Open vSwitch controlled
> >>> datapath as its only network connection, the current ordering of
> >>> events would always record a unreliable hostname.
> >>>
> >>> To tackle this problem this patchs adds an optional argument that
> >>> allows starting Open vSwitch without recording the hostname in
> >>> the database as well as a new ctl command to record the hostname
> >>> separately. This command can be called by the system startup
> >>> scripts when the system is ready to collect and record this
> >>> information.
> >>>
> >>> Reported-At: https://bugs.launchpad.net/bugs/1915829
> >>> Signed-off-by: Frode Nordahl <frode.nordahl at canonical.com>
> >>> ---
> >>>  utilities/ovs-ctl.in | 41 +++++++++++++++++++++++++++--------------
> >>>  1 file changed, 27 insertions(+), 14 deletions(-)
> >>
> >> Thanks!
> >> I added a note to the NEWS file and applied to master.
> >
> > Excellent, thank you for review and merge!
> >
> >> We may consider backports down to 2.13 LTS.  Let me know
> >> if it's needed.
> >
> > We will consume this at 2.13 and onwards, so a backport all the way to
> > 2.13 LTS would really be helpful.
> >
>
> Done.
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list