Projet

Général

Profil

Anomalie #8403

startlevel et stoplevel ne fonctionne pas

Ajouté par Emmanuel GARETTE il y a presque 10 ans. Mis à jour il y a presque 10 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Début:
30/06/2014
Echéance:
04/07/2014
% réalisé:

100%

Temps estimé:
8.00 h
Temps passé:
Distribution:
EOLE 2.4

Description

Il y a un problème avec les stoplevel et startlevel, ils ne sont pas appliqués :

02_advanced_network.xml:        <service startlevel='90' stoplevel='19' pty='False'>bastion</service>
# ls /etc/rc*.d/*bastion*
/etc/rc0.d/K20bastion  /etc/rc2.d/S20bastion  /etc/rc4.d/S20bastion  /etc/rc6.d/K20bastion
/etc/rc1.d/K20bastion  /etc/rc3.d/S20bastion  /etc/rc5.d/S20bastion

En 2.3 cela fonctionné de la manière suivante :

- la méthode et le pty correspond à la valeur du dernier service chargé ;
- startlevel et stoplevel c'est l'inverse, le premier service à raison.


Demandes liées

Lié à creole - Anomalie #8469: Mauvaise gestion des doublons par groupe de conteneurs Fermé 26/06/2014 04/07/2014
Lié à creole - Anomalie #8515: L’inventaire par groupe ne conserve par l’ordre de déclaration Fermé 01/07/2014 04/07/2014

Révisions associées

Révision 1fdefdc6 (diff)
Ajouté par Daniel Dehennin il y a presque 10 ans

Gestion des services par groupes de conteneurs

La gestion des services doit se fait en 3 étapes :

1. Vérification de la validité de l’action

2. Vérification de la validité des noms de services

3. Application de l’action par groupe de conteneur

  • pyeole/service/__init__.py (manage_services): Factorisation du code
    selon les étapes ci-dessus, l’action « configure » n’est plus un cas à
    part.
    Utilisation des informations de groupes de conteneurs, cela évite
    d’avoir à gérer les doublons dans les services.
    (_manage_service): Suppression des paramètres non utilisés.

Fixes: #8403 @2h

Historique

#1 Mis à jour par Daniel Dehennin il y a presque 10 ans

  • Echéance mis à 04/07/2014
  • Assigné à mis à Daniel Dehennin
  • Version cible mis à Eole 2.4.0.1
  • Début mis à 30/06/2014
  • Temps estimé mis à 3.00 h

#2 Mis à jour par Daniel Dehennin il y a presque 10 ans

  • Temps estimé changé de 3.00 h à 8.00 h

#3 Mis à jour par Daniel Dehennin il y a presque 10 ans

  • Projet changé de eole-common à python-pyeole
  • Statut changé de Nouveau à Accepté

C’est un problème de python-pyeole.

#4 Mis à jour par Daniel Dehennin il y a presque 10 ans

  • Statut changé de Accepté à Résolu
  • % réalisé changé de 0 à 100

#5 Mis à jour par Daniel Dehennin il y a presque 10 ans

Testé sur un amon avec la configuration fournie dans #8469 :

root@amon:~# CreoleGet activer_clam
oui

root@amon:~# CreoleService clamav-daemon configure
Enable System V service clamav-daemon

root@amon:~# CreoleService clamav-daemon start
Start System V service clamav-daemon               [  OK  ]

root@amon:~# CreoleService clamav-daemon stop
Stop System V service clamav-daemon                [  OK  ]

root@amon:~# CreoleService clamav-daemon restart
Stop System V service clamav-daemon                [  OK  ]
Start System V service clamav-daemon               [  OK  ]

root@amon:~# CreoleService clamav-daemon disable
root - cannot enable, disable directly use configure instead

root@amon:~# CreoleService -f clamav-daemon disable
Disable System V service clamav-daemon

root@amon:~# CreoleService clamav-daemon enable
root - cannot enable, disable directly use configure instead

root@amon:~# CreoleService -f clamav-daemon enable
Enable System V service clamav-daemon

root@amon:~# CreoleService clamav-daemon configure
Enable System V service clamav-daemon

