Hello,
priority 0 should result in not using the connection, so the source code
has to be checked for proper analysis.
Cheers,
Daniel
On 8/22/13 10:48 PM, Charles Chance wrote:
Hello,
Is anyone able to confirm whether the cluster definition I provided
should indeed do what I think it should? If so, I will take a look
further myself to find the reason why not.
Thanks in advance,
Charles
On 20 Aug 2013 16:18, "Charles Chance" <charles.chance(a)sipcentric.com
<mailto:charles.chance@sipcentric.com>> wrote:
Hi All,
I'm having difficulties with the above module and can't see what
I'm doing wrong.
Config as follows:
modparam("db_cluster", "connection",
"db01=>mysql://readwrite:password@db01.domain.com/kamailio
<http://readwrite:password@db01.domain.com/kamailio>")
modparam("db_cluster", "connection",
"db02=>mysql://readonly:password@db02.domain.com/kamailio
<http://readonly:password@db02.domain.com/kamailio>")
modparam("db_cluster", "cluster",
"cls1=>db01=0s9s;db02=9s0s")
As you can see, there are two database servers - a master and a
slave. I am trying to force all read operations to the slave
(db02) and all write operations to the master (db01).
Unless I am missing the point, the above priorities should achieve
the desired effect. However, it seems to be going wrong somewhere
as write operations are being sent to the slave:
ERROR: db_mysql [km_dbase.c:122]: driver error on query:
DELETE command denied to user 'readonly'(a)'x.x.x.x' for table
'location'
ERROR: db_mysql [km_dbase.c:122]: driver error on query:
UPDATE command denied to user 'readonly'(a)'x.x.x.x' for table
'location'
ERROR: db_mysql [km_dbase.c:122]: driver error on query:
INSERT command denied to user 'readonly'(a)'x.x.x.x' for table
'location'
It is the same for all modules, by the way, not just usrloc. For
each module, I have db_url set to "cluster://cls1".
If I change the cluster definition to "cls1=>db01=9s9s;db02=0s0s",
all operations (read and write) are sent to db01 as expected.
Am I missing something here? Can anyone see what I may be doing wrong?
Many thanks,
Charles
www.sipcentric.com <http://www.sipcentric.com/>
Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
Sipcentric Ltd. Company registered in England & Wales no. 7365592.
Registered office: Unit 10 iBIC, Birmingham Science Park, Holt Court
South, Birmingham B7 4EJ.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users