Ns8-postgresql needs tests

Hello

I released ns8-postgresql and requested to push it to netforge, in the meantime if you want to test it or play with it

add-module ghcr.io/nethserver/postgresql:1.0.1

I bring with postgresql the pgqdmin application, the default login is

admin@nethserver.org
Nethesis,1234

a best practice would be to disable it or at minimal to change the password

normally the web application is able to send email, once the smarthost is configured

the readme is available at : https://github.com/NethServer/ns8-postgresql/blob/main/README.md

to connect the database you can use the UI or the CLI: https://github.com/NethServer/ns8-postgresql/blob/main/README.md

5 Likes

on a new rocky linux instanced, deplyed as ISO image

here is an error


[rocky@ns8 ~]$ add-module ghcr.io/nethserver/postgresql:1.0.1
Traceback (most recent call last):
  File "/usr/local/bin/runagent", line 51, in <module>
    read_env(f"{home_dir}/.config/state/agent.env")
  File "/usr/local/bin/runagent", line 40, in read_env
    env = agent.read_envfile(file_path)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/agent/pypkg/agent/__init__.py", line 90, in read_envfile
    fo = open(file_path, 'r')
         ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/rocky/.config/state/agent.env'

You are not root !!!

forced to

image

ok fixed

image

Installation now worked ok.

1 Like

Now i am curious about something,

Suppose i need to access the said database from an external host,
How would i go about achieving this.

the other host, not necessarily Nethserver, could

1 Like

Like mariadb the external port is closed to the localhost so it can be contacted only on yhe node

We could open the port but we need to start TLS encryption

is it not feasible to implement a settings togle switch that allows a user to enable on external port, the user could then choose the port to be used for external exposure, but defaults to the Default port, if no port is chosen or entered.

This, after being implemented in this module, could also be enabled for MariaDB as well.

considering NS8 allows for more than one instance of the database module to be installed(i hope) the user can install one they use for local programs/projects and one they intend to expose on the internet/ external if on local network for external use.

Atleast for the security conscious

The port could be opened in the firewall but what I do not want is to set a port like 3306 because it can be opened only one time hence we need to use custom port and also enable TLS on our own because traefic cannot handle it

Doing that it is possible to open a port for external servers but in the same time do you think that you won’t have big latencies for a website if the database is remote and not running on the hosts

I have not much experiences on this I have always run the database on the host for the website but in a case of a local network it should be good

One example to follow could be ejabberd there is all the concept needed onbhow to open ports in the create-module action and how to build certificate in the configure-module

1.0.2 is the target, I pushed commits to backup and restore all pgsql database

Not necessarily, if the database and server are hosted on the same location or even same country the latencies tend to be abit lenient.

Within Kenya for example, the latencies for server are within 7MS latencies, accross the country (most serves being in Nairobi) capital city.

Also, for development purposes, exposing and having a remote db is better because the teams can collaborate better in sharing the database data and so on and so forth.

then this is fine, no need o have a default port like 5342 or 3306 for the db, any port can be exposed, aftr all all apps require the port as well to connect to the db.

image

haD TESTED BACKUPS, SEEMED TO HAVE BEEN PERFOMED


but r estoration seemed to fail.

1 Like

What is the error message in logs please ?

we have this

restic dump latest state/environment
Assertion failed
  File "/var/lib/nethserver/cluster/actions/restore-module/50restore_module", line 93, in <module>
    agent.assert_exp(restore_task_result['exit_code'] == 0)

and

No more informations ?

i think that and this is all i could get

