Project

General

Profile

Tâche #28939

Scénario #28762: Générer une nouvelle image 2.7.1 incluant le support du raid logiciel

La formula SaltStack a toujours des erreurs sur les machines déjà intégrées au domaine avant l’installation du minion

Added by Daniel Dehennin 5 months ago. Updated 4 months ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
09/06/2019
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Remaining (hours):
0.0

Description

Lors d’une mise à niveau d’un Scribe AD 2.6.2 vers 2.7.1, les machines déjà intégrées génères des erreurs sur certains états de la formula :

PC-272684.dompedago.etb1.lan:
  file_|-Set a lock when computer is joined_|-C:\salt\var\ad-domain-joined.sem_|-managed:
    __run_num__: 3
    __sls__: eole-workstation.ad.join
    changes: {}
    comment: 'One or more requisite failed: eole-workstation.ad.join.Has JoinDomain
      registry, eole-workstation.ad.join.Has AvoidSpnSet registry'
    duration: 0.0
    result: false
    start_time: '14:38:29.878670'

  module_|-Has AvoidSpnSet registry_|-reg.key_exists_|-run:
    __id__: Has AvoidSpnSet registry
    __run_num__: 2
    __sls__: eole-workstation.ad.join
    changes:
      ret: false
    comment: Module function reg.key_exists executed
    duration: 156.078
    name: reg.key_exists
    result: false
    start_time: '14:38:29.722592'

  module_|-Has JoinDomain registry_|-reg.key_exists_|-run:
    __id__: Has JoinDomain registry
    __run_num__: 1
    __sls__: eole-workstation.ad.join
    changes:
      ret: false
    comment: Module function reg.key_exists executed
    duration: 15656.456
    name: reg.key_exists
    result: false
    start_time: '14:38:14.066136'

  system_|-Reboot after joining the domain_|-Reboot after joining the domain_|-reboot:
    __run_num__: 4
    __sls__: eole-workstation.ad.join
    changes: {}
    comment: 'One or more requisite failed: eole-workstation.ad.join.Has JoinDomain
      registry, eole-workstation.ad.join.Has AvoidSpnSet registry'
    duration: 0.0
    result: false
    start_time: '14:38:29.878670'

La création du verrou ne doit pas dépendre de la détection de jonction au domaine AD par la formula mais par un état distinct de suis-je joint à un domaine ?

Pour valider

  1. Déployer un etb1.amon 2.7.1
  2. Dépolyer un etb1.scribe 2.7.1
  3. Dépolyer un etb1.pcprofs-10
  4. Intégrer manuellement le poste prof au domaine Active Directory

Après le redémarrage :

  • le minion SaltStack doit être installé automatiquement par la GPO (inchangé par rapport à avant)
  • une fois la clef publique du minion acceptée sur le scribe, le poste client ne doit pas redémarrer (inchangé par rapport à avant)
  • vérifiez l’application de la formula de jonction au domaine avec la commande suivante a exécuter depuis le Scribe :
    salt '*' state.apply eole-workstation.ad.join
    

Vous devez obtenir le résultat Succeeded: 7 (changed=1)

Associated revisions

Revision 93ad6a72 (diff)
Added by Daniel Dehennin 5 months ago

AD join: Avoid failing states when the computer is already joined

When a computer is joined to the domain before the SaltStack minion is
installed, then the “Has JoinDomain registry” and “Has AvoidSpnSet
registry” are failing because the joined lock file is not created and
will never be created.

The solution proposed by this commit will create the lock on first run
and then everything will be OK.

  • eole-workstation/ad/join.sls: make the difference between “the system
    is joined by the formula” and “the system is already joined”.
    The lock depends on “Is system joined to domain” to catch the
    “already joined” case.

History

#1 Updated by Daniel Dehennin 5 months ago

  • Status changed from Nouveau to En cours
  • Assigned To set to Daniel Dehennin

#2 Updated by Daniel Dehennin 5 months ago

  • Description updated (diff)

#3 Updated by Daniel Dehennin 5 months ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.0 to 0.5

#4 Updated by Fabrice Barconnière 4 months ago

  • Description updated (diff)
  • Remaining (hours) changed from 0.5 to 0.0

#5 Updated by Fabrice Barconnière 4 months ago

  • Status changed from Résolu to En cours
  • % Done changed from 100 to 90
root@scribe:~# salt-key --list-all
Accepted Keys:
pc10-1.dompedago.etb1.lan
Denied Keys:
Unaccepted Keys:
Rejected Keys:
root@scribe:~# salt '*' state.apply eole-workstation.ad.join
pc10-1.dompedago.etb1.lan:
    Data failed to compile:
----------
    The function "state.highstate" is running as PID 2808 and was started at  with jid req
ERROR: Minions returned with non-zero exit code

#6 Updated by Fabrice Barconnière 4 months ago

  • Status changed from En cours to Résolu
  • % Done changed from 90 to 100

Il suffit d'être patient :

Summary for pc10-1.dompedago.etb1.lan
------------
Succeeded: 7 (changed=1)
Failed:    0
------------
Total states run:     7
Total run time:  16.110 s

#7 Updated by Fabrice Barconnière 4 months ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF