Articles tagged "debian"

Using oci template with lxc-create

lxc-create -t oci does not work out of the box on Devuan 3 "Bewulf"/Debian 10 "Buster".

  1. Install umoci from distribution
  2. Install skopeo (Chimaera/Bullseye version) from e.g. http://ftp.de.debian.org/debian/pool/main/s/skopeo/
  3. Create /etc/containers/policy.json with
{
  "default": [
    {
      "type": "insecureAcceptAnything"
    }
  ],
  "transports":
    {
      "docker-daemon":
        {
          "": [{"type":"insecureAcceptAnything"}]
        }
    }
}

As Docker is not LXC most containers need some tuning in their config!

Debian und die /etc/network/interfaces

Ach ja, Debian...

Seit einiger Zeit hat ifupdown die Möglichkeit, nicht alle Netzwerk-Interfaces in /etc/network/interfaces zu pflegen, sondern diese z.B. in /etc/network/interfaces.d/ als kurze Dateien abzulegen. Gerade wenn man mal 10 VLANs und dazu jeweils eine Bridge hat (ja, ein Virtualisierungsserver), macht das die Sache IMHO deutlich übersichtlicher.

Wenn ich mich richtig erinnere, dann gab es zuerst die Möglichkeit per source /etc/network/interfaces.d/* einzelne Dateien bzw. Wildcards einzulesen. Später kam dann noch ein source-directory /etc/network/interfaces.d/ dazu.

Leider hat man es von Anfang an versäumt, statt nur "*" ein Suffix für die Schnippsel zu definieren, also z.B. source /etc/network/interfaces.d/*.iface - somit wird auch bei einem frisch installiertem Debian/Buster alles gelesen, was in diesem Verzeichnis liegt.

Das führt jetzt zu der dämlichen Situation, dass der Editor (der hoffentlich automatisch Backup-Files anlegt), nachdem man statt DHCP eine feste IP-Adresse eingetragen hat, folgendes hinterlässt:

root@buster:/etc/network/interfaces.d# ls
eth0.cfg  eth0.cfg~

Und was macht ein ifup eth0 draus? Das da:

root@buster:/etc/network/interfaces.d# ip a ls dev eth0
2: eth0@if28: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether fe:ac:16:f0:00:bb brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.10.10.10/28 brd 10.10.10.15 scope global eth0
       valid_lft forever preferred_lft forever
    inet 172.22.240.100/24 brd 172.22.240.255 scope global dynamic eth0
       valid_lft 3086sec preferred_lft 3086sec
    inet6 fe80::fcac:16ff:fef0:bb/64 scope link
       valid_lft forever preferred_lft forever

Die Lösung? Eigentlich GANZ einfach. Es gäbe ja sogar zwei...

  1. Entweder man definiert ein Suffix (z.B. *.iface, siehe oben) und macht dann source /etc/network/interfaces.d/*.iface, ignoriert also alles andere.
  2. Man stellt (zumindest bei Neuinstallationen) auf source-directory /etc/network/interfaces.d/ um, welches nur folgende RegExp zulässt: ^[a-zA-Z0-9_-]+$

Ich bin ein Freund von Zweiterem, deswegen stell ich das auch mit meiner Ansible-Grundinstallation um.

Gestern allerdings fiel mir das auf die Füße. Nach einem Reboot kam der vServer nicht mehr hoch. Warum? Darum:

root@buster:/etc/network/interfaces.d# ls
50-cloud-init.cfg

In der RegExp für source-directory ist kein Punkt dabei! Daher werden Dateien mit einem Suffix nicht gelesen. Darüber lässt sich jetzt auch streiten, ob das sinnvoll ist, klar. An anderer Stelle ist das aber (im Debian-System, z.B. Cron-Scripte, die per run-parts aufgerufen werden) dann auch wieder so, es zieht sich also durch. Ich fände es als Default immer noch besser, als Backup-Dateien (welche auf "~" enden) wie Schnippsel zu behandeln und sie einzulesen.

An anderer Stelle hat man gelernt: War es bei Apache 2 in Debian möglich, im Verzeichnis /etc/apache2/sites-enabled/ beliebige Dateinamen abzulegen, werden inzwischen nur noch Schnippsel mit der Endung "*.conf" inkludiert.

Fazit:
Durch eine unbedachte Default-Einstellung bei der Einführung eines eigentlich SEHR coolen Features (source mit "*" als Wildcard), hat man Probleme in der Zukunft vorprogrammiert.

Devuan (oder Debian) auf AMD Ryzen 5 Pro 4650G

Wer einen der neuen Ryzen-CPUs sein eigen nennt, wird schnell feststellen, dass es unter Devuan 3 "Beowulf" bzw. Debian 10 "Buster" mit der Grafikkarte gibt. Nach der Installation des Linux-Kernels 5.7 aus den Backports plus firmware-amd-graphics war das Problem erledigt. Zur Vervollständigung habe ich noch die AMD64-Microcode-Updates und die passenden X.org-Treiber installiert.

root@beowulf:~# apt install amd64-microcode xserver-xorg-video-amdgpu
root@beowulf:~# apt install -t beowulf-backports linux-image-amd64 firmware-amd-graphics

Archlinux hat mich auf die richtige Spur geleitet. Aber ich hab mal wieder festgestellt, dass Archlinux nix für mich ist ;)

NagTrap on PHP 5.3 - newer OpenSUSE and Debian 6 Squeeze

Well... an other "wonderful" change between PHP 5.2 and 5.3... "parse_ini_file" behaves different on some characters. You will see a

Database-Error
Can't connect to database!
Check your configuration!
Errors: Access denied for user 'www-data@localhost' (using password: NO)

or on OpenSUSE:

Errors: Access denied for user 'wwwrun@localhost' (using password: NO)

You have to change one line in "nagtrap/etc/config.ini.php" from:

illegalCharJavabox = <,>,'

to:

illegalCharJavabox = "<,>,'"

After this small change everything works fine.

PS: Also remember short_open_tags settings on OpenSUSE. Must be turned On in /etc/php5/apache2/php.ini!

PNP4Nagios in Debian

Short english version: It's finally done! PNP4Nagios is now a part of Debian. Thanks to Sebastian Harl for finishing the work I started.

Es ist endlich geschafft! PNP4Nagios (und seine ganzen Abhängigkeiten) ist ein Teil von Debian. Im Moment befindet es sich "nur" in Wheezy und Sid, wir wollen es aber auf jeden Fall noch in die Backports von Lenny und Squeeze bekommen.

Begonnen hat das ganze Abenteuer ja schon vor langer, langer Zeit, aber die vielen Feinheiten (insbesondere Lizenzen diverser "Kleinteile") haben einen Upload leider sehr lange verzögert. Sebastian "tokkee" Harl hat sich nun dem fitzeligen Rest angenommen, es in ein Debian-würdiges Format gebracht und (weil er eben DD ist) es auch gleich nach Debian hochgeschoben. Ein Danke von mir nochmals an dieser Stelle :)

PNP4Nagios - 0.4 continues

Long, long time ago I can still remember...

New packages available:

I'm also working on 0.6 (more work than I thought) - stay tuned!

I'm working on...

... Debian packages of ...

As soon as I have some packages available it'll blog it here.

Upgrade! Upgrade! Upgrade!

http://people.teamix.net/~svelt/debian/ has some new packages:

* [.../etch/nagios3/current/](http://people.teamix.net/~svelt/debian/etch/nagios3/current/) now has **3.0rc3**

* [.../etch/pnp/current/](http://people.teamix.net/~svelt/debian/etch/pnp/current/) is updated to 0.4.7

* [.../etch/ndoutils/current/](http://people.teamix.net/~svelt/debian/etch/ndoutils/current/): Added a init.d-Script, thanks to Oliver Boos!

* [.../etch/nrpe/current/](http://people.teamix.net/~svelt/debian/etch/nrpe/current/) is an initial backport of NRPE. Needed for multiline output with Nagios 3. Be careful! More testing needed!

And a little Add-On for all AMD64-Users:

Have a look at http://people.teamix.net/~svelt/debian/etch64/! But beware! These packages are not well tested! They may eat your cat or dog... or both! ;-)

Nagios 3rc1 as DEBs

Get it:

http://people.teamix.net/~svelt/debian/etch/nagios3/current/

BTW: Yes, it's there for almost 4 weeks now (in ".../3.0-rc1/") but I forgot to change the link for "current" after testing the package...

Nagios 3.0b7, PNP 0.4.4

Wohoo!

Here we go: Nagios 3.0Beta7 and PNP 0.4.4! Tested, works for me ;-)

If you always want to use my "current" (read: tested in my installations) packages just put these lines in your sources.list:

deb http://people.teamix.net/~svelt/debian/etch/nagios3/current/ ./ deb http://people.teamix.net/~svelt/debian/etch/ndoutils/current/ ./ deb http://people.teamix.net/~svelt/debian/etch/pnp/current/ ./

Have fun & send feeback!

Finally! PNP 0.4.3 as Debian package! And Nagios 3.0beta5...

Did you download Nagios 3.0b4?? Doesn't matter, download and install 3.0 Beta 5

To get your performance data in RRDs and watch the wonderful graphs exported from RRDs get PNP (PNP is Not Perfparse). Have a look at README.Debian to start process performance data.

See you at NETWAYS Nagios Konferenz!

DEBs updated: Nagios 3.0b4, NDOUtils 1.4b6

He did it again! Nagios 3 Beta 4 and NDOUtils 1.4 Beta 6.

* [Nagios 3.0 Beta 4](http://people.teamix.net/~svelt/debian/etch/nagios3/3.0-beta-4/)

* [NDOUtils 1.4 Beta 6](http://people.teamix.net/~svelt/debian/etch/ndoutils/1.4-beta-6/)

If you had similar database problems with 3.0b3/1.4b5 try these!

STOP!
If you use/try these packages, please give me feedback! Thanks!

mutt - "No authenticators available"

You want to send a mail via mutt's internal SMTP library and you get "no authenticators available"?

Your "mutt -d 2" log contains
SASL: No worthy mechs found
smtp_auth_sasl: (null) unavailable
No authenticators available
`

Solution? Yes, look here:
aptitude install libsasl2-modules

Debian packages of Nagios3 and NDOUtils updated

As Ethan released new development versions of Nagios 3 and NDOUtils I updated my packages. You can get them here:

Look at your nagios.log after updating/installing! If you get...
[1189789789] ndomod: Error writing to data sink! Some output may get lost... [1189789805] ndomod: Successfully reconnected to data sink! 0 items lost, 216 queued items to flush. [1189789805] ndomod: Successfully flushed 216 queued items to data sink. [1189790189] SERVICE ALERT: XXXXXXXX;Ping;WARNING;SOFT;1;WARNING - XXX.XXX.XXX.XXX: rta 369.498ms, lost 40% [1189790189] ndomod: Error writing to data sink! Some output may get lost... [1189790205] ndomod: Successfully reconnected to data sink! 0 items lost, 230 queued items to flush. [1189790205] ndomod: Successfully flushed 230 queued items to data sink.
...try to drop your database and re-create it. I'm not the only one with this problem but there is (still) not a 100 percent fix for it :-(

STOP!
If you use/try these packages, please give me feedback! Thanks!

New packages for testing: Nagios, PNP, NDOutils

I've just removed the "UNTESTED" from 3 directories on http://people.teamix.net/~svelt/debian/etch/:

Watch out for new features in PNP as Jörg presented a pre-0.4 version at the Nagios Workshop in Karlsruhe (german).

Please send me some feedback if you use/test these packages! Thanks!

  1 2 »