Description

The purpose of the Database Management Tool (db_manage.py scrip​t) is to check, heal and clean inconsistent DB entries.

This article describes a scenario where db_manage.py is not working.

Symptoms

Segmentation fault (core dumped) while using db_manage.py script.

Solution

In case of a large database, connection-timeout must be specified to avoid timeout.

By default, in each version of Contrail, the db_manage.py script is located inside the container config_api (/usr/lib/python2.7/site-packages/vnc_cfg_api_server).

Solution 1
  • Individual connection timeout and buffer size user is configurable in db_manage.py script.
  • Add argument 'connection-timeout' and 'buffer-size in db_manage.py script'
Example:
python db_manage.py clean --connection-timeout 30 --buffer-size 20

(Note: There is no recommended value for --connection-timeout and --buffer-size because these values change per size of the database/environment. These argument values must be added and adjusted on a trial basis.)

Where

  '--connection-timeout (default=0.5)' = 'Individual Connection timeout, in seconds'
  '--buffer-size  (default=1024)' = 'Number of rows fetched at once'

Solution 2