Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/integration' into xmppmaster
Browse files Browse the repository at this point in the history
  • Loading branch information
neoclust committed Sep 20, 2021
2 parents 1177208 + a7cef11 commit aecd1dc
Show file tree
Hide file tree
Showing 558 changed files with 52,902 additions and 37,553 deletions.
158 changes: 158 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,161 @@
Pulse 2 4.6.9
=============
* [FEATURE] Add Team support in Audit page
* [FEATURE] Add new infos in the fileviewer as config ( server, port, size
popup, etc.)
* [FEATURE] Add link to machines in the Quick Action summary page
* [FEATURE] Add a button to run the researches on computers
* [FEATURE] Remove the "Restart machine agent" Quick action
* [FEATURE] Optimize Comuter view display
* [FEATURE] Optimize admin view display
* [FEATURE] Add online/offline switch to the uninventoried page
* [FEATURE] Add a @@@DEBUG@@@ option in queries to show played SQL Requests
* [FEATURE] Add the possibility to add a limit number to the autoupdate feature.
* [FEATURE] Change the way WOL is handled.
* [BUGFIX] Fix removing packages from the database. Bug#1323
* [BUGFIX] Fix deleting old users in ejabberd
* [BUGFIX] Remove cdn from js files import. Use local files instead
* [BUGFIX] Several SQL Optimisations
* [BUGFIX] Fix shown state when starting a deployment
* [BUGFIX] Fix handling some accounts creation
* [BUGFIX] Fix display infos on group deployment audit
* [BUGFIX] Fix creating groups based on ADs
* [BUGFIX] The abort deployment button was always disabled
* [BUGFIX] Fix creation of groups based on OU or AD. Bug#1238
* [BUGFIX] Add carriage return on "Executed command" info in detail view
* [BUGFIX] Fix detection of online machines with glpi 0.84

Pulse 2 4.6.8
=============
* [FEATURE] Disable relay list page from computers menu
* [FEATURE] Add utilities to migrate to new package server
* [FEATURE] Disable new sharing mode by default
* [FEATURE] Update translations
* [FEATURE] Rename "Localisation server" to "Share" and remove the search field
* [FEATURE] Remove "add package" from menu when the user has no writing rights
* [FEATURE] Update the package parser to catch more errors
* [FEATURE] Enhance error messages.
* [FEATURE] Fix several XSS issues.
* [FEATURE] Allow to retrieve the glpi uuid if missing
* [FEATURE] Convergences are now identified by their name + date
* [FEATURE] Do not display old view when creating the packages.
* [FEATURE] Allow to filter searches based on the relay jid
* [BUGFIX] Fix backtrace during deployment
* [BUGFIX] Fixes listing of packages for deployment
* [BUGFIX] Add acl for relays actions
* [BUGFIX] Fix rendering of accentuated letters from glpi to pulse.
* [BUGFIX] Fix detection of online/offline machine in the Glpi view
* [BUGFIX] Add back addMachinesToCommand function ( fixing restarting
convergences)
* [BUGFIX] Do not allow ; in computers descriptions
* [BUGFIX] Fix the int limitation problem for quotas in sharing
* [BUGFIX] Change the size of the packages size column
* [BUGFIX] Fix use of older SQLAlchey
* [BUGFIX] Fix registry when there no uuidsetup defined
* [BUGFIX] Change glpi_description sql field to text
* [BUGFIX] Fix display of active/available convergences
* [BUGFIX] Fix permissions for viewing ars based on clusters
* [BUGFIX] Grant Rights for Admin on the ARS Cluster.
* [BUGFIX] Fix use of <br> in the description field (glpi )
* [BUGFIX] Escape simple quotes in descriptions ( glpi )
* [BUGFIX] Fix listing enabled plugins.
* [BUGFIX] Fix crash when metagenerator is missing
* [BUGFIX] Set metagenerator key to expert if missing
* [BUGFIX] Fix registration when there is no entity in xmppmaster database yet
* [BUGFIX] Fixes traceback when editing
* [BUGFIX] Convert id from string to int for glpi 084 and 92
* [BUGFIX] Use OCS inventory date if exists
* [BUGFIX] All entities return all entities uuids allowed to the user
* [BUGFIX] Fix search in entities
* [BUGFIX] Add the entity to the search.
* [BUGFIX] Fix a problem when the hostname changed.
* [BUGFIX] Pkgs display on "os" definition in config.json
* [BUGFIX] Fix the edition status if the metagenerator is set to manual
* [BUGFIX] Remove too many arguments in the formatted filter
* [BUGFIX] Set to "" the none values on sharings infos
* [BUGFIX] A undefined variable were used, replaced it by the real name
* [BUGFIX] Modify assert tests to conditionnal tests in the page generator
* [BUGFIX] Do not look for installation command if package is larger than 500MB
* [BUGFIX] Fix backtrace when no machines are associated to a relay
* [BUGFIX] Fix pagination on packages list admin page
* [BUGFIX] Enhance glpi 0.84 support
* [BUGFIX] Remove registries from machines filters
* [BUGFIX] Keep the partial count and use the total
* [BUGFIX] Fixes the pagination for the computers list
* [BUGFIX] Fix pagination in admin relay page
* [BUGFIX] Fix traceback when a user doesn't have rights on shares for relays list in admin
* [BUGFIX] Fix missing declaration for an array in glpi 0.84
* [BUGFIX] Remove old parameters from the filter
* [BUGFIX] Fix traceback on arraykeys when listing all computers in glpi 0.84
* [BUGFIX] Fix deployment action when machine is offline
* [BUGFIX] User can view only the relays allowed in pkgs_rules_local
* [BUGFIX] Fix wol by correcting a wrong variable name
* [BUGFIX] Fix size output to be human readable
* [BUGFIX] Fix package page when there is no packages to display
* [BUGFIX] Fix checking if new sharing is used, if not used the old style
* [BUGFIX] Add name to csv when the group is created
* [BUGFIX] Add missing parameters in pkgs.ini and initialise pkgs_rules_algo table
* [BUGFIX] Fix pagination in GLPI View
* [BUGFIX] Fix registering ARS
* [BUGFIX] Fix displaying the relay list
* [BUGFIX] Fix and add ACLs
* [BUGFIX] Fix migration to new packages layout
* [BUGFIX] Change hostname in cluster_resources size to 255
* [BUGFIX] Remove description from csv generation
* [BUGFIX] Modify concatenation of " bracket from csv generation
* [BUGFIX] Fix display of dates in the audit page