dmin/api/cluster/task/67b43a09-3653-4024-8b6f-c22bf1e561b1/status HTTP/2.0" 200 281 "-" "-" 3748 "ApiServer-https@file" "http://127.0.0.1:9311" 5ms
2024-01-14T22:44:47+03:00 [1::redis] 1:M 14 Jan 2024 19:44:47.090 * 1 changes in 5 seconds. Saving...
2024-01-14T22:44:47+03:00 [1::redis] 1:M 14 Jan 2024 19:44:47.091 * Background saving started by pid 190
2024-01-14T22:44:47+03:00 [1::redis] 190:C 14 Jan 2024 19:44:47.115 * DB saved on disk
2024-01-14T22:44:47+03:00 [1::redis] 190:C 14 Jan 2024 19:44:47.115 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
2024-01-14T22:44:47+03:00 [1::redis] 1:M 14 Jan 2024 19:44:47.191 * Background saving terminated with success
{"context":{"action":"restore-module","data":{"node":1,"path":"postgresql/4a957e98-8faa-4309-b9b3-5b4a42857b17","replace":false,"repository":"86d1a8ac-ef89-557a-8e19-8582ab86b7c4","snapshot":""},"extra":{"completion":{"extraTextParams":["node"],"i18nString":"backup.instance_restored_to_node","outputTextParams":["module_id"]},"description":"Restoring postgresql to Node 1","node":"Node 1","title":"Restore app"},"id":"67b43a09-3653-4024-8b6f-c22bf1e561b1","parent":"","queue":"cluster/tasks","timestamp":"2024-01-14T19:42:50.126993302Z","user":"admin"},"status":"aborted","progress":78,"subTasks":[{"context":{"action":"add-module","data":{"image":"ghcr.io/nethserver/postgresql:1.0.1","node":1},"extra":{},"id":"de9f72df-41a8-497a-bc2b-35a59c2b1cca","parent":"67b43a09-3653-4024-8b6f-c22bf1e561b1"},"status":"completed","progress":100,"subTasks":[{"context":{"action":"add-module","data":{"environment":{"IMAGE_DIGEST":"sha256:5503ed9bc121b1456ff03dd3c26029e6cb4030ab3cba58bda589c41fe3b45672","IMAGE_ID":"24a27f50b57f84741e999e1a93cbf52fa33c3ee01bcb703b86cc51318d9d78f5","IMAGE_REOPODIGEST":"ghcr.io/nethserver/postgresql@sha256:5503ed9bc121b1456ff03dd3c26029e6cb4030ab3cba58bda589c41fe3b45672","IMAGE_URL":"ghcr.io/nethserver/postgresql:1.0.1","MODULE_ID":"postgresql3","MODULE_UUID":"bc6c6d12-dcd7-4649-9ab0-f58c76013333","NODE_ID":"1","TCP_PORT":"20014","TCP_PORTS":"20014,20015","TCP_PORTS_RANGE":"20014-20015"},"is_rootfull":false,"module_id":"postgresql3"},"extra":{},"id":"2e1a4875-5f6b-46ec-bc17-66b0daabf608","parent":"de9f72df-41a8-497a-bc2b-35a59c2b1cca"},"status":"completed","progress":100,"subTasks":[],"result":{"error":"<7>useradd -m -k /etc/nethserver/skel -s /bin/bash postgresql3\n<7>extract-image ghcr.io/nethserver/postgresql:1.0.1\nExtracting container filesystem imageroot to /home/postgresql3/.config\nTotal bytes read: 8529920 (8.2MiB, 279MiB/s)\nimageroot/actions/\nimageroot/actions/clone-module/\nimageroot/actions/clone-module/50traefik\nimageroot/actions/configure-module/\nimageroot/actions/configure-module/01Hostname_validation\nimageroot/actions/configure-module/10configure_environment_vars\nimageroot/actions/configure-module/20configure_traefik\nimageroot/actions/configure-module/80start_services\nimageroot/actions/configure-module/validate-input.json\nimageroot/actions/create-module/\nimageroot/actions/create-module/10split-ports\nimageroot/actions/destroy-module/\nimageroot/actions/destroy-module/20destroy\nimageroot/actions/get-configuration/\nimageroot/actions/get-configuration/20read\nimageroot/actions/get-configuration/validate-output.json\nimageroot/actions/restore-module/\nimageroot/actions/restore-module/06copyenv\nimageroot/actions/restore-module/50traefik\nimageroot/bin/\nimageroot/bin/discover-smarthost\nimageroot/etc/\nimageroot/etc/state-include.conf\nimageroot/events/\nimageroot/events/smarthost-changed/\nimageroot/events/smarthost-changed/10reload_services\nimageroot/state/\nimageroot/state/pgpassfile\nimageroot/state/servers.json\nimageroot/systemd/\nimageroot/systemd/user/\nimageroot/systemd/user/pgadmin-app.service\nimageroot/systemd/user/postgresql-app.service\nimageroot/systemd/user/postgresql.service\nimageroot/update-module.d/\nimageroot/update-module.d/20restart\nchanged ownership of './state/environment' from root:root to postgresql3:postgresql3\nchanged ownership of './state/agent.env' from root:root to postgresql3:postgresql3\nchanged ownership of './state/pgpassfile' from root:root to postgresql3:postgresql3\nchanged ownership of './state/servers.json' from root:root to postgresql3:postgresql3\nchanged ownership of './systemd/user/pgadmin-app.service' from root:root to postgresql3:postgresql3\nchanged ownership of './systemd/user/postgresql-app.service' from root:root to postgresql3:postgresql3\nchanged ownership of './systemd/user/postgresql.service' from root:root to postgresql3:postgresql3\nchanged ownership of './.imageroot.lst' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/clone-module/50traefik' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/clone-module' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/configure-module/01Hostname_validation' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/configure-module/10configure_environment_vars' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/configure-module/20configure_traefik' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/configure-module/80start_services' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/configure-module/validate-input.json' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/configure-module' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/create-module/10split-ports' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/create-module' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/destroy-module/20destroy' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/destroy-module' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/get-configuration/20read' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/get-configuration/validate-output.json' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/get-configuration' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/restore-module/06copyenv' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/restore-module/50traefik' from root:root to postgresql3:postgresql3\nchanged ownership of './actions/restore-module' from root:root to postgresql3:postgresql3\nchanged ownership of './actions' from root:root to postgresql3:postgresql3\nchanged ownership of './bin/discover-smarthost' from root:root to postgresql3:postgresql3\nchanged ownership of './bin' from root:root to postgresql3:postgresql3\nchanged ownership of './etc/state-include.conf' from root:root to postgresql3:postgresql3\nchanged ownership of './etc' from root:root to postgresql3:postgresql3\nchanged ownership of './events/smarthost-changed/10reload_services' from root:root to postgresql3:postgresql3\nchanged ownership of './events/smarthost-changed' from root:root to postgresql3:postgresql3\nchanged ownership of './events' from root:root to postgresql3:postgresql3\nchanged ownership of './update-module.d/20restart' from root:root to postgresql3:postgresql3\nchanged ownership of './update-module.d' from root:root to postgresql3:postgresql3\n00ac8a5a56ef68ea6dfbac9e8c5470350204240fcc36f1021daa8b5b7ec5d646\n<7>systemctl try-restart promtail.service\n<7>loginctl enable-linger postgresql3\n","exit_code":0,"file":"task/node/1/2e1a4875-5f6b-46ec-bc17-66b0daabf608","output":{"redis_sha256":"7d30fcbd5dcaa0b919b9f284535e712e5f3b61e25b4ac45e43dbd9adbbbcd57e"}}},{"context":{"action":"create-module","data":{"images":["docker.io/dpage/pgadmin4:8.2","docker.io/postgres:14.10-bookworm"]},"extra":{},"id":"517eddc1-93a8-4a20-af03-4e6cc6c821f9","parent":"de9f72df-41a8-497a-bc2b-35a59c2b1cca"},"status":"completed","progress":100,"subTasks":[],"result":{"error":"Add to module/postgresql3 environment PGADMIN4_IMAGE=docker.io/dpage/pgadmin4:8.2\nAdd to module/postgresql3 environment POSTGRES_IMAGE=docker.io/postgres:14.10-bookworm\n<7>podman-pull-missing docker.io/dpage/pgadmin4:8.2 docker.io/postgres:14.10-bookworm\nTrying to pull docker.io/dpage/pgadmin4:8.2...\nGetting image source signatures\nCopying blob sha256:13f0840603e2e050c4f5b1d06377fc95193cbb178734f4ec2a2314006441d091\nCopying blob sha256:5afa59b8f40812d8d95b2f8967a072b1f6e6ccabdb0d18c4475b03599e7554ea\nCopying blob sha256:661ff4d9561e3fd050929ee5097067c34bafc523ee60f5294a37fd08056a73ca\nCopying blob sha256:8fb424a8a983194d7edf2dccf5d449b91a9e1f384a6f738b89b1893c43d6a70c\nCopying blob sha256:2d4a6138fafc996e6d9cdba10d06ee528ca2f5135528a94e2faa0dd6e16a815f\nCopying blob sha256:0011ff13e56059360dcc6964e70cc7e3c5169acdf59a0a5e786f181cad35da3c\nCopying blob sha256:42a4ae4e73a63a3e4edf08acf1fa2d29459ce182b84513a485fabab01ad999e5\nCopying blob sha256:91c1c38904e70f9a0d6e775b85a0f7670f3c8ccf40fbcb700af0853b388495cd\nCopying blob sha256:fb06a9fc0ca457b5d5ad413f5df8b0383c8aacafad855003c30069efbfb31544\nCopying blob sha256:779b87a8a0262422f2a83cc471b99e530ce5d0a6c1005f27492f14c4b56ff307\nCopying blob sha256:dc7968d095ac38d8f520c5030a85f40038f600cc349a0e3fa7a94d3c8aa9ff26\nCopying blob sha256:2716e11486a845ed13fcf8f4c15d00aa5cdc2b85cb0245c5224e4a080c3d688c\nCopying blob sha256:54175cb5dd12a1cf71ca80d8096c2f75b13a732bdc8f93a3921fb3cea1d2dcaf\nCopying blob sha256:d5ccf38e9033fbf4dd4a0b618f48ffebd1d0baacc4f040d10cbfa46a57656db5\nCopying blob sha256:7008c2bb0275b3e36e1d7d2e0712be3f45f7f4821a386bc89f349a5c5c2b3520\nCopying blob sha256:618162bf675e1798421f894e44f3d56de10b1e60e98c67e41b723ec27c170392\nCopying config sha256:76a6f90958250e4e99d4e4973a7f455aaf6abc5ae222b4cc8c83bb2fb7088126\nWriting manifest to image destination\n76a6f90958250e4e99d4e4973a7f455aaf6abc5ae222b4cc8c83bb2fb7088126\nTrying to pull docker.io/library/postgres:14.10-bookworm...\nGetting image source signatures\nCopying blob sha256:da33959ecdf4443306ac556639e52ef3a4fe44840cf50a3d8d5969f51706e830\nCopying blob sha256:2f44b7a888fa005d07c031d3cfad2a1c0344207def2ab9dbb97712425ff812c1\nCopying blob sha256:08eba411caa369bb1d310f56253ac4bc82dd3a137b098ad4f30c91b69d8c99dc\nCopying blob sha256:e2ab7b7507beec9ce5703ac61895f81ebca3caae473e8fcf15b19520f43ccc43\nCopying blob sha256:100bc654a5e44019850246a99eb45333bea7e541db1afa0f77c9e11648509cc7\nCopying blob sha256:79f317c402ed012f032e008f16948f3c184433a7ccb171c8fad6762d52dc933b\nCopying blob sha256:2ab35e615a89a6ad5a5ceb16c357101e1cdbe34c7d474779aaeefa0e9ee3c84a\nCopying blob sha256:037064cd96ecb819bb3fcfa6b00f7cbf2a4280587d62ff72efe13bb67c422151\nCopying blob sha256:70fa2242f609fd294fd7f35922cbcc9150b0857653278955141688f876bedb98\nCopying blob sha256:4bec7ae19ef2e3a340db56fabeffee86fb2a0182420a499d93647fb644aa500a\nCopying blob sha256:2c2443a45c467056d456202dea4d0026785cdd511e39b06f734312b303445a69\nCopying blob sha256:326fd7e1c69eda288207f5cff4b05179817ed2069326ce157e609f4c6060c3bf\nCopying blob sha256:2215c9c253b7b64750c6e3f3c4e38ef68323c3a3b98fa2986344f5ff510f4b23\nCopying blob sha256:e636426454d96f1cb7129f2a68c47a1068e3edfd6e0c9ebe2438da4918c41422\nCopying config sha256:c55a8b28fb4bf24bf1252acdb614ade3db1012deb8cc0b0698b10701daa7d47d\nWriting manifest to image destination\nc55a8b28fb4bf24bf1252acdb614ade3db1012deb8cc0b0698b10701daa7d47d\n1\n<7>dump_env() is deprecated and implemented as a no-op\n","exit_code":0,"file":"task/module/postgresql3/517eddc1-93a8-4a20-af03-4e6cc6c821f9","output":""}}],"result":{"error":"<7>podman-pull-missing ghcr.io/nethserver/postgresql:1.0.1\n<7>extract-ui ghcr.io/nethserver/postgresql:1.0.1\nExtracting container filesystem ui to /var/lib/nethserver/cluster/ui/apps/postgresql3\nui/css/\nui/css/about~31ecd969.f3b8eb2f.css\nui/css/app~748942c6.20c34820.css\nui/i18n/\nui/i18n/de/\nui/i18n/de/translation.json\nui/i18n/en/\nui/i18n/en/translation.json\nui/i18n/es/\nui/i18n/es/translation.json\nui/i18n/eu/\nui/i18n/eu/translation.json\nui/i18n/it/\nui/i18n/it/translation.json\nui/i18n/pt/\nui/i18n/pt/translation.json\nui/i18n/pt_BR/\nui/i18n/pt_BR/translation.json\nui/img/\nui/img/module_default_logo.ed42e539.png\nui/index.html\nui/js/\nui/js/about~31ecd969.2132bc94.js\nui/js/about~31ecd969.2132bc94.js.map\nui/js/app~748942c6.20bab3b2.js\nui/js/app~748942c6.20bab3b2.js.map\nui/js/chunk-vendors~0605657e.7f254d6a.js\nui/js/chunk-vendors~0605657e.7f254d6a.js.map\nui/js/chunk-vendors~0f485567.3f237212.js\nui/js/chunk-vendors~0f485567.3f237212.js.map\nui/js/chunk-vendors~17faf02d.7f68aab6.js\nui/js/chunk-vendors~17faf02d.7f68aab6.js.map\nui/js/chunk-vendors~1d97ff09.290bda9d.js\nui/js/chunk-vendors~1d97ff09.290bda9d.js.map\nui/js/chunk-vendors~2a42e354.0df57e14.js\nui/js/chunk-vendors~2a42e354.0df57e14.js.map\nui/js/chunk-vendors~2aa62147.38204dba.js\nui/js/chunk-vendors~2aa62147.38204dba.js.map\nui/js/chunk-vendors~41d44f25.e7779fa1.js\nui/js/chunk-vendors~41d44f25.e7779fa1.js.map\nui/js/chunk-vendors~46852254.0b6d19c2.js\nui/js/chunk-vendors~46852254.0b6d19c2.js.map\nui/js/chunk-vendors~57473a66.f586d2ed.js\nui/js/chunk-vendors~57473a66.f586d2ed.js.map\nui/js/chunk-vendors~5bb1f863.3efba861.js\nui/js/chunk-vendors~5bb1f863.3efba861.js.map\nui/js/chunk-vendors~5eba3806.b8428291.js\nui/js/chunk-vendors~5eba3806.b8428291.js.map\nui/js/chunk-vendors~690b702c.fd888ae3.js\nui/js/chunk-vendors~690b702c.fd888ae3.js.map\nui/js/chunk-vendors~7274e1de.72bc2eab.js\nui/js/chunk-vendors~7274e1de.72bc2eab.js.map\nui/js/chunk-vendors~86f6b1bc.5b497749.js\nui/js/chunk-vendors~86f6b1bc.5b497749.js.map\nui/js/chunk-vendors~b5906859.deff14e4.js\nui/js/chunk-vendors~b5906859.deff14e4.js.map\nui/js/chunk-vendors~bc21d4b3.68b10b46.js\nui/js/chunk-vendors~bc21d4b3.68b10b46.js.map\nui/js/chunk-vendors~be71a85b.9c367aa3.js\nui/js/chunk-vendors~be71a85b.9c367aa3.js.map\nui/js/chunk-vendors~c8728516.dd1ccc58.js\nui/js/chunk-vendors~c8728516.dd1ccc58.js.map\nui/js/chunk-vendors~d2305125.6a99a4ff.js\nui/js/chunk-vendors~d2305125.6a99a4ff.js.map\nui/js/chunk-vendors~d9886323.1a1a66f6.js\nui/js/chunk-vendors~d9886323.1a1a66f6.js.map\nui/js/chunk-vendors~db300d2f.ddb8641c.js\nui/js/chunk-vendors~db300d2f.ddb8641c.js.map\nui/js/chunk-vendors~ec8c427e.5c1734c3.js\nui/js/chunk-vendors~ec8c427e.5c1734c3.js.map\nui/js/chunk-vendors~fdc6512a.81c5c86c.js\nui/js/chunk-vendors~fdc6512a.81c5c86c.js.map\nui/js/lang-de-translation-json~3c620948.e0b5ebcd.js\nui/js/lang-de-translation-json~3c620948.e0b5ebcd.js.map\nui/js/lang-en-translation-json~9b60384d.6a72edf9.js\nui/js/lang-en-translation-json~9b60384d.6a72edf9.js.map\nui/js/lang-es-translation-json~f7c30340.434383b0.js\nui/js/lang-es-translation-json~f7c30340.434383b0.js.map\nui/js/lang-eu-translation-json~8ed4c5c2.33ab4b3c.js\nui/js/lang-eu-translation-json~8ed4c5c2.33ab4b3c.js.map\nui/js/lang-it-translation-json~e043826f.e33749b0.js\nui/js/lang-it-translation-json~e043826f.e33749b0.js.map\nui/js/lang-pt-translation-json~45d767f3.8b3eaa68.js\nui/js/lang-pt-translation-json~45d767f3.8b3eaa68.js.map\nui/js/lang-pt_BR-translation-json~eef7148a.487e22b9.js\nui/js/lang-pt_BR-translation-json~eef7148a.487e22b9.js.map\nui/metadata.json\nui/shortcuts.json\n7690049c82984f821224d02c43abcaffa7411cb6ece3e3c3e92d37865e3f0c9f\n","exit_code":0,"file":"task/cluster/de9f72df-41a8-497a-bc2b-35a59c2b1cca","output":{"image_name":"postgresql","image_url":"ghcr.io/nethserver/postgresql:1.0.1","module_id":"postgresql3"}}},{"context":{"action":"restore-module","data":{"environment":{"IMAGE_DIGEST":"sha256:5503ed9bc121b1456ff03dd3c26029e6cb4030ab3cba58bda589c41fe3b45672","IMAGE_ID":"24a27f50b57f84741e999e1a93cbf52fa33c3ee01bcb703b86cc51318d9d78f5","IMAGE_REOPODIGEST":"ghcr.io/nethserver/postgresql@sha256:5503ed9bc121b1456ff03dd3c26029e6cb4030ab3cba58bda589c41fe3b45672","IMAGE_URL":"ghcr.io/nethserver/postgresql:1.0.1","MODULE_ID":"postgresql1","MODULE_UUID":"4a957e98-8faa-4309-b9b3-5b4a42857b17","NODE_ID":"1","PGADMIN4_IMAGE":"docker.io/dpage/pgadmin4:8.2","POSTGRES_IMAGE":"docker.io/postgres:14.10-bookworm","TCP_PORT":"20010","TCP_PORTS":"20010,20011","TCP_PORTS_RANGE":"20010-20011","TCP_PORT_PGADMIN":"20011","TCP_PORT_PGSQL":"20010","TRAEFIK_HOST":"psgadm.bybiz.link","TRAEFIK_HTTP2HTTPS":"True","TRAEFIK_LETS_ENCRYPT":"True"},"path":"postgresql/4a957e98-8faa-4309-b9b3-5b4a42857b17","replace":false,"repository":"86d1a8ac-ef89-557a-8e19-8582ab86b7c4","snapshot":"latest"},"extra":{},"id":"b7e610d6-5e1a-4a36-8462-fb07f6f54621","parent":"67b43a09-3653-4024-8b6f-c22bf1e561b1"},"status":"aborted","progress":80,"subTasks":[{"context":{"action":"configure-module","data":{"host":"psgadm.bybiz.link","http2https":"True","lets_encrypt":"True"},"extra":{},"id":"922b7be5-c07f-45c0-9a61-584defaed794","parent":"b7e610d6-5e1a-4a36-8462-fb07f6f54621","queue":"module/postgresql3/tasks","timestamp":"2024-01-14T19:44:41.467180291Z","user":"module/postgresql3"},"status":"validation-failed","progress":0,"subTasks":[],"result":{"error":"Validation errors: [lets_encrypt: Invalid type. Expected: boolean, given: string http2https: Invalid type. Expected: boolean, given: string]\n","exit_code":10,"file":"task/module/postgresql3/922b7be5-c07f-45c0-9a61-584defaed794","output":[{"error":"lets_encrypt_invalid_type","field":"lets_encrypt","parameter":"lets_encrypt","value":"True"},{"error":"http2https_invalid_type","field":"http2https","parameter":"http2https","value":"True"}]}}],"result":{"error":"<7>dump_env() is deprecated and implemented as a no-op\nrestic restore latest --target . --exclude state/environment\nTrying to pull ghcr.io/nethserver/restic:2.3.0...\nGetting image source signatures\nCopying blob sha256:5a2568abf0139dbe2d7e93836fa92121d1f4fc74478c4d3e3283f96cb900ec66\nCopying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf\nCopying config sha256:021f472c3f660ca8af6c9bd4da6c9d5d7c5901f52045526039c025ea951d02bf\nWriting manifest to image destination\nrestoring <Snapshot bb20d46a of [/srv/state/environment] at 2024-01-14 19:17:01.721926565 +0000 UTC by root@ns8> to .\nThe configure-module subtask failed!\n  File \"/home/postgresql3/.config/actions/restore-module/50traefik\", line 21, in <module>\n    agent.assert_exp(configure_retval['exit_code'] == 0, \"The configure-module subtask failed!\")\n","exit_code":2,"file":"task/module/postgresql3/b7e610d6-5e1a-4a36-8462-fb07f6f54621","output":""}}],"validated":true,"result":{"error":"restic dump latest state/environment\nAssertion failed\n  File \"/var/lib/nethserver/cluster/actions/restore-module/50restore_module\", line 93, in <module>\n    agent.assert_exp(restore_task_result['exit_code'] == 0)\n","exit_code":2,"file":"task/cluster/67b43a09-3653-4024-8b6f-c22bf1e561b1","output":""}}

unless there is somewhere else to dig in

will attempt to reproduce, thank

1 Like

WHile there seems to be some error message during restoration, it seems that the restoration occurs successfully.

I am not sure if its because the original instance is still running, or because the hostname of the restore is aready used by the running module.

1 Like

fixed and released

2 Likes

Wonderful, will test again tonight

PErformed update using:

api-cli run update-module --data '{"module_url":"ghcr.io/nethserver/postgresql:latest","instances":["postgresql1"],"force":true}'


interface

image

Update went smoothly,

Restore case 1: to another instance:

image

restore in progress
image

restore to another instance was succesfull

image

Restore test case 2: restore to existing instance
image

Restore was successfuly
image

SUCCESS

1 Like

Now regarding enabling the opening of ports for external Access,
HAve you figured out how it could be implemented?