[victoria] 5xx Server error - Table 'barbican.secrets' doesn't exist

Bug #1903725 reported by Aurelien Lourot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Barbican Charm
Fix Released
High
Unassigned

Bug Description

The functional tests are failing on groovy-victoria with:

5xx Server error: Internal Server Error: Secret creation failure seen - please contact site administrator.

https://review.opendev.org/#/c/761540/

barbican-api.log shows:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 593, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 517, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 732, in _read_query_result
    result.read()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1075, in read
    first_packet = self.connection._read_packet()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 684, in _read_packet
    packet.check_error()
  File "/usr/lib/python3/dist-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/usr/lib/python3/dist-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table 'barbican.secrets' doesn't exist")

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Also affects focal-victoria run as well in exactly the same way; suspect it is probably a db migration issue.

summary: - [groovy-victoria] 5xx Server error - Table 'barbican.secrets' doesn't
- exist
+ [victoria] 5xx Server error - Table 'barbican.secrets' doesn't exist
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

I think this is because on Ussuri [0] the default Barbican config was:

# Create the Barbican database on service startup. (boolean value)
#db_auto_create = true

but on Victoria in because `false` by default. Validating locally.

[0]: https://docs.openstack.org/barbican/ussuri/sample_config.html

Changed in charm-barbican:
status: New → In Progress
importance: Undecided → High
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

^ but on Victoria it became `false` by default

Revision history for this message
David Ames (thedac) wrote :

These are also related bugs.

Ultimately we want [0] due to [1] but this is blocked by [2].

Let's see if the workaround works without running into [1].

[0] https://review.opendev.org/756931
[1] https://bugs.launchpad.net/charm-barbican/+bug/1827690
[2] https://bugs.launchpad.net/ubuntu/+source/barbican/+bug/1899104

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :
Changed in charm-barbican:
assignee: nobody → Aurelien Lourot (aurelien-lourot)
Changed in charm-barbican:
status: In Progress → Fix Committed
milestone: none → 21.01
assignee: Aurelien Lourot (aurelien-lourot) → nobody
David Ames (thedac)
Changed in charm-barbican:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.