Pulse 2 4.6.7
=============
* [FEATURE] Order relay list
* [FEATURE] Add ACL on the package synchronisation
* [FEATURE] Add ACL on the GLPI view
* [FEATURE] Add ACL on package and relay view
* [FEATURE] Add Quotas for relay servers
* [FEATURE] New computer view
* [BUGFIX] Fix deploying packages with the same name
* [BUGFIX] Fix creating a package using the Zip action
* [BUGFIX] Hide convergence if not available.
* [BUGFIX] Export CSV

Pulse 2 4.6.6
=============
* [FEATURE] Add admin page
* [FEATURE] Allow to set up the send of WOL
* [FEATURE] Allow to disable the use of UUID for glpi association
* [FEATURE] Show non sync relays at the top of the list ( package view )
* [FEATURE] Create packages in pushrsync by default and fallback in pulldirect if pushrsync fails.
* [FEATURE] Ajout du camembert intermédiaire une fois le déploiement terminé
* [FEATURE] Add the percent in the Audit view
* [BUGFIX] Fix packages sync when a relay is down
* [BUGFIX] Fix the percentages in the deploy view
* [BUGFIX] Fix the action "set_config" in packaging
* [BUGFIX] Fix the dates when planning a deployment
* [BUGFIX] Fix detection of the package server when using pulldirect

Pulse 2 4.6.5
=============
* [FEATURE] Add Glpi 9.5 Support
* [FEATURE] Support php-fpm by default
* [FEATURE] Save Online/Offline states and their duration, to be used later
* [FEATURE] Add grafana support for monitoring
* [FEATURE] Allow to create a reversessh tunel from a QuickAction
* [FEATURE] Rename log files to have the name of the service (machine/relay)
* [FEATURE] Use glpi's UUID uniq value add machines in the machines sql table
* [FEATURE] Set pulldirect deployement mode by default
* [FEATURE] Add support for python-ldap from version 3.2.0
* [FEATURE] Notify recording ARS
* [FEATURE] Allow to disable the UUID feature ( if using an old GLPI for ex.)
* [BUGFIX] Update Translations
* [BUGFIX] The Relay List now show the good JID
* [BUGFIX] The Computer page now list the machines by name
* [BUGFIX] Add the firmware column to the filter
* [BUGFIX] Fix reversessh support
* [BUGFIX] Fix support with MariaDB 10.3
* [BUGFIX] Fix Audit page when the machines has several mac addresses
* [BUGFIX] Fix registering the machines if the interface changes
* [BUGFIX] Fix wording regarding source of IP address in audit view

