Project

General

Profile

Actions

Bug #7598

closed

Tables do not exists in Vagrant Box

Added by Rajmund Hruška almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Development - Tools
Target version:
Start date:
06/28/2022
Due date:
% Done:

100%

Estimated time:
To be discussed:
No

Description

I destroyed my Vagrant Box and tried to build it again from the scratch using the commands from https://alchemist.cesnet.cz/mentat/doc/development/html/_doclib/development.html#development-with-vagrant.

The first issue I came across was when running mentat-dbmngr.py --command fixtures-add. The error message was 2022-06-28 12:23:18 CRITICAL ERROR: "Configuration file '/home/rajmund/mentat-ng/chroot/etc/mentat/mentat-dbmngr.py.conf' does not exist". I solved that by sudo ln -s $PWD/chroot /home/rajmund/mentat-ng/.

The other issue was with the same command mentat-dbmngr.py --command fixtures-add. The tables are not created before the fixtures are added:

2022-06-28 12:29:42,932 INFO: Executing script command 'fixtures_add'
2022-06-28 12:29:42,933 INFO: Populating main database with demonstration objects.
2022-06-28 12:29:42,975 INFO: Unable to add demo object to database: 'user' ((psycopg2.errors.UndefinedTable) relation "users" does not exist
LINE 1: INSERT INTO users (login, fullname, email, organization, rol...
                    ^

[SQL: INSERT INTO users (login, fullname, email, organization, roles, password, apikey, enabled, locale, timezone, logintime, createtime) VALUES (%(login)s, %(fullname)s, %(email)s, %(organization)s, %(roles)s, %(password)s, %(apikey)s, %(enabled)s, %(locale)s, %(timezone)s, %(logintime)s, %(createtime)s) RETURNING users.id]
[parameters: {'login': 'user', 'fullname': 'Demo User', 'email': 'user@bogus-domain.org', 'organization': 'BOGUS DOMAIN, a.l.e.', 'roles': ['user'], 'password': None, 'apikey': None, 'enabled': True, 'locale': None, 'timezone': None, 'logintime': None, 'createtime': datetime.datetime(2022, 6, 28, 12, 29, 42, 974090)}]
(Background on this error at: http://sqlalche.me/e/f405))
2022-06-28 12:29:42,978 INFO: Unable to add demo object to database: 'developer' ((psycopg2.errors.UndefinedTable) relation "users" does not exist
LINE 1: INSERT INTO users (login, fullname, email, organization, rol...

Actions

Also available in: Atom PDF