Hello,
Using openser 1.0.1, I'm trying to add multi-domain support using the module "domain".... so I created a database in mysql, stuffed a few entries in it, pointed at it in openser.cfg, and started openser.
I get this:
0(0) ERROR: domain:mod_init(): invalid table version (use ser_mysql.sh reinstall) 0(0) init_mod(): Error while initializing module domain
Now, I looked into openser_mysql.h and it has a table "version" that lists versions for various databases:
INSERT INTO version VALUES ( 'subscriber', '5'); ... INSERT INTO version VALUES ( 'location', '1001'); INSERT INTO version VALUES ( 'aliases', '1001'); ... INSERT INTO version VALUES ( 'gw_grp', '1'); INSERT INTO version VALUES ( 'lcr', '1');
So, what exactly are these "versions"??
How is it possible that a new database that I create/name/point-at should match something in this static list?
Thanks, -mark
Hi Mark,
the table contains the version numbers of all the other tables used openser. Many tables changed in time and the version is protection mechanism against using old tables with newer openser versions.
in order to work, the table has to contain the version required by the installed openser - check openser_mysqldb.sh (after installation) or scripts/mysqldb.sh in sources.
regards, bogdan
Mark Kent wrote:
Hello,
Using openser 1.0.1, I'm trying to add multi-domain support using the module "domain".... so I created a database in mysql, stuffed a few entries in it, pointed at it in openser.cfg, and started openser.
I get this:
0(0) ERROR: domain:mod_init(): invalid table version (use ser_mysql.sh reinstall) 0(0) init_mod(): Error while initializing module domain
Now, I looked into openser_mysql.h and it has a table "version" that lists versions for various databases:
INSERT INTO version VALUES ( 'subscriber', '5'); ... INSERT INTO version VALUES ( 'location', '1001'); INSERT INTO version VALUES ( 'aliases', '1001'); ... INSERT INTO version VALUES ( 'gw_grp', '1'); INSERT INTO version VALUES ( 'lcr', '1');
So, what exactly are these "versions"??
How is it possible that a new database that I create/name/point-at should match something in this static list?
Thanks, -mark
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
in order to work, the table has to contain the version required by the installed openser - check openser_mysqldb.sh (after installation) or scripts/mysqldb.sh in sources.
Thanks for the explanation, but I think you missed the point.
The 'domain' module (and other modules) allows one to specify the table to be used and even to specify a comletely different database on some remote server to be used... one that is different than that "used" at install time (when the user may not have even intended to use that module, but was just executing the script blindly).
If a user does subsequently specify a different db_url or change the name of the module-specific table, then the openser code has no business checking against a list of static version numbers. The user has over-ridden the default behaviour with his settings and is saying "I'm not using the default tables built at install time..."
Unless, of course, the user should update this 'version' table manually. If that's the case, then the module documentation should make note of this in every module where the db_url is documented.
Thanks, -mark
Mark,
openser provides by default DB conf that works - mainly to avoid common problems with users mixing different versions of DB installations with other versions of openser installations. That's an important requirement - make it work in the simplest way for most of the users, even if beginners.
Now, if somebody, wants to set different tables, of spread the tables across different DBs, it means he knows what he is doing and automatically he should take care of versions. Also the version mechanism is the last alarm for such situations. If you changed the DB scheme, the version issue should make you aware that you need to be careful with the changes and to respect the table formats.
regards, bogdan
Mark Kent wrote:
in order to work, the table has to contain the version required by the installed openser - check openser_mysqldb.sh (after installation) or scripts/mysqldb.sh in sources.
Thanks for the explanation, but I think you missed the point.
The 'domain' module (and other modules) allows one to specify the table to be used and even to specify a comletely different database on some remote server to be used... one that is different than that "used" at install time (when the user may not have even intended to use that module, but was just executing the script blindly).
If a user does subsequently specify a different db_url or change the name of the module-specific table, then the openser code has no business checking against a list of static version numbers. The user has over-ridden the default behaviour with his settings and is saying "I'm not using the default tables built at install time..."
Unless, of course, the user should update this 'version' table manually. If that's the case, then the module documentation should make note of this in every module where the db_url is documented.
Thanks, -mark
across different DBs, it means he knows what he is doing and automatically he should take care of versions. Also the version
Therein lies the main problem with the documentation (see previous thread from a week or so ago about the documentation). You believe that certain things should be automatic, while documentation is usually used to spell out the very things the developers believe to be automatic, but users do not.
I'm not complaining, I recognize and appreciate the nature of open source and all that it entails. But, instead of believing the documentation is sufficient, I know I'ld feel better if there was some acknowledgement from the openser.gods that it is lacking.
For example, another recent post of mine could be paraphrased as "How do I handle X in openser?" and the first sentence of the response was "If you don't program to handle X then it won't be handled" which is relatively unhelpful and suggests that all the info is there if only us users would just read and understand everything both explicitly and implicitly implied by the written words.
OK, maybe I am complaining, but I'm done now :-)
Thanks, -mark