[rudder-users] Mettre à jours tous les packages

Nicolas Charles nicolas.charles at normation.com
Fri Aug 21 17:58:32 CEST 2015


Hello,

I'm adding back the mailing list in CC

There is no easy way to display on the main page if nodes need upgrade 
or not, because it's not really the "Rudder-way".

In Rudder, you define Rules which define a state (package is installed, 
service is running, user is there with specific password, specific ssh 
key, and so on)
Rudder will automatically try to fix any non-conformity (we are 
implementing a check-only mode, to check without correcting), and 
reports on the compliance of the rules (rules is successfully applied, 
or Rudder needed to repair something, or Rudder failed to repair 
something).


If you want to know if updates are available, you could create your own 
technique (with the Technique editor) that would execute the following 
command
/bin/sh -c '! /usr/bin/apt-get -s upgrade | /bin/grep -q Inst'

It would simulate an upgrade, and check if any lines match the "Inst" 
output, if so, return exit code of 1 (considered an error), else exit 
code 0

Then, you'll need to create a Directive based on this Technique, and 
create a Rule (or modify a Rule) to apply this directive)
You'll have error reports from node which don't have packages up to date

Nicolas


Le 21/08/2015 14:52, Anak So a écrit :
> Hello,
>
> Thank you for replying so quickly,
>
> It's work Thank you ! But i had one more question, i would like to 
> know if it's possible to have a display on the main page who shows if 
> my nodes need to be upgrade or not.
>
>
> Best regards,
>
> ------------------------------------------------------------------------
> Date: Fri, 21 Aug 2015 09:35:55 +0200
> From: nicolas.charles at normation.com
> To: anak27 at outlook.fr; rudder-users at lists.rudder-project.org
> Subject: Re: [rudder-users] Mettre à jours tous les packages
>
> Hello,
>
> This is an english speaking mailing list, so I'll answer in english 
> (with the french version below)
> You are trying to upgrade automatically all packages with the 
> Technique Package management for Debian/Ubuntu/APT systems. However, 
> this technique is made to upgrade only package per package.
> You tried with Job scheduler to execute "apt-get upgrade", but it also 
> failed.
> When using Job scheduler to execute a command, you should give it the 
> full path to the binary, so the command would need to be 
> /usr/bin/apt-get upgrade
> This would however still fail, as apt-get upgrade needs a user input...
>
> To prevent apt from asking questions, environnement and options need 
> to be configured. The command would need to be
> "/usr/bin/env DEBIAN_FRONTEND=noninteractive LC_ALL=C /usr/bin/apt-get 
> -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef 
> -o APT::Get::AutomaticRemove=false --yes upgrade"
> (don't put the " " in the field)
>
> Does that fix your issue ?
>
> -------
> French version
>
> Bonjour,
>
> Cette mailing liste est une mailing liste en langue anglaise, donc la 
> réponse principale est en anglais (avec la traduction ici)
>
> La Technique Package management for Debian / Ubuntu / APT systems est 
> conçue pour gérer les paquets individuellement, elle ne pourra donc 
> pas mettre à jour tous les paquets directement
>
> La technique Job Scheduler execute des commandes, en necessitant le 
> chemin complet vers le binaire, la commande à executer serait donc "
> /usr/bin/apt-get upgrade"
> Mais cela ne fonctionnera pas, car apt-get upgrade a besoin par défaut 
> d'une confirmation dans un terminal.
>
> Il faut donc définir les parametres et options d'apt pour executer 
> l'upgrade en non interactif, et la commande sera alors
>
> "/usr/bin/env DEBIAN_FRONTEND=noninteractive LC_ALL=C /usr/bin/apt-get 
> -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef 
> -o APT::Get::AutomaticRemove=false --yes upgrade"
> (sans saisir les " " dans le champ)
>
> Est ce que cela corrige le problème ?
>
> Cordialement
> Nicolas
>
> Le 20/08/2015 15:46, Anak So a écrit :
>
>     Bonjour,
>
>     J'ai récemment installé Rudder afin d'automatiser les mise à jours
>     de plusieurs VM Ubuntu mais je ne parviens pas à savoir comment
>     cela se configure, car suite à plusieurs recherche j'ai constaté
>     qu'il existait une directive appelée Package management for Debian
>     / Ubuntu / APT systems mais qui ne met à jour qu'un type de
>     package. Existe t-il un moyen pour mettre à jour tous les packages
>      ? Si oui comment ?
>
>     De plus j'ai aussi essayé de configurer la directive Job
>     scheduler, en y ajoutant comme commande "apt-get upgrade"
>     en espérant que cela lance la commande automatiquement mais cela
>     reste un échec.
>
>     Merci,
>
>
>
>
>
>     _______________________________________________
>     rudder-users mailing list
>     rudder-users at lists.rudder-project.org  <mailto:rudder-users at lists.rudder-project.org>
>     http://www.rudder-project.org/mailman/listinfo/rudder-users
>
>
>
> -- 
> Nicolas CHARLES


-- 
Nicolas CHARLES

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20150821/f2372c72/attachment.html>


More information about the rudder-users mailing list