Projet

Général

Profil

Development #86724

hobo_deploy: pas de base au déploiement de w.c.s en multicollectivité (via devinst)

Ajouté par Nicolas Roche il y a 3 mois. Mis à jour il y a 3 mois.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
08 février 2024
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

Je fais ce déploiement sur mon devinst (fichier joint) et j'ai cette erreur (recopiée depuis les logs d'hobo-agent) :

RuntimeError: command "/home/nroche/envs/publik-env-py3/bin/wcs-manage hobo_deploy https://parsifal-wcs.dev.publik.love/ -" failed:
updating instance in /var/lib/wcs/tenants/parsifal-wcs.dev.publik.love\n'
Traceback (most recent call last):
  File "/home/nroche/src/wcs/manage.py", line 10, in <module>
 execute_from_command_line(sys.argv)
  File "/home/nroche/envs/publik-env-py3/lib/python3.11/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/nroche/envs/publik-env-py3/lib/python3.11/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/nroche/envs/publik-env-py3/lib/python3.11/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/nroche/src/wcs/wcs/ctl/management/commands/__init__.py", line 58, in execute
    return super().execute(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nroche/envs/publik-env-py3/lib/python3.11/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nroche/src/wcs/wcs/ctl/management/commands/hobo_deploy.py", line 80, in handle
    self.deploy(**options)
  File "/home/nroche/src/wcs/wcs/ctl/management/commands/hobo_deploy.py", line 174, in deploy
    self.update_profile(self.all_services.get(\'profile\', {}), pub)
  File "/home/nroche/src/wcs/wcs/ctl/management/commands/hobo_deploy.py", line 306, in update_profile
    formdef.store()
  File "/home/nroche/src/wcs/wcs/admin/settings.py", line 295, in store
    audit(\'settings\', cfg_key=\'users\')
  File "/home/nroche/src/wcs/wcs/qommon/__init__.py", line 34, in audit
    Audit.record(action, **kwargs)
  File "/home/nroche/src/wcs/wcs/audit.py", line 70, in record
    audit.store()
  File "/home/nroche/src/wcs/wcs/sql.py", line 4380, in store
    cur.execute(sql_statement, sql_dict)
psycopg2.errors.UndefinedTable: ERREUR:  la relation \xc2\xab audit \xc2\xbb n\'existe pas
LINE 1: INSERT INTO audit (timestamp, action, url, user_id, object_t...\n


Fichiers

recipe-cook-parsifal-local.json (998 octets) recipe-cook-parsifal-local.json Nicolas Roche, 08 février 2024 14:04

Demandes liées

Lié à w.c.s. - Development #64784: prendre en charge default.zip comme modèle quand il existeFermé03 mai 2022

Actions

Historique

#1

Mis à jour par Nicolas Roche il y a 3 mois

J'ai réussi à déployer w.c.s. avec ce patch :

diff --git a/wcs/ctl/management/commands/hobo_deploy.py b/wcs/ctl/management/commands/hobo_deploy.py
index 54c962fce..6e0a16eda 100644
--- a/wcs/ctl/management/commands/hobo_deploy.py
+++ b/wcs/ctl/management/commands/hobo_deploy.py
@@ -575,3 +575,3 @@ class Command(TenantCommand):
         if not pub.cfg.get('postgresql'):
-            return
+            pub.cfg['postgresql'] = {}

#2

Mis à jour par Frédéric Péters il y a 3 mois

  • Projet changé de w.c.s. à Publik Installation Développeur

C'est a priori que le modèle de site n'est pas correct (par défaut /var/lib/wcs/skeletons/default.zip).

#3

Mis à jour par Emmanuel Cazenave il y a 3 mois

  • Lié à Development #64784: prendre en charge default.zip comme modèle quand il existe ajouté
#4

Mis à jour par Emmanuel Cazenave il y a 3 mois

  • Assigné à mis à Emmanuel Cazenave

Devinst génère et pose un 'publik.zip', et le fichier cook embarqué dans devinst précise cela :

{"create-wcs": {
     "url": "https://{{tenants_conf['demarches-wcs']}}/",
     "template_name": "publik.zip",
     "title": "Démarches" 
}}

Passons un à 'default.zip' pour éviter ce genre de mésaventures.

#5

Mis à jour par Robot Gitea il y a 3 mois

  • Statut changé de Nouveau à En cours

Emmanuel Cazenave (ecazenave) a ouvert une pull request sur Gitea concernant cette demande :

#6

Mis à jour par Robot Gitea il y a 3 mois

  • Statut changé de En cours à Solution proposée
#7

Mis à jour par Robot Gitea il y a 3 mois

  • Statut changé de Solution proposée à Solution validée

Nicolas Roche (nroche) a approuvé une pull request sur Gitea concernant cette demande :

#8

Mis à jour par Robot Gitea il y a 3 mois

  • Statut changé de Solution validée à Résolu (à déployer)

Emmanuel Cazenave (ecazenave) a mergé une pull request sur Gitea concernant cette demande :

#9

Mis à jour par Emmanuel Cazenave il y a 3 mois

  • Statut changé de Résolu (à déployer) à Solution déployée
#10

Mis à jour par Transition automatique il y a 14 jours

Automatic expiration

Formats disponibles : Atom PDF