Pulse 2 4.6.4
=============
* [FEATURE] Add quick actions to relays management
Expand Down
117 changes: 117 additions & 0 deletions ChangeLog_fr
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
Pulse 2 4.6.9
=============
* [FONCTIONNALITE] Ajout du support des Equipe dans la page Audit
* [FONCTIONNALITE] Ajout de nouvelles options de configuration dans le
fileviewer ( Serveur, port, taille de la popup, etc.)
* [FONCTIONNALITE] Ajout du lien vers les machines dans la page de sommaire
des Actions rapides
* [FONCTIONNALITE] Suppression de l'action rapdie "Restart machine agent"
* [FONCTIONNALITE] Ajout d'un bouton de validation des recherches
* [FONCTIONNALITE] Optimisation de l'affichage de la vue ordinateur
* [FONCTIONNALITE] Optimisation de l'affichage de la vue admin
* [FONCTIONNALITE] Ajout d'un selecteur en ligne/hors ligne pour la vue des
machines non inventoriées
* [FONCTIONNALITE] Ajout de l'option @@@DEBUG@@@ lors des recherches afin
de montrer les Requetes SQL jouées
* [CORRECTION DE BUG] Correction de la suppression de packages. Bug#1323
* [CORRECTION DE BUG] Correction de la suppression d'anciens compte
utilisateurs dans ejabberd
* [CORRECTION DE BUG] Suppression des cdn pour l'utilisation des fichiers js.
Utilisation de fichiers locaux à la place
* [CORRECTION DE BUG] De nombreuses optimisations dans les requetes SQL jouées
* [CORRECTION DE BUG] Correction de l'état de déployement affiché en début de
déployement.
* [CORRECTION DE BUG] Correction de la gestion de la creation de certains
utilisateurs ( subsitutes )
* [CORRECTION DE BUG] Correction de l'affichage des informations dans la page
audit ( nom de la machine par exemple).
* [CORRECTION DE BUG] Correction de la creation de groupes, basés sur OU de
l'AD Bug#1238
* [CORRECTION DE BUG] Correction de la détection des machines en ligne avec
Glpi 0.84


