ShubhamTatvamasi / magma-galaxy

https://galaxy.ansible.com/shubhamtatvamasi/magma
BSD 3-Clause "New" or "Revised" License
13 stars 20 forks source link

error: relation "Users" does not exist #16

Closed yoursunny closed 4 months ago

yoursunny commented 4 months ago

I am attempting to install this project on a clean Ubuntu 22.04 amd64 system running in KVM. The system can reach both IPv4 and IPv6 Internet, and 192.168.164.60 is its primary IPv4 address.

For the prompts from quick install deploy-orc8r.sh script, I accepted all defaults. The ansible-playbook config-orc8r.yml experienced error in "config : Set username and password for magma-test organization" step.

magma@vm:~/magma-galaxy$ ansible-playbook config-orc8r.yml

PLAY [Configure Magma Orchestrator] ******************************************************************************************************************************************************************************

TASK [Gathering Facts] *******************************************************************************************************************************************************************************************
Wednesday 24 April 2024  16:13:29 +0000 (0:00:00.006)       0:00:00.006 *******
ok: [192.168.164.60]

TASK [config : Register Orchestrator pod] ************************************************************************************************************************************************************************
Wednesday 24 April 2024  16:13:32 +0000 (0:00:02.990)       0:00:02.997 *******
ok: [192.168.164.60]

TASK [config : Set Orchestrator pod name] ************************************************************************************************************************************************************************
Wednesday 24 April 2024  16:13:33 +0000 (0:00:00.815)       0:00:03.813 *******
ok: [192.168.164.60]

TASK [config : Setup admin operator certificate] *****************************************************************************************************************************************************************
Wednesday 24 April 2024  16:13:33 +0000 (0:00:00.034)       0:00:03.848 *******
changed: [192.168.164.60]

TASK [config : Register magmalte pod] ****************************************************************************************************************************************************************************
Wednesday 24 April 2024  16:13:34 +0000 (0:00:01.219)       0:00:05.067 *******
ok: [192.168.164.60]

TASK [config : Set magmalte pod name] ****************************************************************************************************************************************************************************
Wednesday 24 April 2024  16:13:36 +0000 (0:00:01.296)       0:00:06.364 *******
ok: [192.168.164.60]

