Schlagwort-Archiv: Gentoo

adlerweb // BitBastelei 2026-04-23 11:04:15

Falls ihr das "dist"-Modul oder nutzt und bei plötzlich für distribution/ansible_distribution/… falsche Werte erhaltet (z.B. ClearLinux):

Gentoo quotet in os_release (/usr/lib/os-release) ihre Variablen offenbar seit irgend nem Update mit Single-Quote ('). Pythons distro-Modul mag das nicht, normal ist ohne quoting oder selten mal double quote (").

Entweder wollt ihr dem Python-Modul einen Patch spendieren oder als Workaround das Quoting in os-release auf double editieren.

adlerweb // BitBastelei 2026-04-23 11:04:15

Falls ihr das "dist"-Modul oder nutzt und bei plötzlich für distribution/ansible_distribution/… falsche Werte erhaltet (z.B. ClearLinux):

Gentoo quotet in os_release (/usr/lib/os-release) ihre Variablen offenbar seit irgend nem Update mit Single-Quote ('). Pythons distro-Modul mag das nicht, normal ist ohne quoting oder selten mal double quote (").

Entweder wollt ihr dem Python-Modul einen Patch spendieren oder als Workaround das Quoting in os-release auf double editieren.

[Gentoo] Apache 2.4.26 + WordPress: Invalid post type

Hmk? After the latest system updates on Gentoo I noticed WordPress was no longer able to open any kind of post list („invalid post type“), edit posts (you do not have access to this kind of post) or create posts (form shown, but right sidebar missing). Not quite uncommon, but this time it was no broken plugin – I could reproduce the same behavior with several other WordPress instances with different versions – even a fresh install. That’s a new one.

After some probing around I’m fairly certain Apache 2.4.26 is the culprit, after downgrading to 2.4.25 the problem disappeared. All other downgrades like PHP 7.0.15 instead of PHP 7.0.19 didn’t show any effect. I yet have to confirm which combination ultimately triggers the error (FPM? Event-MPM?), but if you have similar errors: Here is your starting point…

ZFS/ZOL: Pool UNAVAIL nach Reboot

Nicht schön. Nach dem Reboot eines Server musste ich feststellen, dass diverse Storages nicht mehr zugreifbar waren. Schnell stellte sich heraus, dass alle ZFS-Pools offline waren und die Geräte mit der Meldung „too many errors“ als FAULTED markiert wurden.

 zpool import
   pool: tempstore
     id: xyz
  state: UNAVAIL
 status: One or more devices are faulted.
 action: The pool cannot be imported due to damaged devices or data.
 config:

        tempstore   UNAVAIL  insufficient replicas
          sdd       FAULTED  too many errors
          sde       FAULTED  too many errors

   pool: storage
     id: xyy
  state: UNAVAIL
 status: One or more devices are faulted.
 action: The pool cannot be imported due to damaged devices or data.
 config:

        storage     UNAVAIL  insufficient replicas
          sdb       FAULTED  too many errors

Nunja, Consumer-Platten traue ich ja viele defekte zu, aber drei unabhängige Platten gleichzeitig? Eher nein. Auch S.M.A.R.T. zeigte keine wirklich bedenkenswerten Werte. Aufschlussreicher ist da schon das Kernel-Log:

[  776.890127] Large kmem_alloc(131128, 0x1000), please file an issue at:
               https://github.com/zfsonlinux/zfs/issues/new
[  776.890129] CPU: 1 PID: 12969 Comm: vdev_open Tainted: P           O    4.4.39-gentoo-adlerweb #2
[  776.890130] Hardware name: LENOVO yxz/        , BIOS xyz 01/10/2012
[  776.890132]  0000000000000000 ffff880417a37bc0 ffffffff813545d8 000000000240c200
[  776.890134]  0000000000000000 ffff880417a37c00 ffffffffa0018af1 0000000017a37be0
[  776.890138]  0000000000000000 ffff88041626d480 ffff8804174ed660 0000000000004000
[  776.890139] Call Trace:
[  776.890144]  [<ffffffff813545d8>] dump_stack+0x4d/0x65
[  776.890148]  [<ffffffffa0018af1>] spl_kmem_zalloc+0x131/0x180 [spl]
[  776.890163]  [<ffffffffa0109aa8>] vdev_cache_stat_fini+0x258/0xcc0 [zfs]
[  776.890175]  [<ffffffffa010a3ba>] vdev_cache_stat_fini+0xb6a/0xcc0 [zfs]
[  776.890188]  [<ffffffffa014426a>] zio_data_buf_free+0x51a/0xdc0 [zfs]
[  776.890200]  [<ffffffffa014798f>] zio_nowait+0xaf/0x190 [zfs]
[  776.890215]  [<ffffffffa0104cce>] vdev_probe+0xfe/0x200 [zfs]
[  776.890228]  [<ffffffffa01059e0>] ? vdev_accessible+0x70/0x2b0 [zfs]
[  776.890240]  [<ffffffffa0107969>] vdev_open+0x3c9/0x4b0 [zfs]
[  776.890251]  [<ffffffffa0107bdd>] vdev_open_children+0x18d/0x1c0 [zfs]
[  776.890254]  [<ffffffffa001b8ec>] taskq_dispatch+0x3ac/0x5b0 [spl]
[  776.890257]  [<ffffffff810c1ed0>] ? wake_up_q+0x70/0x70
[  776.890261]  [<ffffffffa001b6e0>] ? taskq_dispatch+0x1a0/0x5b0 [spl]
[  776.890263]  [<ffffffff810b8c04>] kthread+0xc4/0xe0
[  776.890265]  [<ffffffff810b8b40>] ? kthread_park+0x50/0x50
[  776.890268]  [<ffffffff81a6a5df>] ret_from_fork+0x3f/0x70
[  776.890270]  [<ffffffff810b8b40>] ? kthread_park+0x50/0x50

*kick* Da war ja was. ZOL läuft wegen der Lizenzproblematik als Kernel-Modul. Ich hatte zuletzt am Kernel einige Treiber nachgezogen. Hierbei sind zwar Version und Ablageort gleich geblieben, offenbar ist aber die ABI etwas gewandert, sodass SPL/ZFS etwas verwirrt den Dienst quittierten.

Für Gentoo heißt das einmal Module neu Bauen, in meinem Fall

emerge -va spl zfs-kmod

 

Alternativ und in den meisten Fällen zuverlässiger ist es nach jeder Kernel-Änderung alle Module automatisch neu zu erstellen:

emerge -va @module-rebuild

Storage online, Admins glücklich, Update-Doku ergänzt. Passt.

Gentoo: Pakete von Distcc/pump ausnehmen

Verteiltes Kompilieren mit distcc und pump macht vor allem auf langsamen Systemen eine Menge Sinn. Leider vertragen nicht alle Pakete diese Lastverteilung, so z.B. mysql/mariadb. Um einzelne Pakete von distcc oder pump auszunehmen geht man wie folgt vor:

Folgende Dateien erstellen:

FEATURES="${FEATURES} -distcc -distcc-pump"
FEATURES="${FEATURES} -distcc-pump"

Nun ggf. den Ordner /etc/portage/package.env anlegen und dort – analog zu package.use/package.keywords/… – dateien für die Pakete anlegen, z.B.

dev-db/mariadb no-distcc-pump.conf

So wird z.B. für MariaDB der Pump-Modus abgeschaltet, distcc bleibt jedoch aktiv. Alternativ kann die ebenfalls erstellte no-distcc.conf verwendet werden um das verteilte Kompilieren komplett zu unterbinden.

Gentoo: OpenSSL ohne ECDHE

Unter Gentoo unterstützt OpenSSL standardmäßig kein ECDHE, welches für aktuelle Crypto kaum wegzudenken ist. Ursache sind die Lizenzbestimmungen bzw. Patente: Teile der Quellen dürfen ausschließlich als Sourcecoude verteilt werden und müssen daher aus vorkompilierten Teilen wie z.B. der Stage3 entfernt werden. Dieses entfernen wird über die USE-Flag „bindist“ (Binary distribution) gesteuert, welche standardmäßig eingeschaltet ist. Um OpenSSL mit EC-Cryoto zu bauen muss bindist entfernt werden – z.B. durch ein „-bindist“ in der globalen make.conf. Nach rebuild von OpenSSL und OpenSSH (sowie ggf anderer Abhängigkeiten und darauf aufbauende Software wie der Webserver) per

emerge -vuaDN openssl openssh

sollte die Crypto auch unter Gentoo verfügbar sein.