1

while trying to install the openstack using devstack, after running the command ./stack.sh i got this error

Job for ovn-central.service failed because a timeout was exceeded. See "systemctl status ovn-central.service" and "journalctl -xe" for details.

enter image description here

running command systemctl status ovn-central.service gave me this output:

enter image description here

i understood that i have to change the value of the timeout but i don't know how to do it

the log file:

enter image description here

i need to fix this problem.

James Z
  • 12,209
  • 10
  • 24
  • 44
user951
  • 11
  • 2

2 Answers2

1

I've got the same problem. And here is how I fixed it.

The OVN named daemons are stored in /var/run/ovn
   openvswitch -> /var/run/openvswitch/
   ovnnb_db.ctl=
   ovnnb_db.pid
   ovnnb_db.sock=
   ovn-northd.176946.ctl=
   ovn-northd.pid
   ovnsb_db.ctl=
   ovnsb_db.pid
   ovnsb_db.sock=
The OVS named daemons are stored in /var/run/openvswitch 

   br-ex.mgmt=
   br-ex.snoop=
   db.sock=
   ovsdb-server.176376.ctl=
   ovsdb-server.pid
   ovs-vswitchd.176528.ctl=
   ovs-vswitchd.pid

The problem lies with the use of $OVS_RUNDIR variable in the function start_ovn of the script lib/neutron_plugins/ovn_agent (lib/neutron_plugins/ovn_agent:start_ovn).

What I did was replace $OVS_RUNDIR with $OVN_RUNDIR within the function. Another fix I had to make before rerunning stack.sh was to manually remove (untack.sh would not do it) the link "/var/run/ovn/openvswitch".

So after fixing the script lib/neutron_plugins/ovn_agent, running unstack.sh and manually removing a stray link file I rerun stack.sh and after almost a week of trial and error I got devstack up and running.

This is the original code where I applied the substitution: (lib/neutron_plugins/ovn_agent:function start_ovn)

690         # Wait for the service to be ready
691         wait_for_sock_file $OVS_RUNDIR/ovnnb_db.sock
692         wait_for_sock_file $OVS_RUNDIR/ovnsb_db.sock
693 
694         if is_service_enabled tls-proxy; then
695             sudo ovn-nbctl --db=unix:$OVS_RUNDIR/ovnnb_db.sock set-ssl $INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key $INT_CA_DIR/$DEVSTACK_CERT_NAME.cr>
696             sudo ovn-sbctl --db=unix:$OVS_RUNDIR/ovnsb_db.sock set-ssl $INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key $INT_CA_DIR/$DEVSTACK_CERT_NAME.cr>
697         fi
698         sudo ovn-nbctl --db=unix:$OVS_RUNDIR/ovnnb_db.sock set-connection p${OVN_PROTO}:6641:$SERVICE_LISTEN_ADDRESS -- set connection . inactivity_p>
699         sudo ovn-sbctl --db=unix:$OVS_RUNDIR/ovnsb_db.sock set-connection p${OVN_PROTO}:6642:$SERVICE_LISTEN_ADDRESS -- set connection . inactivity_p>
700         sudo ovs-appctl -t $OVS_RUNDIR/ovnnb_db.ctl vlog/set console:off syslog:$OVN_DBS_LOG_LEVEL file:$OVN_DBS_LOG_LEVEL
701         sudo ovs-appctl -t $OVS_RUNDIR/ovnsb_db.ctl vlog/set console:off syslog:$OVN_DBS_LOG_LEVEL file:$OVN_DBS_LOG_LEVEL
Giulio
  • 11
  • 3
0

I encountered the same error as yours. I try to set the timeout to a larger number like 600 seconds, you can check the 1st answer in this link: how-to-change-systemd-service-timeout-value

But actually this is not the right solution. You can use systemctl status to find that this service's boot scripts, and it's ovn-sbctl init that block the restart process.

stack@lil-u18:~/devstack$ systemctl status ovn-central.service 
● ovn-central.service - LSB: OVN central components
   Loaded: loaded (/etc/init.d/ovn-central; static; vendor preset: enabled)
   Active: activating (start) since Wed 2021-06-23 10:02:29 CST; 10min ago
     Docs: man:systemd-sysv-generator(8)
Cntrl PID: 3527 (ovn-central)
    Tasks: 5 (limit: 3654)
   CGroup: /system.slice/ovn-central.service
           ├─ 3527 /bin/sh /etc/init.d/ovn-central start
           ├─ 3534 /bin/sh /usr/share/openvswitch/scripts/ovn-ctl start_northd
           ├─ 3558 ovn-sbctl init
           ├─24463 /bin/sh /usr/share/openvswitch/scripts/ovn-ctl start_northd
           └─24489 ovn-sbctl init

try ovn-sbctl --verbose init to print the err message, as below:

stack@lil-u18:~/devstack$ ovn-sbctl --verbose init
2021-06-23T02:13:06Z|00002|reconnect|DBG|unix:/var/run/openvswitch/ovnsb_db.sock: entering BACKOFF
2021-06-23T02:13:06Z|00003|stream_unix|DBG|/var/run/openvswitch/ovnsb_db.sock: connection failed (No such file or directory)
2021-06-23T02:13:06Z|00004|reconnect|INFO|unix:/var/run/openvswitch/ovnsb_db.sock: connecting...
2021-06-23T02:13:06Z|00005|reconnect|DBG|unix:/var/run/openvswitch/ovnsb_db.sock: entering CONNECTING
2021-06-23T02:13:06Z|00006|reconnect|INFO|unix:/var/run/openvswitch/ovnsb_db.sock: connection attempt failed (No such file or directory)
2021-06-23T02:13:06Z|00007|reconnect|DBG|unix:/var/run/openvswitch/ovnsb_db.sock: entering BACKOFF
2021-06-23T02:13:06Z|00008|poll_loop|DBG|wakeup due to 0-ms timeout at ../lib/ovsdb-idl.c:1404
2021-06-23T02:13:07Z|00009|poll_loop|DBG|wakeup due to 1000-ms timeout at ../lib/reconnect.c:643

as you can see, the connection failed because the ovnsb_db.sock is missing, and it keeps retrying, so setting the timeout of the systemctl service won't help. In my practice, I set the timout to 15 min and it still failed.

seyoatda
  • 51
  • 4