Re: [viewvc-users] vhosts or root-path config overrides for [cvsdb] config section
Tom Throckmorton <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Message-ID | <[email protected]> |
On Nov 03 17:51, Asd Asdasd wrote: > Hi, > > I'm having problems using the per vhost or per root-path configuration > overrides for the cvsdb config section. i.e. > > Using > > [vhost-VHOSTNAME/cvsdb] > enabled = 1 > host = localhost > port = 3306 > database_name = myrepo_stats > user = dbusr1 > passwd = changeme > readonly_user = myrepo_stats_ro > readonly_passwd = changemetoo > or > > [root-ROOTNAME/cvsdb] > enabled = 1 > host = localhost > port = 3306 > database_name = myrepo_stats > user = dbusr1 > passwd = changeme > readonly_user = myrepo_stats_ro > readonly_passwd = changemetoo > > Gives ... > > # ./svndbadmin rebuild /home/myrepo/svn > Traceback (most recent call last): > File "./svndbadmin", line 362, in <module> > main(command, repository, revs, verbose, force) > File "./svndbadmin", line 243, in main > db = cvsdb.ConnectDatabase(cfg) > File "/usr/lib/python2.6/site-packages/viewvc/cvsdb.py", line 865, in ConnectDatabase > db.Connect() > File "/usr/lib/python2.6/site-packages/viewvc/cvsdb.py", line 57, in Connect > self._host, self._port, self._user, self._passwd, self._database) > File "/usr/lib/python2.6/site-packages/viewvc/dbi.py", line 63, in connect > return MySQLdb.connect(host=host, port=port, user=user, passwd=passwd, db=db) > File "/usr/lib/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect > return Connection(*args, **kwargs) > File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 188, in __init__ > super(Connection, self).__init__(*args, **kwargs2) > _mysql_exceptions.OperationalError: (1045, "c' (using password: NO)") > > However if the above cvsdb config is: > > [cvsdb] > enabled = 1 > host = localhost > port = 3306 > database_name = myrepo_stats > user = dbusr1 > passwd = changeme > readonly_user = myrepo_stats_ro > readonly_passwd = changemetoo > > all works well. > > > > It looks like for some reason the per vhost and per root-path configs are not > catching and the default config values are used for MySQL credentials... > which naturally should not work. I'd think that catching the default config values _should_ work so that you may specify a default database connection for all repos (svndbadmin does the Right Thing in terms of keeping track of per-repo commit data), but agree that having the ability to optionally provide a per-root override should also work, so that you can do things like write commit data to different db instances/hosts, or even selectively enable db support on a per-repo basis. > Can you please indicate if there is anything wrong with the above config > scenario? Are per vhost or per root-path config overrides even supported for > the cvsdb config section. Is there a bug? Interestingly, a per-root config (e.g. [root-ROOTNAME/cvsdb]) does seem to work within viewvc itself, but svndbadmin operations fail. So, it's a problem with that script only, afaict... -tt ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2414416 To unsubscribe from this discussion, e-mail: [[email protected]].