Tâche #35855
Scénario #35868: Corrections client Zéphir à rétro-porter en 2.7
Remontée des fichiers_zephir type "container" (rétro-portage 2.7)
Statut:
À valider
Priorité:
Normal
Assigné à:
Version cible:
Début:
28/03/2024
Echéance:
% réalisé:
0%
Restant à faire (heures):
Description
Bonjour,
En version 2.7, les fichiers_zephir de type « container » ne remontent pas correctement :
Il s'avère que le problème vient des fichiers configID.md5 qui ne contient pas les md5 des fichiers dans les containers.
La correction suivante (format diff) du fichier zephir/monitor/agentmanager/zephirservice.py règle le problème :
24a25
> from creole.client import CreoleClient
44a46,62
> creole_client = None
>
> def container_aware_path(path):
> global creole_client
> path_elements = path.split('::')
> path = Path(path_elements[0])
> name = path.name
> if len(path_elements) > 1 and path_elements[1]:
> container = path_elements[1]
> if not creole_client:
> creole_client = CreoleClient()
> container_path = creole_client.get_creole('container_path_{}'.format(container), None)
> if container_path:
> path = Path(container_path).joinpath(path)
> name = name + "::{}".format(container)
> return path, name
>
385c403
< fichier_serveur = Path(l.strip())
---
> fichier_serveur, name = container_aware_path(l.strip())
388c406
< data.append("{} {}\n".format(md5res, Path('fichiers_zephir').joinpath(fichier_serveur.name)))
---
> data.append("{} {}\n".format(md5res, Path('fichiers_zephir').joinpath(name)))
396c414
< Path('fichiers_zephir').joinpath(fichier_serveur.name, sub_fichier_serveur)))
---
> Path('fichiers_zephir').joinpath(name, sub_fichier_serveur)))
405c423
< fichier_serveur = Path(l.strip())
---
> fichier_serveur, name = container_aware_path(l.strip())
408c426
< data.append("{} {}\n".format(md5res, Path('fichiers_zephir').joinpath('variante', fichier_serveur.name)))
---
> data.append("{} {}\n".format(md5res, Path('fichiers_zephir').joinpath('variante', name)))
Serait-il possible s'il vous plait d'intéger cette modification dans une future version du paquet 2.7 ?
D'avance merci, bien cordialement,
Tom.
Demandes liées
Révisions associées
Rechercher les fichiers en conteneur au bon endroit.
Ref #35855
Historique
#1 Mis à jour par Joël Cuissinat il y a 30 jours
- Lié à Tâche #35129: Les fichiers envoyés dans un conteneur ne sont pas détectés ajouté
#2 Mis à jour par Joël Cuissinat il y a 30 jours
- Sujet changé de Remontée des fichiers_zephir type "container" à Remontée des fichiers_zephir type "container" (rétro-portage 2.7)
#4 Mis à jour par Joël Cuissinat il y a 22 jours
- Lié à Scénario #35309: Les fichiers complémentaires Zéphir sont vus comme non envoyé sur 2.7 ajouté
#5 Mis à jour par Joël Cuissinat il y a 22 jours
- Tâche parente mis à #35868
#6 Mis à jour par Benjamin Bohard il y a 16 jours
- Statut changé de Nouveau à À valider
#7 Mis à jour par Benjamin Bohard il y a 16 jours
- Assigné à mis à Benjamin Bohard