Tâche #31747
Scénario #31715: Traitement express MEN (08-10)
Veyon : faire fonctionner la prise de contrôle à distance
100%
Description
Problème¶
L'activation de la prise de contrôle à distance n'est pas prise en compte par Veyon.
Remarque de Manu :
Pour que l'option soit prise en compte il faut faire un salt "*" state.apply, mais l'option n'est pas prise en compte systématiquement (jamais ?). Je dois lancer veyon-configurator et changer un paramètre pour l'option soit réellement prise en compte.
Même en faisant ces manipulations, la fonctionnalité n'est toujours pas présente dans Veyon.
Solution¶
Le soucis vient d’un bug d’implémentation de l’activation de la fonctionnalité. Dans Veyon, l’import de la configuration n’écrase que ce qui est défini dans le fichier de configuration. Il faut donc définir une liste vide de fonctionnalités désactivées afin de réactiver celles qui ne l’étaient pas.
Pour tester¶
- Monter une infrastructure
etb1
avec au moins un poste client intégré au domaine - Activer la prise en main à distance
root@scribe:~# CreoleSet veyon_allow_adding_hidden_locations oui
- Reconfigurer le serveur
- Redémarrer le poste client
root@scribe:~# salt '*' system.reboot in_seconds=True
- Se connecter sur le poste client
- Exécuter
Veyon Master
- Vérifier la présence des fonctions
Vue
etContrôle à distance
dans la barre du haut
Dans une seconde console sur le serveur, vous pouvez visualiser ce qui se déroule sur le poste client pendant son redémarrage, par exemple :
root@scribe:~# salt-run state.event pretty=True […] salt/job/20210224121955465086/ret/PC-512962.dompedago.etb1.lan { "_stamp": "2021-02-24T12:19:55.466401", "arg": [], "cmd": "_return", "fun": "state.highstate", "fun_args": [], "id": "PC-512962.dompedago.etb1.lan", "jid": "20210224121955465086", "out": "highstate", "retcode": 0, "return": { "cmd_|-Import Veyon configuration_|-veyon-cli.exe config import veyon-config.json_|-run": { "__id__": "Import Veyon configuration", "__run_num__": 7, "__sls__": "eole-workstation.veyon.config.import", "changes": { "pid": 4872, "retcode": 0, "stderr": "", "stdout": "[OK]" }, "comment": "Command \"veyon-cli.exe config import veyon-config.json\" run", "duration": 187.493, "name": "veyon-cli.exe config import veyon-config.json", "result": true, "start_time": "13:19:48.049236" }, "cmd_|-Restart Veyon Service_|-veyon-cli.exe service restart_|-run": { "__id__": "Restart Veyon Service", "__run_num__": 11, "__sls__": "eole-workstation.veyon.service.running", "changes": { "pid": 3320, "retcode": 0, "stderr": "", "stdout": " Arrêt du service VeyonService....................Démarrage du service VeyonService......[OK]" }, "comment": "Command \"veyon-cli.exe service restart\" run", "duration": 5422.003, "name": "veyon-cli.exe service restart", "result": true, "start_time": "13:19:48.455475" }, "file_|-Download Veyon Configuration_|-C:\\Program Files\\Veyon\\veyon-config.json_|-managed": { "__id__": "Download Veyon Configuration", "__run_num__": 6, "__sls__": "eole-workstation.veyon.config.file", "changes": { "diff": "--- \n+++ \n@@ -100,9 +100,6 @@\n \"Features\": {\r\n \"DisabledFeatures\": [\r\n \r\n- \"{a18e545b-1321-4d4e-ac34-adc421c6e9c8}\",\r\n- \"{ca00ad68-1709-4abe-85e2-48dff6ccf8a2}\"\r\n-\r\n ]\r\n },\r\n \"LDAP\": {\r\n@@ -137,7 +134,7 @@\n \"Master\": {\r\n \"AccessControlForMasterEnabled\": \"true\",\r\n \r\n- \"AllowAddingHiddenLocations\": \"false\",\r\n+ \"AllowAddingHiddenLocations\": \"true\",\r\n \r\n \"AutoOpenComputerSelectPanel\": \"false\",\r\n \"AutoSelectCurrentLocation\": true,\r\n" }, "comment": "File C:\\Program Files\\Veyon\\veyon-config.json updated", "duration": 109.156, "name": "C:\\Program Files\\Veyon\\veyon-config.json", "result": true, "start_time": "13:19:47.940080" }, […]
Related issues
Associated revisions
fix(veyon): enabling feature is an empty list of “DisabledFeatures”
The configuration import do not changes settings not set in the
configuration file. We need to set the “DisabledFeatures” to an empty
list to enable the previously disabled features.
Ref: #31747
Update VERSION and CHANGELOG for 2.8.1
Ref: #31747
History
#1 Updated by Daniel Dehennin over 2 years ago
Je viens de faire un test avec l’infrastructure suivante :
etb1.amon-2.7.2-instance-default
etb1.scribe-2.8.0-instance-default
etb1.pceleve-10
- Intégrer le poste client et attendre son redémarrage
- Activer l’option de prise de contrôle
CreoleSet veyon_allow_adding_hidden_locations oui
- Tester l’application de la formula sur le poste client
root@scribe:~# salt '*' state.apply eole-workstation.veyon test=True PC-512962.dompedago.etb1.lan: ---------- ID: Add Veyon grains Function: grains.list_present Name: roles Result: True Comment: Value ['veyon/master', 'veyon/client'] is already in grain roles Started: 11:23:44.288634 Duration: 0.0 ms Changes: ---------- ID: Install Veyon software Function: pkg.installed Name: veyon Result: True Comment: All specified packages are already installed Started: 11:23:48.101163 Duration: 78.28 ms Changes: ---------- ID: Cleanup configuration file on error Function: file.absent Name: C:\Program Files\Veyon\veyon-config.json Result: True Comment: unless condition is true Started: 11:23:48.179443 Duration: 1327.87 ms Changes: ---------- ID: Download Veyon Configuration Function: file.managed Name: C:\Program Files\Veyon\veyon-config.json Result: None Comment: The file C:\Program Files\Veyon\veyon-config.json is set to be changed Note: No changes made, actual changes may be different due to other states. Started: 11:23:49.507313 Duration: 93.956 ms Changes: ---------- diff: --- +++ @@ -98,13 +98,6 @@ "UserGroupsBackend": "6f0a491e-c1c6-4338-8244-f823b0bf8670" }, - "Features": { - "DisabledFeatures": [ - "{a18e545b-1321-4d4e-ac34-adc421c6e9c8}", - "{ca00ad68-1709-4abe-85e2-48dff6ccf8a2}" - ] - }, - "LDAP": { "BaseDN": "dc=dompedago,dc=etb1,dc=lan", "BindDN": "cn=eole-workstation-reader,cn=Users,dc=dompedago,dc=etb1,dc=lan", @@ -137,7 +130,7 @@ "Master": { "AccessControlForMasterEnabled": "true", - "AllowAddingHiddenLocations": "false", + "AllowAddingHiddenLocations": "true", "AutoOpenComputerSelectPanel": "false", "AutoSelectCurrentLocation": true, ---------- ID: Import Veyon configuration Function: cmd.run Name: veyon-cli.exe config import veyon-config.json Result: None Comment: Command "veyon-cli.exe config import veyon-config.json" would have been executed Started: 11:23:49.601269 Duration: 0.0 ms Changes: ---------- ID: Set LDAP password Function: cmd.run Name: veyon-cli.exe config set LDAP/BindPassword %VEYON_PASSWORD% Result: True Comment: unless condition is true Started: 11:23:49.601269 Duration: 218.861 ms Changes: ---------- ID: Start Veyon service Function: service.running Name: VeyonService Result: True Comment: The service VeyonService is already running Started: 11:23:49.820130 Duration: 15.66 ms Changes: ---------- ID: Register Veyon service Function: cmd.run Name: veyon-cli.exe service register Result: True Comment: State was not run because onfail req did not change Started: 11:23:49.835790 Duration: 0.0 ms Changes: ---------- ID: Restart Veyon Service Function: cmd.run Name: veyon-cli.exe service restart Result: True Comment: State was not run because none of the onchanges reqs changed Started: 11:23:49.835790 Duration: 0.0 ms Changes: Summary for PC-512962.dompedago.etb1.lan ------------ Succeeded: 9 (unchanged=2, changed=1) Failed: 0 ------------ Total states run: 9 Total run time: 1.735 s
- Appliquer la formula
root@scribe:~# salt '*' state.apply eole-workstation.veyon PC-512962.dompedago.etb1.lan: ---------- ID: Add Veyon grains Function: grains.list_present Name: roles Result: True Comment: Value ['veyon/master', 'veyon/client'] is already in grain roles Started: 11:42:40.237939 Duration: 0.0 ms Changes: ---------- ID: Install Veyon software Function: pkg.installed Name: veyon Result: True Comment: All specified packages are already installed Started: 11:42:44.222365 Duration: 93.488 ms Changes: ---------- ID: Cleanup configuration file on error Function: file.absent Name: C:\Program Files\Veyon\veyon-config.json Result: True Comment: unless condition is true Started: 11:42:44.315853 Duration: 1297.186 ms Changes: ---------- ID: Download Veyon Configuration Function: file.managed Name: C:\Program Files\Veyon\veyon-config.json Result: True Comment: File C:\Program Files\Veyon\veyon-config.json updated Started: 11:42:45.613039 Duration: 93.472 ms Changes: ---------- diff: --- +++ @@ -98,13 +98,6 @@ "UserGroupsBackend": "6f0a491e-c1c6-4338-8244-f823b0bf8670" }, - "Features": { - "DisabledFeatures": [ - "{a18e545b-1321-4d4e-ac34-adc421c6e9c8}", - "{ca00ad68-1709-4abe-85e2-48dff6ccf8a2}" - ] - }, - "LDAP": { "BaseDN": "dc=dompedago,dc=etb1,dc=lan", "BindDN": "cn=eole-workstation-reader,cn=Users,dc=dompedago,dc=etb1,dc=lan", @@ -137,7 +130,7 @@ "Master": { "AccessControlForMasterEnabled": "true", - "AllowAddingHiddenLocations": "false", + "AllowAddingHiddenLocations": "true", "AutoOpenComputerSelectPanel": "false", "AutoSelectCurrentLocation": true, ---------- ID: Import Veyon configuration Function: cmd.run Name: veyon-cli.exe config import veyon-config.json Result: True Comment: Command "veyon-cli.exe config import veyon-config.json" run Started: 11:42:45.706511 Duration: 218.744 ms Changes: ---------- pid: 3356 retcode: 0 stderr: stdout: [OK] ---------- ID: Set LDAP password Function: cmd.run Name: veyon-cli.exe config set LDAP/BindPassword %VEYON_PASSWORD% Result: True Comment: unless condition is true Started: 11:42:45.925255 Duration: 218.83 ms Changes: ---------- ID: Start Veyon service Function: service.running Name: VeyonService Result: True Comment: The service VeyonService is already running Started: 11:42:46.144085 Duration: 15.664 ms Changes: ---------- ID: Register Veyon service Function: cmd.run Name: veyon-cli.exe service register Result: True Comment: State was not run because onfail req did not change Started: 11:42:46.159749 Duration: 0.0 ms Changes: ---------- ID: Restart Veyon Service Function: cmd.run Name: veyon-cli.exe service restart Result: True Comment: Command "veyon-cli.exe service restart" run Started: 11:42:46.159749 Duration: 6046.967 ms Changes: ---------- pid: 1924 retcode: 0 stderr: stdout: Arrêt du service VeyonService....................Démarrage du service VeyonService.........[OK] Summary for PC-512962.dompedago.etb1.lan ------------ Succeeded: 9 (changed=3) Failed: 0 ------------ Total states run: 9 Total run time: 7.984 s
Le soucis viens du fait que l’import de la configuration n’écrase que ce qui est défini dans le fichier de configuration.
J’ai modifié manuellement la configuration pour réactiver les deux fonctionnalités et sauvegardé la configuration, cela donne :
root@scribe:~# salt '*' file.read 'c:\\veyon.json' […] "Features": { "DisabledFeatures": [ ] }, […]
La solution est de définir la liste des fonctionnalités désactivées à vide :
diff --git a/eole-workstation/veyon/config/files/default/veyon-config.json b/eole-workstation/veyon/config/files/default/veyon-config.json
index c2866bb..fe30b0e 100644
--- a/eole-workstation/veyon/config/files/default/veyon-config.json
+++ b/eole-workstation/veyon/config/files/default/veyon-config.json
@@ -97,14 +97,14 @@
"DomainGroupsEnabled": "true",
"UserGroupsBackend": "6f0a491e-c1c6-4338-8244-f823b0bf8670"
},
-{% if not veyon.allow_adding_hidden_locations %}
"Features": {
"DisabledFeatures": [
+{% if not veyon.allow_adding_hidden_locations %}
"{a18e545b-1321-4d4e-ac34-adc421c6e9c8}",
"{ca00ad68-1709-4abe-85e2-48dff6ccf8a2}"
+{% endif %}
]
},
-{% endif %}
"LDAP": {
"BaseDN": "{{ veyon.ldap.base_dn }}",
"BindDN": "{{ veyon.ldap.username }}",
#2 Updated by Daniel Dehennin over 2 years ago
- Status changed from Nouveau to En cours
- Assigned To set to Daniel Dehennin
#3 Updated by Daniel Dehennin over 2 years ago
- Description updated (diff)
#4 Updated by Daniel Dehennin over 2 years ago
- Status changed from En cours to Résolu
- % Done changed from 0 to 100
#5 Updated by Daniel Dehennin over 2 years ago
- Related to Scénario #31419: Veyon doit pouvoir être configuré pour la prise de contrôle à distance added
#6 Updated by Daniel Dehennin over 2 years ago
Le paquet est disponible pour :
eole-2.8.0-proposed-updates
(journal mis à jour)eole-2.8-unstable
#7 Updated by Fabrice Barconnière over 2 years ago
- Description updated (diff)
#8 Updated by Fabrice Barconnière over 2 years ago
OK, ça marche
#9 Updated by Fabrice Barconnière over 2 years ago
- Status changed from Résolu to Fermé
- Remaining (hours) set to 0.0
#10 Updated by Fabrice Barconnière over 2 years ago
- Related to Tâche #31667: Ajouter l'option dans gen_config added