root@amon:~# CreoleSet activer_clam non
root@amon:~# CreoleGet activer_clam
non

root@amon:~# CreoleService clamav-daemon configure
Disable System V service clamav-daemon

root@amon:~# CreoleService clamav-daemon start
root - cannot start disabled service

root@amon:~# CreoleService -f clamav-daemon start
Start System V service clamav-daemon               [  OK  ]

root@amon:~# CreoleService clamav-daemon stop
Stop System V service clamav-daemon                [  OK  ]

root@amon:~# CreoleService clamav-daemon restart
root - cannot start disabled service

root@amon:~# CreoleService -f clamav-daemon restart
Restart System V service clamav-daemon
Stop System V service clamav-daemon                [  OK  ]
Start System V service clamav-daemon               [  OK  ]

root@amon:~# CreoleService clamav-daemon enable
root - cannot enable, disable directly use configure instead

root@amon:~# CreoleService -f clamav-daemon enable
Enable System V service clamav-daemon

root@amon:~# CreoleService clamav-daemon disable
root - cannot enable, disable directly use configure instead

root@amon:~# CreoleService -f clamav-daemon disable
Disable System V service clamav-daemon

root@amon:~# CreoleService -f clamav-daemon start

root@amon:~# CreoleService clamav-daemon stop
root@amon:~# CreoleService clamav-daemon configure

#6 Mis à jour par Daniel Dehennin il y a presque 10 ans

Test spécifique à bastion:

root@amon:~# CreoleService --debug bastion configure
pyeole.service - Run configure for bastion
pyeole.service.launcher - Check System V service bastion
pyeole.service.launcher - Configure System V service bastion
Enable System V service bastion
pyeole.service.module.service - Enabling System V service requires a cleaned place
pyeole.service.module.service - Removing runlevel /etc/rc2.d/S90bastion start link 2
pyeole.service.module.service - Removing runlevel /etc/rc3.d/S90bastion start link 3
pyeole.service.module.service - Removing runlevel /etc/rc4.d/S90bastion start link 4
pyeole.service.module.service - Removing runlevel /etc/rc5.d/S90bastion start link 5
pyeole.service.module.service - Removing runlevel /etc/rc0.d/K19bastion stop link 0
pyeole.service.module.service - Removing runlevel /etc/rc1.d/K19bastion stop link 1
pyeole.service.module.service - Removing runlevel /etc/rc6.d/K19bastion stop link 6
pyeole.service.module.service - Creating runlevel 2 start link /etc/rc2.d/S90bastion => ../init.d/bastion
pyeole.service.module.service - Creating runlevel 3 start link /etc/rc3.d/S90bastion => ../init.d/bastion
pyeole.service.module.service - Creating runlevel 4 start link /etc/rc4.d/S90bastion => ../init.d/bastion
pyeole.service.module.service - Creating runlevel 5 start link /etc/rc5.d/S90bastion => ../init.d/bastion
pyeole.service.module.service - Creating runlevel 0 stop link /etc/rc0.d/K19bastion => ../init.d/bastion
pyeole.service.module.service - Creating runlevel 1 stop link /etc/rc1.d/K19bastion => ../init.d/bastion
pyeole.service.module.service - Creating runlevel 6 stop link /etc/rc6.d/K19bastion => ../init.d/bastion
root@amon:~# ls -l /etc/rc*.d/*bastion*
lrwxrwxrwx 1 root root 17 juin  30 17:37 /etc/rc0.d/K19bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root 17 juin  30 17:37 /etc/rc1.d/K19bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root 17 juin  30 17:37 /etc/rc2.d/S90bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root 17 juin  30 17:37 /etc/rc3.d/S90bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root 17 juin  30 17:37 /etc/rc4.d/S90bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root 17 juin  30 17:37 /etc/rc5.d/S90bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root 17 juin  30 17:37 /etc/rc6.d/K19bastion -> ../init.d/bastion

#7 Mis à jour par Emmanuel GARETTE il y a presque 10 ans

  • Statut changé de Résolu à À valider

L'ordre des services au démarrage n'est plus bon :

Avant mise à jour :

