Scénario #35250
Intégration dans Veyon de workstations Linux Lubuntu
100%
Description
Bonjour,
suite aux messages envoyés sur la liste Scribe : https://pcll.ac-dijon.fr/listes/arc/scribe/2023-02/msg00011.html
j'ouvre une demande de correction de bug pour ces workstations
OS-RELEASE : NAME="Ubuntu" VERSION="20.04.5 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.5 LTS" VERSION_ID="20.04" VERSION_CODENAME=focal UBUNTU_CODENAME=focal
Dans le log minion:
---------- ID: Download Veyon Configuration Function: file.managed Name: /tmp/veyon-config.json Result: False Comment: Unable to manage file: Problem running salt function in Jinja template: *The shell powershell is not available; line 123* --- [...] "ComputerLocationsByAttribute": "false", "ComputerLocationsByContainer": "true", "ComputerContainersFilter": "(objectClass=organizationalUnit)", "LocationNameAttribute": "ou", {%- set cmd_query = '([adsisearcher]"(&(objectCategory=computer)(objectClass=computer)(cn=$env:COMPUTERNAME))").FindOne().Properties.distinguishedname' %} {%- set dn = salt["cmd.run"](cmd_query, shell="powershell") %} <====================== {%- set len_dn = veyon.ldap.base_dn|length %} {%- set root_dn = dn[:-len_dn-1].split(',', 1)[1] %} "ComputerTree": "{{ root_dn }}", {% endif %} "ComputersFilter": "(objectClass=computer)", [...] --- Started: 17:37:53.937018 Duration: 37.726 ms Changes:
Sous-tâches
Demandes liées
Révisions associées
fix(veyon): we can't run powershell on non windows client
- eole-workstation/veyon/config/file.sls: calculate the computer `ou`
with ldap query from powershell windows client and with
`ldap3.search` on others.
Pass the `computer_ou` in Veyon configuration file template context.
- eole-workstation/veyon/config/files/default/veyon-config.json: use `computer_ou`.
fix(veyon): python package is required for linux client
- eole-workstation/veyon/package/install.sls: install ldap python
package for non windows client. - eole-workstation/parameters/defaults.yaml: set python package name.
fix(veyon): access to `salt["ldap3.search"]` fails the first time
When the LDAP python package is not installed, accessing
`salt["ldap3.search"]` makes the highstate to fail with:
Jinja variable 'salt.utils.templates.AliasedLoader object' has no
attribute 'ldap3.search'
- eole-workstation/veyon/config/file.sls: check for `ldap3.search` in
salt before using it
fix(veyon): remove typo for `pkg.installed`
fix(veyon): don't crash when windows computer is not in AD domain
When the computer is not in the domain, the `cmd.run` command return
garbage output which is miss interpreted in YAML processing.
- eole-workstation/veyon/config/file.sls: wrap powershell command in
`try/catch` to avoid garbage output.
Filter context through json to prevent any YAML parsing error.
fix(veyon): remove base DN from ComputerTree
- eole-workstation/veyon/config/file.sls: remove `base_dn` from `computer_ou`
Historique
#1 Mis à jour par Joël Cuissinat il y a environ un an
- Lié à Tâche #33685: Veyon : pouvoir gérer les ordinateurs par OU ajouté
#2 Mis à jour par Joël Cuissinat il y a environ un an
Lors de l'implémentation du "mode OU", un morceau de code spécifique semble mis en dur : https://dev-eole.ac-dijon.fr/projects/eole-workstation/repository/eole-workstation-formula/revisions/458d21aafae6254fd29cba80fc13c69d2f1691f6/diff/eole-workstation/veyon/config/files/default/veyon-config.json
#3 Mis à jour par Gilles Grandgérard il y a environ un an
- Description mis à jour (diff)
#4 Mis à jour par Gilles Grandgérard il y a environ un an
- Tracker changé de Demande à Scénario
- Début
23/02/2023supprimé - Release mis à EOLE 2.8.1
#5 Mis à jour par Gilles Grandgérard il y a environ un an
A voir :
{% if "Windows" == grains["os"] %} {% set hellofile = "C:\hellotero.txt" %} {% else %} {% set hellofile = "/tmp/hellotero.txt" %} {% endif %} {{ hellofile }}:
Exemple : https://terokarvinen.com/2018/configure-windows-and-linux-with-salt-jinja-if-else-and-grains/
il faut trouver la requête 'linux' donnant l'OU ...
#6 Mis à jour par Daniel Dehennin il y a environ un an
- Description mis à jour (diff)
#7 Mis à jour par Daniel Dehennin il y a environ un an
- Projet changé de Scribe à eole-workstation
#8 Mis à jour par Daniel Dehennin il y a environ un an
- Statut changé de Nouveau à En cours
- % réalisé changé de 0 à 90
J’ai fait le paquet pour eole-2.9.0-proposed-updates
.
Une fois validé, je le ferais aussi pour 2.8.1
#9 Mis à jour par Joël Cuissinat il y a environ un an
- Echéance mis à 01/01/2024
- Assigné à mis à Daniel Dehennin
- Version cible mis à Carnet MENSR
- Début mis à 01/10/2022
- Points de scénarios mis à 2.0
#10 Mis à jour par Joël Cuissinat il y a 12 mois
- Statut changé de En cours à Terminé (Sprint)
- Version cible changé de Carnet MENSR à Livraison MENSR 31/03/2023