I've tried this with the domain module now too, and the same thing
appears to be happening, I can show/showdb/add/rm but cannot *reload*
when using dbtext as database module with dbtext caching mode enabled.
I'm wondering if this is a configuration issue on my side. When I switch
to PGSQL I am able to reload properly after a table modification.
Here is an example of the domain scenario:
# kamctl domain
-- command 'domain' - manage local domains
domain reload ....................... reload domains from disk
domain show ......................... show current domains in memory
domain showdb ....................... show domains in the database
domain add <domain> ................. add the domain to the database
domain rm <domain> .................. delete the domain from the database
# kamctl domain showdb
[1, 'domain1.example.com', '', 1443435582]
# kamctl domain add
domain2.example.com
Updated domain, rows affected: 1
INFO: execute '/usr/sbin/kamctl domain reload' to synchronize cache and
database
# kamctl domain showdb
[1, 'domain1.example.com', '', 1443435582]
[2, 'domain2.example.com', '', 1443600900]
# kamctl domain show
domain::
domain1.example.com
did::
domain1.example.com
# kamctl domain reload
# kamctl domain show
domain::
domain1.example.com
did::
domain1.example.com
# kamctl domain showdb
[1, 'domain1.example.com', '', 1443435582]
[2, 'domain2.example.com', '', 1443600900]
Thanks
On 29/09/2015 15:16, Asgaroth wrote:
Some more investigation here and it looks like the
kamctlrc value to
set for db_text path is DBTEXT_PATH and not DB_PATH as listed in the
default kamctlrc file.
[1] When I have DB_PATH set to the location of the db text files, the
following happens (I cannot show the contents of the address table,
but the memory dump works):
DB_PATH="/etc/kamailio/db_text"
# kamctl address dump
0 <10000, 10.7.0.0, 24, 0> []
1 <10002, 10.7.0.0, 24, 0> []
# kamctl address show
#
[2] When I have DBTEXT_PATH set to the location of the db text files,
the following happens (I cannot reload contents of the address table,
but the memory dump and table show works):
# kamctl address dump
0 <10000, 10.7.0.0, 24, 0> []
1 <10002, 10.7.0.0, 24, 0> []
# kamctl address show
[1, 10000, '10.7.0.0', 24, 0, '']
# kamctl address reload
# kamctl address dump
0 <10000, 10.7.0.0, 24, 0> []
1 <10002, 10.7.0.0, 24, 0> []
# kamctl address show
[1, 10000, '10.7.0.0', 24, 0, '']
It also appears that the equivilent RPC commands dont work correctly
too for the permissions module, the addressDump does not show
in-memory values, and reload says it completed, but dump shows nothing
too:
kamcmd> permissions.addressDump
{
}
kamcmd> permissions.addressReload
Reload OK
kamcmd> permissions.addressDump
{
}
Am I missing something with my configuration, or have I come accross a
bug?
Thanks for reading this far :)
Thanks
On 29/09/2015 13:07, Asgaroth wrote:
Hi,
Friendly "bump", any thoughts on this one?
I'm using kamailio v4.3.2
Thanks
On 28/09/2015 13:11, Asgaroth wrote:
Hi,
I am busy testing the db_text module for some modules who's
configuration does not change that often.
If I set the db_mode for db_text to 0 (caching), it appears that if
I modify the file directly (in this case the address dbtext file)
and then issue a "kamctl address reload" the updated contents are
*not* reloaded. However, if I set db_mode to 1, then the contents of
the db_text file automatically reload when I change it on the file
system.
Is it possible to run db_text in caching mode but to also force a
reload if I manually update the underlying database file?
Additionally, in kamctlrc, I had to add the following variable:
DBTEXT_PATH="/etc/kamailio/db_text"
Whereas the original example for db_text path in kamctlrc is as
follows:
# database path used by dbtext, db_berkeley or sqlite
#DB_PATH="/etc/kamailio/db_text"
Is this just a typo in the kamctlrc distribution or is the variable
meant to be DB_PATH or DBTEXT_PATH?
Thanks