TASK [config : Set username and password for magma-test organization] ********************************************************************************************************************************************
Wednesday 24 April 2024  16:13:36 +0000 (0:00:00.033)       0:00:06.398 *******
fatal: [192.168.164.60]: FAILED! => {"changed": true, "rc": 1, "return_code": 1, "stderr": "Browserslist: caniuse-lite is outdated. Please run:\n  npx browserslist@latest --update-db\n  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating\n[BABEL] Note: The code generator has deoptimised the styling of /usr/src/generated/api.ts as it exceeds the max of 500KB.\nError: \n    at Query.run (/usr/src/node_modules/sequelize/src/dialects/postgres/query.js:76:25)\n    at /usr/src/node_modules/sequelize/src/sequelize.js:641:28\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at PostgresQueryInterface.select (/usr/src/node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)\n    at Function.findAll (/usr/src/node_modules/sequelize/src/model.js:1816:21)\n    at Function.findOne (/usr/src/node_modules/sequelize/src/model.js:1982:12)\n    at createOrUpdateUser (/usr/src/scripts/setPassword.ts:56:16) {\n  name: 'SequelizeDatabaseError',\n  parent: error: relation \"Users\" does not exist\n      at Parser.parseErrorMessage (/usr/src/node_modules/pg-protocol/src/parser.ts:369:69)\n      at Parser.handlePacket (/usr/src/node_modules/pg-protocol/src/parser.ts:188:21)\n      at Parser.parse (/usr/src/node_modules/pg-protocol/src/parser.ts:103:30)\n      at Socket.<anonymous> (/usr/src/node_modules/pg-protocol/src/index.ts:7:48)\n      at Socket.emit (node:events:526:28)\n      at addChunk (node:internal/streams/readable:315:12)\n      at readableAddChunk (node:internal/streams/readable:289:9)\n      at Socket.Readable.push (node:internal/streams/readable:228:10)\n      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {\n    length: 105,\n    severity: 'ERROR',\n    code: '42P01',\n    detail: undefined,\n    hint: undefined,\n    position: '103',\n    internalPosition: undefined,\n    internalQuery: undefined,\n    where: undefined,\n    schema: undefined,\n    table: undefined,\n    column: undefined,\n    dataType: undefined,\n    constraint: undefined,\n    file: 'parse_relation.c',\n    line: '1392',\n    routine: 'parserOpenTable',\n    sql: `SELECT \"id\", \"email\", \"organization\", \"password\", \"role\", \"networkIDs\", \"createdAt\", \"updatedAt\" FROM \"Users\" AS \"User\" WHERE \"User\".\"organization\" = 'magma-test' AND \"User\".\"email\" = 'admin' LIMIT 1;`,\n    parameters: undefined\n  },\n  original: error: relation \"Users\" does not exist\n      at Parser.parseErrorMessage (/usr/src/node_modules/pg-protocol/src/parser.ts:369:69)\n      at Parser.handlePacket (/usr/src/node_modules/pg-protocol/src/parser.ts:188:21)\n      at Parser.parse (/usr/src/node_modules/pg-protocol/src/parser.ts:103:30)\n      at Socket.<anonymous> (/usr/src/node_modules/pg-protocol/src/index.ts:7:48)\n      at Socket.emit (node:events:526:28)\n      at addChunk (node:internal/streams/readable:315:12)\n      at readableAddChunk (node:internal/streams/readable:289:9)\n      at Socket.Readable.push (node:internal/streams/readable:228:10)\n      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {\n    length: 105,\n    severity: 'ERROR',\n    code: '42P01',\n    detail: undefined,\n    hint: undefined,\n    position: '103',\n    internalPosition: undefined,\n    internalQuery: undefined,\n    where: undefined,\n    schema: undefined,\n    table: undefined,\n    column: undefined,\n    dataType: undefined,\n    constraint: undefined,\n    file: 'parse_relation.c',\n    line: '1392',\n    routine: 'parserOpenTable',\n    sql: `SELECT \"id\", \"email\", \"organization\", \"password\", \"role\", \"networkIDs\", \"createdAt\", \"updatedAt\" FROM \"Users\" AS \"User\" WHERE \"User\".\"organization\" = 'magma-test' AND \"User\".\"email\" = 'admin' LIMIT 1;`,\n    parameters: undefined\n  },\n  sql: `SELECT \"id\", \"email\", \"organization\", \"password\", \"role\", \"networkIDs\", \"createdAt\", \"updatedAt\" FROM \"Users\" AS \"User\" WHERE \"User\".\"organization\" = 'magma-test' AND \"User\".\"email\" = 'admin' LIMIT 1;`,\n  parameters: {}\n}\nerror Command failed with exit code 1.\n", "stderr_lines": ["Browserslist: caniuse-lite is outdated. Please run:", "  npx browserslist@latest --update-db", "  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating", "[BABEL] Note: The code generator has deoptimised the styling of /usr/src/generated/api.ts as it exceeds the max of 500KB.", "Error: ", "    at Query.run (/usr/src/node_modules/sequelize/src/dialects/postgres/query.js:76:25)", "    at /usr/src/node_modules/sequelize/src/sequelize.js:641:28", "    at processTicksAndRejections (node:internal/process/task_queues:96:5)", "    at PostgresQueryInterface.select (/usr/src/node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)", "    at Function.findAll (/usr/src/node_modules/sequelize/src/model.js:1816:21)", "    at Function.findOne (/usr/src/node_modules/sequelize/src/model.js:1982:12)", "    at createOrUpdateUser (/usr/src/scripts/setPassword.ts:56:16) {", "  name: 'SequelizeDatabaseError',", "  parent: error: relation \"Users\" does not exist", "      at Parser.parseErrorMessage (/usr/src/node_modules/pg-protocol/src/parser.ts:369:69)", "      at Parser.handlePacket (/usr/src/node_modules/pg-protocol/src/parser.ts:188:21)", "      at Parser.parse (/usr/src/node_modules/pg-protocol/src/parser.ts:103:30)", "      at Socket.<anonymous> (/usr/src/node_modules/pg-protocol/src/index.ts:7:48)", "      at Socket.emit (node:events:526:28)", "      at addChunk (node:internal/streams/readable:315:12)", "      at readableAddChunk (node:internal/streams/readable:289:9)", "      at Socket.Readable.push (node:internal/streams/readable:228:10)", "      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {", "    length: 105,", "    severity: 'ERROR',", "    code: '42P01',", "    detail: undefined,", "    hint: undefined,", "    position: '103',", "    internalPosition: undefined,", "    internalQuery: undefined,", "    where: undefined,", "    schema: undefined,", "    table: undefined,", "    column: undefined,", "    dataType: undefined,", "    constraint: undefined,", "    file: 'parse_relation.c',", "    line: '1392',", "    routine: 'parserOpenTable',", "    sql: `SELECT \"id\", \"email\", \"organization\", \"password\", \"role\", \"networkIDs\", \"createdAt\", \"updatedAt\" FROM \"Users\" AS \"User\" WHERE \"User\".\"organization\" = 'magma-test' AND \"User\".\"email\" = 'admin' LIMIT 1;`,", "    parameters: undefined", "  },", "  original: error: relation \"Users\" does not exist", "      at Parser.parseErrorMessage (/usr/src/node_modules/pg-protocol/src/parser.ts:369:69)", "      at Parser.handlePacket (/usr/src/node_modules/pg-protocol/src/parser.ts:188:21)", "      at Parser.parse (/usr/src/node_modules/pg-protocol/src/parser.ts:103:30)", "      at Socket.<anonymous> (/usr/src/node_modules/pg-protocol/src/index.ts:7:48)", "      at Socket.emit (node:events:526:28)", "      at addChunk (node:internal/streams/readable:315:12)", "      at readableAddChunk (node:internal/streams/readable:289:9)", "      at Socket.Readable.push (node:internal/streams/readable:228:10)", "      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {", "    length: 105,", "    severity: 'ERROR',", "    code: '42P01',", "    detail: undefined,", "    hint: undefined,", "    position: '103',", "    internalPosition: undefined,", "    internalQuery: undefined,", "    where: undefined,", "    schema: undefined,", "    table: undefined,", "    column: undefined,", "    dataType: undefined,", "    constraint: undefined,", "    file: 'parse_relation.c',", "    line: '1392',", "    routine: 'parserOpenTable',", "    sql: `SELECT \"id\", \"email\", \"organization\", \"password\", \"role\", \"networkIDs\", \"createdAt\", \"updatedAt\" FROM \"Users\" AS \"User\" WHERE \"User\".\"organization\" = 'magma-test' AND \"User\".\"email\" = 'admin' LIMIT 1;`,", "    parameters: undefined", "  },", "  sql: `SELECT \"id\", \"email\", \"organization\", \"password\", \"role\", \"networkIDs\", \"createdAt\", \"updatedAt\" FROM \"Users\" AS \"User\" WHERE \"User\".\"organization\" = 'magma-test' AND \"User\".\"email\" = 'admin' LIMIT 1;`,", "  parameters: {}", "}", "error Command failed with exit code 1."], "stdout": "yarn run v1.22.18\n$ node -r ./babelRegister.js scripts/setPassword.ts magma-test admin admin\nCreating a new user: email=admin\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n", "stdout_lines": ["yarn run v1.22.18", "$ node -r ./babelRegister.js scripts/setPassword.ts magma-test admin admin", "Creating a new user: email=admin", "info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command."]}