Start network service networking                                                                                                                      [  OK  ]
Start Upstart service cron                                                                                                                            [  OK  ]
Start System V service rng-tools                                                                                                                      [  OK  ]
Start System V service ntp                                                                                                                            [  OK  ]
Start System V service bacula-director                                                                                                                [  OK  ]
Start System V service bacula-fd                                                                                                                      [  OK  ]
Start System V service bacula-sd                                                                                                                      [  OK  ]
Start System V service z_stats                                                                                                                        [  OK  ]
Start System V service bind9                                                                                                                          [  OK  ]
Start System V service ead-server                                                                                                                     [  OK  ]
Start System V service ead-web                                                                                                                        [  OK  ]
Start System V service squid3                                                                                                                         [  OK  ]
Start System V service dansguardian                                                                                                                   [  OK  ]
Start System V service exim4                                                                                                                          [  OK  ]
Start System V service eoleflask                                                                                                                      [  OK  ]
Start System V service nginx                                                                                                                          [  OK  ]
Start System V service bastion                                                                                                                        [  OK  ]

Après mise à jour :

Start System V service exim4                                                                                                                          [  OK  ]
Start network service networking                                                                                                                      [  OK  ]
Start Upstart service cron                                                                                                                            [  OK  ]
Start System V service rng-tools                                                                                                                      [  OK  ]
Start System V service ntp                                                                                                                            [  OK  ]
Start System V service bacula-director                                                                                                                [  OK  ]
Start System V service bacula-fd                                                                                                                      [  OK  ]
Start System V service bacula-sd                                                                                                                      [  OK  ]
Start System V service z_stats                                                                                                                        [  OK  ]
Start System V service ead-server                                                                                                                     [  OK  ]
Start System V service ead-web                                                                                                                        [  OK  ]
Start System V service eoleflask                                                                                                                      [  OK  ]
Start System V service nginx                                                                                                                          [  OK  ]
Start System V service bastion                                                                                                                        [  OK  ]
Start System V service bind9                                                                                                                          [  OK  ]
Start System V service squid3                                                                                                                         [  OK  ]
Start System V service dansguardian                                                                                                                   [  OK  ]

De plus le ligne suivante sont réapparus au reconfigure :

Disable System V service clamav-daemon
Enable System V service exim4
Enable network service networking

#8 Mis à jour par Emmanuel GARETTE il y a presque 10 ans

  • % réalisé changé de 100 à 80

#9 Mis à jour par Daniel Dehennin il y a presque 10 ans

Emmanuel GARETTE a écrit :

L'ordre des services au démarrage n'est plus bon :

Cela est dû à la façon dont les informations sur les groupes de conteneurs sont agrégées dans CreoleClient.get_group_infos().

#10 Mis à jour par Daniel Dehennin il y a presque 10 ans

  • Statut changé de À valider à Résolu
  • % réalisé changé de 80 à 100

L’ordre des services est corrigé par #8515.

L’affichage de la configuration des services est voulue par le reconfigure creole:source:creole/reconfigure.py@57b2031#L423.

#11 Mis à jour par Fabrice Barconnière il y a presque 10 ans

Vérification sur Amon :

L'ordre des arrêts n'est pas respecté mais ce n'est certainement pas important.

