Bug #2007
./scheduler/agent/fo_scheduler can not accept -c sysconfdir to run
| Status: | Resolved | Start date: | 05/18/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Scheduler | |||
| Target version: | - | |||
| Rank: | 99 | Tester: |
Description
tested in svn 5867.
because this issue, I can not switch the default DB and sysconfdir my DB and sysconfdir,
so can not test cp2foss and fossjobs properly.
also if create your DB and sysconfdir mannuly via ./testing/db/createTestDB.php,
DB is fosstest2051435647, sysconfdir is:/srv/fossology/testDbConf2051435647/Db.conf
then want to stop the running scheduler, and run /usr/local/share/fossology/scheduler/agent/fo_scheduler --daemon --reset --verbose=1 -c /srv/fossology/testDbConf2051435647
it does not work, is not using you DB and sysconfdir.
it seems that the reason is because :
in scheduler/agent/database.c
/**
* Initializes any one-time attributes relating to the database. Currently this
* includes creating the db connection and checking the URL of the fossology
* instance out of the db.
*/
void database_init()
{
PGresult* db_result;
char DBConfFile = NULL; / use default Db.conf */
char *ErrorBuf;
/* create the connection to the database */
db_conn = fo_dbconnect(DBConfFile, &ErrorBuf);
memset(fossy_url, '\0', sizeof(fossy_url));
the sysconfdir is not tranformed to fo_dbconnect(), so in
fo_dbconnect(), always using the default sysconfdir.
suggestions?
History
Updated by Alex Norton about 1 year ago
- Status changed from Feedback to Resolved
The scheduler will now check the correct system configuration directory when creating the database connection.
This is fixed with svn 5872
Updated by Bob Gobeille 8 months ago
- Rank set to 99
Change unranked issues to rank 99 so they show up in a ranking report at the bottom. Otherwise, they show up on top.