PLAY RECAP *******************************************************************************************************************************************************************************************************
192.168.164.60             : ok=6    changed=1    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Wednesday 24 April 2024  16:13:42 +0000 (0:00:06.291)       0:00:12.689 *******
===============================================================================
config ------------------------------------------------------------------ 9.69s
gather_facts ------------------------------------------------------------ 2.99s
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
total ------------------------------------------------------------------ 12.68s

For ease of reading, the stderr property of the failed step is expanded below:

Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/generated/api.ts as it exceeds the max of 500KB.
Error: 
    at Query.run (/usr/src/node_modules/sequelize/src/dialects/postgres/query.js:76:25)
    at /usr/src/node_modules/sequelize/src/sequelize.js:641:28
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at PostgresQueryInterface.select (/usr/src/node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)
    at Function.findAll (/usr/src/node_modules/sequelize/src/model.js:1816:21)
    at Function.findOne (/usr/src/node_modules/sequelize/src/model.js:1982:12)
    at createOrUpdateUser (/usr/src/scripts/setPassword.ts:56:16) {
  name: 'SequelizeDatabaseError',
  parent: error: relation "Users" does not exist
      at Parser.parseErrorMessage (/usr/src/node_modules/pg-protocol/src/parser.ts:369:69)
      at Parser.handlePacket (/usr/src/node_modules/pg-protocol/src/parser.ts:188:21)
      at Parser.parse (/usr/src/node_modules/pg-protocol/src/parser.ts:103:30)
      at Socket.<anonymous> (/usr/src/node_modules/pg-protocol/src/index.ts:7:48)
      at Socket.emit (node:events:526:28)
      at addChunk (node:internal/streams/readable:315:12)
      at readableAddChunk (node:internal/streams/readable:289:9)
      at Socket.Readable.push (node:internal/streams/readable:228:10)
      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
    length: 105,
    severity: 'ERROR',
    code: '42P01',
    detail: undefined,
    hint: undefined,
    position: '103',
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'parse_relation.c',
    line: '1392',
    routine: 'parserOpenTable',
    sql: `SELECT "id", "email", "organization", "password", "role", "networkIDs", "createdAt", "updatedAt" FROM "Users" AS "User" WHERE "User"."organization" = 'magma-test' AND "User"."email" = 'admin' LIMIT 1;`,
    parameters: undefined
  },
  original: error: relation "Users" does not exist
      at Parser.parseErrorMessage (/usr/src/node_modules/pg-protocol/src/parser.ts:369:69)
      at Parser.handlePacket (/usr/src/node_modules/pg-protocol/src/parser.ts:188:21)
      at Parser.parse (/usr/src/node_modules/pg-protocol/src/parser.ts:103:30)
      at Socket.<anonymous> (/usr/src/node_modules/pg-protocol/src/index.ts:7:48)
      at Socket.emit (node:events:526:28)
      at addChunk (node:internal/streams/readable:315:12)
      at readableAddChunk (node:internal/streams/readable:289:9)
      at Socket.Readable.push (node:internal/streams/readable:228:10)
      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
    length: 105,
    severity: 'ERROR',
    code: '42P01',
    detail: undefined,
    hint: undefined,
    position: '103',
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'parse_relation.c',
    line: '1392',
    routine: 'parserOpenTable',
    sql: `SELECT "id", "email", "organization", "password", "role", "networkIDs", "createdAt", "updatedAt" FROM "Users" AS "User" WHERE "User"."organization" = 'magma-test' AND "User"."email" = 'admin' LIMIT 1;`,
    parameters: undefined
  },
  sql: `SELECT "id", "email", "organization", "password", "role", "networkIDs", "createdAt", "updatedAt" FROM "Users" AS "User" WHERE "User"."organization" = 'magma-test' AND "User"."email" = 'admin' LIMIT 1;`,
  parameters: {}
}
error Command failed with exit code 1.

How to investigate and resolve this error?

ShubhamTatvamasi commented 4 months ago

This project is no longer maintained for supporting magma.

yoursunny commented 4 months ago

I'd suggest archiving repositories that you are no longer maintaining. https://docs.github.com/en/repositories/archiving-a-github-repository/archiving-repositories