On Tue, Aug 31, 2021 at 11:20 AM Frode Nordahl <[email protected]> wrote:
> On Tue, Aug 31, 2021 at 8:01 PM aginwala <[email protected]> wrote: > > > > 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://urldefense.com/v3/__https://code.launchpad.net/*fnordahl/ubuntu/*source/openvswitch/*git/openvswitch/*merge/398174__;fisrKw!!IKRxdwAv5BmarQ!NOVNzYnNX0z7Is75RKTpkbzKWTqqhxvHQ8m4xEVtweIy9WE-BCw76yxVCx3SwlA$ > > > > > > 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. > > Thank you for reaching out. The change made to the Open vSwitch > repository itself for the ovn-ctl script was of an optional nature and > is only opted into by those who want to use it. As you have found we > do make use of this in Ubuntu, here we provide real systemd service > files, including one for the separate recording of hostname, and do > not rely on the systemd-sysv compatibility layer. > > I am not sure how the package you are looking at here came into this > state, it is almost as if someone halfway enabled the feature? What is > the source for the package you are displaying here? > > https://github.com/openvswitch/ovs/tree/v2.16.0 and building with debian build on kernel 5.4-80 So, on ubuntu itself ovs-record-hostname can be optional for openvswitch vs being set as required on systemctl settings in 5.4* kernel. or add ovs-record-hostname.service in https://github.com/openvswitch/ovs/tree/v2.16.0/debian so that debain compilation will set that up. That's what I can read from the current code so far. > -- > Frode Nordahl > > > > > > > > > On Tue, Mar 2, 2021 at 2:42 AM Ilya Maximets <[email protected]> wrote: > >> > >> On 3/2/21 6:52 AM, Frode Nordahl wrote: > >> > On Mon, Mar 1, 2021 at 9:26 PM Ilya Maximets <[email protected]> > 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://urldefense.com/v3/__https://bugs.launchpad.net/bugs/1915829__;!!IKRxdwAv5BmarQ!NOVNzYnNX0z7Is75RKTpkbzKWTqqhxvHQ8m4xEVtweIy9WE-BCw76yxV8PBtinU$ > >> >>> Signed-off-by: Frode Nordahl <[email protected]> > >> >>> --- > >> >>> 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 > >> [email protected] > >> > https://urldefense.com/v3/__https://mail.openvswitch.org/mailman/listinfo/ovs-dev__;!!IKRxdwAv5BmarQ!NOVNzYnNX0z7Is75RKTpkbzKWTqqhxvHQ8m4xEVtweIy9WE-BCw76yxVFbGw-DU$ > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
