#3934 createdb.py -c flag not taking efect
Closed: Fixed 5 years ago Opened 5 years ago by ark74.

When installing the server createdb.py won't take the -c flag into account, so details about the db are missed.
When running runserver.py -c pagure.cfg the server will have issues, since it will find a empty db.

With errors like,
ProgrammingError: (psycopg2.ProgrammingError) relation "pagure_user_visit" does not exist

Using;

export PAGURE_CONFIG=pagure.cfg

will pass the file to createdb.py and runserver.py successfully, allowing to access the server correctly.

Thanks to <cverna> for pointing it out.


You'll want to check the runserver.py and adjust createdb accordingly

Metadata Update from @pingou:
- Issue set to the milestone: 5.2
- Issue tagged with: bug, easyfix

5 years ago

I thought that by passing -c flag to createdb and runserver they both will read the pagure.cfg details about the database.

cverna pointed out that -c flag exports PAGURE_CONFIG variable, then it's grabbed by both createdb and runserver. The issue is that -c flag works on runserver, but it doesn't on createdb.

OTOH, by
export PAGURE_CONFIG=pagure.cf

before run createdb.py and runserver, the installation works fine.

Metadata Update from @pingou:
- Issue assigned to pingou

5 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #3984 Merged 5 years ago