Projet

Général

Profil

Eole23 with kernel 3 » Historique » Version 9

Daniel Dehennin, 29/03/2012 10:26
Conflit de fichier pour LXC

1 8 Daniel Dehennin
{{toc}}
2 8 Daniel Dehennin
3 1 Daniel Dehennin
h1. Kernel 3.0 sur un module EOLE 2.3
4 1 Daniel Dehennin
5 6 Daniel Dehennin
*Étude du passage à un noyau Ubuntu LTS backport*
6 6 Daniel Dehennin
7 7 Daniel Dehennin
L’idée est d’éviter de compiler un kernel spécifique EOLE, nécessitant la recompilation des outils comme iptables du fait du changement de l’"ABI":http://fr.wikipedia.org/wiki/Application_binary_interface du noyau.
8 7 Daniel Dehennin
9 7 Daniel Dehennin
Nous devons cependant concerver un certains nombre de fonctionnalités :
10 7 Daniel Dehennin
* La gestion des conteneurs "LXC (en)":http://en.wikipedia.org/wiki/LXC
11 7 Daniel Dehennin
* Les extensions "ipset (en)":http://en.wikipedia.org/wiki/Netfilter#ipset
12 7 Daniel Dehennin
* Le filtrage du "P2P":http://fr.wikipedia.org/wiki/P2P
13 7 Daniel Dehennin
14 1 Daniel Dehennin
h2. Installation
15 1 Daniel Dehennin
16 2 Daniel Dehennin
Un noyau _backport_ est disponible sur _Lucid_:
17 2 Daniel Dehennin
18 2 Daniel Dehennin
<pre>
19 2 Daniel Dehennin
root@eole:~# apt-get install linux-image-generic-lts-backport-oneiric
20 2 Daniel Dehennin
</pre>
21 2 Daniel Dehennin
22 1 Daniel Dehennin
h3. Adaptations
23 2 Daniel Dehennin
24 2 Daniel Dehennin
Il est nécessaire d’effectuer quelques adaptation afin de démarrer un noyau 3.0.
25 2 Daniel Dehennin
26 2 Daniel Dehennin
h4. Démarrage par défaut sur le noyau 3.0
27 2 Daniel Dehennin
28 2 Daniel Dehennin
La séléction du noyau se fait lors d’une mise à jour de grub, par défaut, uniquement les noyaux se finissant par @-eole@ sont pris en compte.
29 2 Daniel Dehennin
30 2 Daniel Dehennin
On modifie l’"expression rationnelle":http://fr.wikipedia.org/wiki/Expression_rationnelle sélectionnant le noyau par défaut:
31 2 Daniel Dehennin
<pre>
32 2 Daniel Dehennin
root@eole:~# sed -ie "s/\(EOLE_GRUB_REGEX='.\*\)-eole'/\1'/" /etc/default/grub
33 2 Daniel Dehennin
</pre>
34 2 Daniel Dehennin
35 2 Daniel Dehennin
h4. Iptables
36 2 Daniel Dehennin
37 2 Daniel Dehennin
EOLE recompile iptables du fait du patch modifiant l’"ABI":http://fr.wikipedia.org/wiki/Application_binary_interface du noyau.
38 2 Daniel Dehennin
39 2 Daniel Dehennin
L’utilisation d’un noyau standard nécessite l’installation de la version Ubuntu d’iptables
40 2 Daniel Dehennin
41 2 Daniel Dehennin
<pre>
42 2 Daniel Dehennin
root@eole:~# apt-get install iptables=1.4.4-2ubuntu2
43 2 Daniel Dehennin
</pre>
44 2 Daniel Dehennin
45 2 Daniel Dehennin
Attention, une mise à jour réinstallera la version EOLE, durant les tests, il faut garder la version Ubuntu:
46 2 Daniel Dehennin
47 2 Daniel Dehennin
<pre>
48 2 Daniel Dehennin
root@eole:~# echo "iptables hold" | dpkg --set-selections
49 2 Daniel Dehennin
</pre>
50 2 Daniel Dehennin
51 2 Daniel Dehennin
h4. Conteneurs
52 2 Daniel Dehennin
53 2 Daniel Dehennin
La version des outils _LXC_ sur _Lucid_ ne fonctionnent pas avec un noyau 3.0.
54 2 Daniel Dehennin
55 2 Daniel Dehennin
Il faut donc installer une version _backport_:
56 2 Daniel Dehennin
<pre>
57 2 Daniel Dehennin
root@eole:~# apt-get install python-software-properties
58 2 Daniel Dehennin
root@eole:~# add-apt-repository ppa:serge-hallyn/lxc-backport
59 2 Daniel Dehennin
root@eole:~# apt-get update
60 2 Daniel Dehennin
root@eole:~# apt-get install lxc=0.7.4-0ubuntu1.1
61 2 Daniel Dehennin
root@eole:~# echo "lxc hold" | dpkg --set-selections
62 2 Daniel Dehennin
</pre>
63 2 Daniel Dehennin
64 9 Daniel Dehennin
Le problème est que le script d’init @/etc/init.d/lxc@ est fourni par les paquets @eole-conteneurs@ et @lxc@
65 9 Daniel Dehennin
66 2 Daniel Dehennin
h4. Filtrage p2p
67 2 Daniel Dehennin
68 2 Daniel Dehennin
L7 filter nécessite un patch noyau qui change l’"ABI":http://fr.wikipedia.org/wiki/Application_binary_interface du noyau.
69 2 Daniel Dehennin
70 2 Daniel Dehennin
Il est possible d’utiliser le module @ipp2p@ de "xtables-addons":http://xtables-addons.sourceforge.net/
71 2 Daniel Dehennin
72 2 Daniel Dehennin
Il faut une version de xtables-addons fonctionnant sur noyau 3.0
73 2 Daniel Dehennin
74 2 Daniel Dehennin
<pre>
75 2 Daniel Dehennin
root@eole:~# bzr branch lp:ubuntu/oneiric/xtables-addons
76 2 Daniel Dehennin
root@eole:~# cd xtables-addons && dpkg-buildpackage
77 2 Daniel Dehennin
</pre>
78 3 Daniel Dehennin
79 3 Daniel Dehennin
h4. ipset
80 3 Daniel Dehennin
81 5 Daniel Dehennin
Une mise à jour d’ipset viendra avec "@xtables-addons-common@":https://launchpad.net/ubuntu/+source/xtables-addons/1.35-1
82 3 Daniel Dehennin
83 3 Daniel Dehennin
<pre>
84 3 Daniel Dehennin
root@amonecole:~# ipset -L
85 3 Daniel Dehennin
ipset v4.1: Kernel ip_set module is of protocol version 6.I'm of protocol version 4.
86 3 Daniel Dehennin
Please upgrade your kernel and/or ipset(8) utillity.
87 3 Daniel Dehennin
</pre>