<div dir="ltr"><div>Hi,</div><div><br></div><div>I defined a postgresql data store with two versions 10 and 12.</div><div><br></div><div>When creating db instances I am getting different errors :</div><div><br></div><div><b>For Postgresql 10, I am getting : </b><br></div><div>

<pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;display:block;padding:8.5px;margin:0px 0px 9px;line-height:1.42857;color:rgb(51,51,51);word-break:break-all;background-color:rgb(245,245,245);border:1px solid rgb(204,204,204);border-radius:4px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Traceback (most recent call last):
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/trove/taskmanager/models.py", line 436, in wait_for_instance
    time_out=timeout)
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/trove/common/utils.py", line 223, in poll_until
    return wait_for_task(task)
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/trove/common/utils.py", line 207, in wait_for_task
    return polling_task.wait()
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/eventlet/event.py", line 125, in wait
    result = hub.switch()
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/eventlet/hubs/hub.py", line 313, in switch
    return self.greenlet.switch()
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/oslo_service/loopingcall.py", line 150, in _run_loop
    result = func(*self.args, **<a href="http://self.kw">self.kw</a>)
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/trove/common/utils.py", line 194, in poll_and_check
    obj = retriever()
  File "/var/lib/kolla/venv/lib/python3.6/site-packages/trove/taskmanager/models.py", line 791, in _service_is_active
    raise TroveError(_("Service not active, status: %s") % status)
trove.common.exception.TroveError: Service not active, status: failed to spawn</pre>

</div><div><br></div><div>==> trove-conductor.log <==<br>2022-04-13 00:26:52.334 124 ERROR trove.conductor.manager [-] Guest exception on request req-b5bd49e8-e147-41b2-8292-2900bb4022a1:<br>['Traceback (most recent call last):\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/manager.py", line 218, in prepare\n    ds_version=ds_version)\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/manager.py", line 234, in _prepare\n    cluster_config, snapshot, ds_version=ds_version)\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/osprofiler/profiler.py", line 160, in wrapper\n    result = f(*args, **kwargs)\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/manager.py", line 161, in do_prepare\n    self.app.start_db(ds_version=ds_version, command=command)\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 229, in start_db\n    raise exception.TroveError("Failed to start database service")\n', <b>'trove.common.exception.TroveError: Failed to start database service\n']</b></div><div><br></div><div><br></div><div><br></div><div><br></div><div><b>And for Postgresql 12, I am getting :</b></div><div>

<pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;display:block;padding:8.5px;margin:0px 0px 9px;line-height:1.42857;color:rgb(51,51,51);word-break:break-all;background-color:rgb(245,245,245);border:1px solid rgb(204,204,204);border-radius:4px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Server type: guest
Traceback (most recent call last):
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/manager.py", line 845, in create_user
    self.adm.create_users(users)
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 516, in create_users
    self.create_user(models.PostgreSQLUser.deserialize(user), None)
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 549, in create_user
    [models.PostgreSQLSchema.deserialize(db) for db in user.databases])
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 558, in _grant_access
    [<a href="http://db.name">db.name</a> for db in databases],
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 432, in grant_access
    database=database,
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 723, in psql
    return self.connection.execute(statement)
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 763, in execute
    autocommit=True)
  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 776, in _execute_stmt
    cursor.execute(cmd, data_values)
psycopg2.errors.InvalidCatalogName: database "dbweb01" does not exist
</pre><br class="gmail-Apple-interchange-newline"></div><div>  And this error from <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>==> trove-conductor.log <==<br>2022-04-12 23:58:11.689 46 ERROR trove.conductor.manager [-] Guest exception on request req-7c0e005a-2b02-4acf-bdc5-e9d7a964cd7e:<br>['Traceback (most recent call last):\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/manager.py", line 808, in create_database\n    return self.adm.create_databases(databases)\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 464, in create_databases\n    self.create_database(models.PostgreSQLSchema.deserialize(database))\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 477, in create_database\n    collation=database.collate,\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 723, in psql\n    return self.connection.execute(statement)\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 763, in execute\n    autocommit=True)\n', '  File "/opt/guest-agent-venv/lib/python3.6/site-packages/trove/guestagent/datastore/postgres/service.py", line 776, in _execute_stmt\n    cursor.execute(cmd, data_values)\n', 'psycopg2.errors.ActiveSqlTransaction: <b>CREATE DATABASE cannot run inside a transaction block\n\n']</b></div></blockquote><div><br></div><div>Regards.<br></div></div>