J’ai souvent, toute les 5 minutes, une erreur kernel sur deux serveurs mysql qui tourne avec ubuntu karmic 9.10.
May <span style="color: #000000;">27</span> <span style="color: #000000;">12</span>:<span style="color: #000000;">05</span>:<span style="color: #000000;">16</span> around-the-word-sql1 kernel: <span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #000000;">8464095.444564</span><span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #007800;">type=</span><span style="color: #000000;">1503</span> audit<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #000000;">1274954716.320</span>:<span style="color: #000000;">31928</span><span style="color: #7a0874; font-weight: bold;">)</span>: <span style="color: #007800;">operation=</span><span style="color: #ff0000;">"truncate"</span> <span style="color: #007800;">info=</span><span style="color: #ff0000;">"Failed name lookup - deleted entry"</span> <span style="color: #007800;">error=</span><span style="color: #000000;">-2</span> <span style="color: #007800;">pid=</span><span style="color: #000000;">3211</span> <span style="color: #007800;">parent=</span><span style="color: #000000;">8922</span> <span style="color: #007800;">profile=</span><span style="color: #ff0000;">"/usr/sbin/mysqld"</span> <span style="color: #007800;">requested_mask=</span><span style="color: #ff0000;">"w::"</span> <span style="color: #007800;">denied_mask=</span><span style="color: #ff0000;">"w::"</span> <span style="color: #007800;">fsuid=</span><span style="color: #000000;">109</span> <span style="color: #007800;">ouid=</span><span style="color: #000000;">109</span> <span style="color: #007800;">name=</span>2F746D702F6962384F4A4D336B202864656C6574656429
Après quelque recherche c’est visiblement un problème de kernel, un ticket est présent sur launchpad.net. Mon soucis c’est ces deux serveurs sont en 24/24 et je peux pas les rebooter.
J’ai constaté que Apparmor qui est en cause ne surveillait plus mysql sur ubuntu lucid 10.5. En outre le net était pleins de plainte sur le peu de souplesse d’Apparmor dans la surveillance du DataDir de mysql.
J’ai trouver la solution la doc ubuntu Debugging Apparmor.
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apparmor stop <span style="color: #000000; font-weight: bold;">*</span> Unloading AppArmor profiles ...<span style="color: #000000; font-weight: bold;">done</span>. <span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apparmor.d<span style="color: #000000; font-weight: bold;">/</span>disable<span style="color: #000000; font-weight: bold;">/</span>usr.sbin.mysqld apparmor_parser -R <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apparmor.d<span style="color: #000000; font-weight: bold;">/</span>usr.sbin.mysqld <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apparmor start <span style="color: #000000; font-weight: bold;">*</span> Starting AppArmor profiles Skipping profile <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apparmor.d<span style="color: #000000; font-weight: bold;">/</span>disable: usr.sbin.mysqld ...<span style="color: #000000; font-weight: bold;">done</span>.