ls -l /etc/rc0.d/
total 4
lrwxrwxrwx 1 root root  20 juil.  3 08:52 K18freeradius -> ../init.d/freeradius
lrwxrwxrwx 1 root root  17 juil.  3 08:52 K19bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root  17 févr.  6 16:39 K20creoled -> ../init.d/creoled
lrwxrwxrwx 1 root root  22 juil.  3 08:52 K20dansguardian -> ../init.d/dansguardian
lrwxrwxrwx 1 root root  20 juil.  3 08:52 K20ead-server -> ../init.d/ead-server
lrwxrwxrwx 1 root root  17 juil.  3 08:52 K20ead-web -> ../init.d/ead-web
lrwxrwxrwx 1 root root  19 juil.  3 08:52 K20eoleflask -> ../init.d/eoleflask
lrwxrwxrwx 1 root root  18 juil.  3 08:52 K20eole-sso -> ../init.d/eole-sso
lrwxrwxrwx 1 root root  15 juil.  3 08:52 K20exim4 -> ../init.d/exim4
lrwxrwxrwx 1 root root  13 avril  3 10:12 K20gpm -> ../init.d/gpm
lrwxrwxrwx 1 root root  18 févr.  6 16:39 K20gunicorn -> ../init.d/gunicorn
lrwxrwxrwx 1 root root  15 juil.  3 08:52 K20nginx -> ../init.d/nginx
lrwxrwxrwx 1 root root  13 juil.  3 08:52 K20ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root  23 févr.  6 16:40 K20openbsd-inetd -> ../init.d/openbsd-inetd
lrwxrwxrwx 1 root root  16 févr.  6 16:39 K20vnstat -> ../init.d/vnstat
lrwxrwxrwx 1 root root  17 juil.  3 08:52 K20z_stats -> ../init.d/z_stats
lrwxrwxrwx 1 root root  19 juil.  3 08:52 K21rng-tools -> ../init.d/rng-tools
lrwxrwxrwx 1 root root  16 juil.  3 08:52 K30squid3 -> ../init.d/squid3
lrwxrwxrwx 1 root root  17 févr.  6 16:39 K80qoseole -> ../init.d/qoseole
lrwxrwxrwx 1 root root  15 mai   14 11:55 K84ipsec -> ../init.d/ipsec
lrwxrwxrwx 1 root root  15 juil.  3 08:52 K85bind9 -> ../init.d/bind9
-rw-r--r-- 1 root root 353 juil. 26  2012 README
lrwxrwxrwx 1 root root  18 févr.  6 16:34 S20sendsigs -> ../init.d/sendsigs
lrwxrwxrwx 1 root root  17 févr.  6 16:34 S30urandom -> ../init.d/urandom
lrwxrwxrwx 1 root root  22 févr.  6 16:34 S31umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root  20 févr.  6 16:34 S35networking -> ../init.d/networking
lrwxrwxrwx 1 root root  18 févr.  6 16:34 S40umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root  20 févr.  6 16:34 S60umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root  14 févr.  6 16:34 S90halt -> ../init.d/halt

-------------------------------------------------------------------------------------------------------
                                          Arrêt des services                                           
-------------------------------------------------------------------------------------------------------
Stop System V service bastion                                                                  [  OK  ]
Stop System V service cntlm                                                                    [  OK  ]
Stop System V service nginx                                                                    [  OK  ]
Stop System V service eoleapps                                                                 [  OK  ]
Stop System V service eoleflask                                                                [  OK  ]
Stop System V service exim4                                                                    [  OK  ]
Stop System V service freeradius                                                               [  OK  ]
Stop System V service krb5-kdc                                                                 [  OK  ]
Stop System V service krb5-admin-server                                                        [  OK  ]
Stop System V service winbind                                                                  [  OK  ]
Stop Upstart service nmbd                                                                      [  OK  ]
Stop Upstart service smbd                                                                      [  OK  ]
Stop System V service clamav-daemon                                                            [  OK  ]
Stop System V service dansguardian                                                             [  OK  ]
Stop System V service squid3-2                                                                 [  OK  ]
Stop System V service squid3                                                                   [  OK  ]
Stop System V service ead-web                                                                  [  OK  ]
Stop System V service ead-server                                                               [  OK  ]
Stop System V service bind9                                                                    [  OK  ]
Stop System V service eole-sso                                                                 [  OK  ]
Stop System V service z_stats                                                                  [  OK  ]
Stop System V service nut                                                                      [  OK  ]
Stop Upstart service isc-dhcp-relay                                                            [  OK  ]
Stop System V service clamav-freshclam                                                         [  OK  ]
Stop System V service ntp                                                                      [  OK  ]
Stop System V service rng-tools                                                                [  OK  ]
Stop Upstart service cron                                                                      [  OK  ]

Ça semble OK pour le lancement des services.
Je l'avais remarqué sur un Sphynx, il reste sur Amon aussi les service ipsec qui aurait du être supprimé en post installation de eole-vpn (#8535)