Pulse 2 4.6.8
=============
* [FONCTIONNALITE] Suppresion de la liste des relays dans la page Ordinateurs.
* [FONCTIONNALITE] Ajout d'un utilitaire afin de migrer vers le nouveau systeme de
packages.
* [FONCTIONNALITE] Désactivation du nouveau partage par defaut.
* [FONCTIONNALITE] Mise à jour de traductions.
* [FONCTIONNALITE] Renommage de "Serveur de Localisation" en "Partage" et suppresion
du champs de recherche
* [FONCTIONNALITE] Suppression de "Ajouter un package" du menu pour les utilisateurs
n'ayant pas les droits
* [FONCTIONNALITE] Amélioration du "package parser" afin d'attraper plus d'erreurs.
* [FONCTIONNALITE] Amélioration de messages d'erreur.
* [FONCTIONNALITE] Corrections de bugs XSS
* [FONCTIONNALITE] Récupération de l'UUID Glpi si manquant
* [FONCTIONNALITE] Les convergences sont maintenant identifiées par leur nom + date.
* [FONCTIONNALITE] Suppression de l'ancienne vue de création de packages
* [FONCTIONNALITE] Ajout de la recherche de machines basé sur le JID du relay
* [CORRECTION DE BUG] Correction d'un backtrace pendant le déploiement
* [CORRECTION DE BUG] Correction de l'affichage des packages pendant le déploiement
* [CORRECTION DE BUG] Ajout d'ACL pour les actions des relays
* [CORRECTION DE BUG] Correction de l'utlisation de caractères accentués dans les
descriptions Glpi
* [CORRECTION DE BUG] Correction de la détection des machines en ligne/Hors ligne dans
la vue Glpi
* [CORRECTION DE BUG] Add back addMachinesToCommand function ( fixing restarting
convergences)
* [CORRECTION DE BUG] Interdiction des caractères ; dans la description des ordinateurs
* [CORRECTION DE BUG] Support pour les anciennes versions de SQLAlchemy
* [CORRECTION DE BUG] Correction de l'enregistrement lorsque le uuidsetup n'est pas
défini
* [CORRECTION DE BUG] Changement de la colonne glpi_description vers "text"
* [CORRECTION DE BUG] Correction de l'affichage des convergences actives/disponibles
* [CORRECTION DE BUG] Correction de la gestion des droits pour les clusters d'ARS dans
la vue admin
* [CORRECTION DE BUG] Correction de l'utilisation de <br> dans les descriptions glpi
* [CORRECTION DE BUG] Correction de l'utilisation de ' dans les descriptions ( glpi )
* [CORRECTION DE BUG] Correction du listage des plugins actifs
* [CORRECTION DE BUG] Correction d'un backtrace lorsqu'un metagenerateur est manquant
* [CORRECTION DE BUG] Modification de la clef du metagenerateur en expert si manquant
* [CORRECTION DE BUG] Correction d'un backtrace lors de l'edition d'un package
* [CORRECTION DE BUG] Utilisation des dates d'inventaire OCS si elles existent
* [CORRECTION DE BUG] Correction de la recherche des entités
* [CORRECTION DE BUG] Ajout des entités aux recherches
* [CORRECTION DE BUG] Correction d'un bug lors du changement de nom d'hote de la machine
* [CORRECTION DE BUG] Ne pas chercher la commande d'installation si le package fait plus
de 500 Mo.
* [CORRECTION DE BUG] Correction d'un backtrace lorsqu'aucune machine n'est associée a
un relay
* [CORRECTION DE BUG] Correction de la pagination dans la fenetre package de la vue admin
* [CORRECTION DE BUG] Amélioration du support de Glpi 0.84
* [CORRECTION DE BUG] Correction de la pagination dans la vue ordinateur
* [CORRECTION DE BUG] Correction de la pagination de la page Admin
* [CORRECTION DE BUG] Correction d'un backtrace lorsqu'un utilisateur n'a aucun droit
sur les partages des relays.
* [CORRECTION DE BUG] Correction d'un tableau manquant dans Glpi 0.84
* [CORRECTION DE BUG] Suppression des anciens parametres dans les filtres.
* [CORRECTION DE BUG] Correction d'un backtrace lors de l'affichage de tout les
ordinateurs sous glpi 0.84
* [CORRECTION DE BUG] Correction des actions de déploiement lorsqu'une machine est hors
ligne.
* [CORRECTION DE BUG] Les utilisateurs ne peuvent voir que les relays utilisés dans pkgs_rules_local
* [CORRECTION DE BUG] Correction du WOL en corrigeant le nom d'une variable.
* [CORRECTION DE BUG] Correction de l'affichage de la taille des packages pour être
compréhensible.
* [CORRECTION DE BUG] Correction de la page package lorsqu'il n'y a pas de packages à
afficher.
* [CORRECTION DE BUG] Verification du mode de partage utilisé. Utilisation de l'ancien
par defaut.
* [CORRECTION DE BUG] Ajout du nom du fichier csv lorsqu'un groupe est créé
* [CORRECTION DE BUG] Ajout d'un parametre manquant dans pkgs.ini et initialisation de
la table pkgs_rules_algo
* [CORRECTION DE BUG] Correction de la pagination dans la vue GLPI
* [CORRECTION DE BUG] Correction de l'enregistrement d'ARs
* [CORRECTION DE BUG] Correction de l'affichage de la page des relays
* [CORRECTION DE BUG] Ajout et Corrections d'ACLs
* [CORRECTION DE BUG] Correction de la migration vers le nouveau style de package
* [CORRECTION DE BUG] Modification du champs hostname dans cluster_resources à une
taille de 255
* [CORRECTION DE BUG] Suppresion du champs des description des CSV
* [CORRECTION DE BUG] Modification du symbole de concaténation ( " ) lors de la
génération des CSV
* [CORRECTION DE BUG] Correction de l'affichage des dates dans la page Audit

2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PROJECT_NAME = "Pulse"
# control system is used.


PROJECT_NUMBER = "4.6.4"
PROJECT_NUMBER = "4.6.8"


# Using the PROJECT_BRIEF tag one can provide an optional one line description
Expand Down
2 changes: 1 addition & 1 deletion agent/conf/plugins/services.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ mail = dovecot,postfix,amavis,amavisd
network = isc-dhcp-server,dhcpd,bind9,named,named-sdb
shorewall = shorewall
squid = squid
base = mmc-agent,pulse2-inventory-server,pulse2-package-server,pulse-xmpp-agent-relay,pulse2-register-pxe,pulse-xmpp-agent-log
base = mmc-agent,pulse2-inventory-server,pulse2-package-server,pulse-xmpp-agent-relay,pulse2-register-pxe,pulse-xmpp-agent-log,pulse-package-watching,pulse-xmpp-master-substitute-all,pulse-xmpp-master-substitute-inventory,pulse-xmpp-master-substitute-registration,pulse-xmpp-master-substitute-assessor,pulse-xmpp-master-substitute-deployment,pulse-xmpp-master-substitute-subscription,pulse-xmpp-master-substitute-logger,pulse-xmpp-master-substitute-reconfigurator,pulse-xmpp-master-substitute-monitoring
57 changes: 56 additions & 1 deletion agent/mmc/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import imp
import logging
import logging.config
from logging.handlers import TimedRotatingFileHandler
import xmlrpclib
import os
import sys
Expand All @@ -59,14 +60,67 @@
import string
import threading
import re
import zipfile
from stat import ST_CTIME





class TimedCompressedRotatingFileHandler(TimedRotatingFileHandler):
"""
Extended version of TimedRotatingFileHandler that compress logs on rollover.
the rotation file is compress in zip
"""

def __init__(self, filename, when='h', interval=1, backupCount=0,
encoding=None, delay=False, utc=False, compress="zip"):
super(TimedCompressedRotatingFileHandler, self).__init__(filename, when,
interval, backupCount, encoding,
delay, utc)
self.backupCountlocal= backupCount

def get_files_by_date(self):
dir_name, base_name = os.path.split(self.baseFilename)
file_names = os.listdir(dir_name)
result = []
result1 = []
prefix = '{}'.format(base_name)
for file_name in file_names:
if file_name.startswith(prefix) and not file_name.endswith('.zip'):
f=os.path.join(dir_name, file_name )
result.append((os.stat(f).st_ctime, f) )
if file_name.startswith(prefix) and file_name.endswith('.zip'):
f=os.path.join(dir_name, file_name )
result1.append((os.stat(f).st_ctime, f))
result1.sort()
result.sort()
while result1 and len(result1) >= self.backupCountlocal:
el = result1.pop(0)
if os.path.exists(el[1]):
os.remove(el[1])
return result[1][1]

def doRollover(self):
super(TimedCompressedRotatingFileHandler, self).doRollover()
try:
dfn = self.get_files_by_date()
except:
return
dfn_zipped = '{}.zip'.format(dfn)
if os.path.exists(dfn_zipped):
os.remove(dfn_zipped)
with zipfile.ZipFile(dfn_zipped, 'w') as f:
f.write(dfn, dfn_zipped, zipfile.ZIP_DEFLATED)
os.remove(dfn)

logger = logging.getLogger()

sys.path.append("plugins")

Fault = xmlrpclib.Fault
ctx = None
VERSION = "4.6.4"
VERSION = "4.6.9"


class IncludeStartsWithFilter(logging.Filter):
Expand Down Expand Up @@ -810,6 +864,7 @@ def run(self):

def initialize(self):
# Initialize logging object
logging.handlers.TimedCompressedRotatingFileHandler = TimedCompressedRotatingFileHandler
logging.config.fileConfig(self.conffile)

# In foreground mode, log to stderr
Expand Down
2 changes: 1 addition & 1 deletion agent/mmc/plugins/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "4.6.4"
VERSION = "4.6.9"
APIVERSION = "0:0:0"
REVISION = ""

Expand Down
Loading

0 comments on commit aecd1dc

Please sign in to comment.