ls -l /etc/rc2.d/
total 4
-rw-r--r-- 1 root root 677 juil. 26  2012 README
lrwxrwxrwx 1 root root  15 juil.  3 08:52 S15bind9 -> ../init.d/bind9
lrwxrwxrwx 1 root root  15 mai   14 11:55 S16ipsec -> ../init.d/ipsec
lrwxrwxrwx 1 root root  19 juil.  3 08:52 S19rng-tools -> ../init.d/rng-tools
lrwxrwxrwx 1 root root  17 févr.  6 16:39 S20creoled -> ../init.d/creoled
lrwxrwxrwx 1 root root  22 juil.  3 08:52 S20dansguardian -> ../init.d/dansguardian
lrwxrwxrwx 1 root root  20 juil.  3 08:52 S20ead-server -> ../init.d/ead-server
lrwxrwxrwx 1 root root  17 juil.  3 08:52 S20ead-web -> ../init.d/ead-web
lrwxrwxrwx 1 root root  19 juil.  3 08:52 S20eoleflask -> ../init.d/eoleflask
lrwxrwxrwx 1 root root  18 juil.  3 08:52 S20eole-sso -> ../init.d/eole-sso
lrwxrwxrwx 1 root root  15 juil.  3 08:52 S20exim4 -> ../init.d/exim4
lrwxrwxrwx 1 root root  13 avril  3 10:12 S20gpm -> ../init.d/gpm
lrwxrwxrwx 1 root root  18 févr.  6 16:39 S20gunicorn -> ../init.d/gunicorn
lrwxrwxrwx 1 root root  15 juil.  3 08:52 S20nginx -> ../init.d/nginx
lrwxrwxrwx 1 root root  13 juil.  3 08:52 S20ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root  23 févr.  6 16:40 S20openbsd-inetd -> ../init.d/openbsd-inetd
lrwxrwxrwx 1 root root  16 févr.  6 16:39 S20vnstat -> ../init.d/vnstat
lrwxrwxrwx 1 root root  17 juil.  3 08:52 S20z_stats -> ../init.d/z_stats
lrwxrwxrwx 1 root root  20 juil.  3 08:52 S22freeradius -> ../init.d/freeradius
lrwxrwxrwx 1 root root  16 juil.  3 08:52 S30squid3 -> ../init.d/squid3
lrwxrwxrwx 1 root root  15 févr.  6 16:36 S50rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root  19 févr.  6 16:36 S70dns-clean -> ../init.d/dns-clean
lrwxrwxrwx 1 root root  18 févr.  6 16:36 S70pppd-dns -> ../init.d/pppd-dns
lrwxrwxrwx 1 root root  14 mars  19 11:43 S75sudo -> ../init.d/sudo
lrwxrwxrwx 1 root root  17 juil.  3 08:52 S90bastion -> ../init.d/bastion
lrwxrwxrwx 1 root root  21 févr.  6 16:40 S99grub-common -> ../init.d/grub-common
lrwxrwxrwx 1 root root  18 févr.  6 16:34 S99ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root  18 févr.  6 16:34 S99rc.local -> ../init.d/rc.local

-------------------------------------------------------------------------------------------------------
                                        Démarrage des services                                         
-------------------------------------------------------------------------------------------------------
Start network service networking                                                               [  OK  ]
Start Upstart service cron                                                                     [  OK  ]
Start System V service rng-tools                                                               [  OK  ]
Start System V service ntp                                                                     [  OK  ]
Start System V service z_stats                                                                 [  OK  ]
Start System V service eole-sso                                                                [  OK  ]
Start System V service bind9                                                                   [  OK  ]
Start System V service ead-server                                                              [  OK  ]
Start System V service ead-web                                                                 [  OK  ]
Start System V service squid3                                                                  [  OK  ]
Start System V service dansguardian                                                            [  OK  ]
Start System V service freeradius                                                              [  OK  ]
Start System V service exim4                                                                   [  OK  ]
Start System V service eoleflask                                                               [  OK  ]
Start System V service nginx                                                                   [  OK  ]
Start System V service bastion                                                                 [  OK  ]

#12 Mis à jour par Fabrice Barconnière il y a presque 10 ans

  • Statut changé de Résolu à Fermé

Formats disponibles : Atom PDF