Showing posts with label update. Show all posts
Showing posts with label update. Show all posts

OMD fails to start after CentOS upgrade to 6.4

0 Kommentare
I faced a problem starting OMD 0.54 after upgrading CentOS to the version 6.4. The start script returns a bunch of error messages:


[root@omd ~]# omd restart mysite
Doing 'restart' on site mysite:
Creating temporary filesystem /omd/sites/mysite/tmp...mount: can't find /omd/sites/                         mysite/tmp in /etc/fstab or /etc/mtab
ERROR
Removing Crontab...
Stopping xinetd...OK
Stopping icinga...Not running. OK
npcd was not running... could not stop
Stopping rrdcached...waiting for termination...OK
Stopping dedicated Apache for site mysite....OK
Starting dedicated Apache for site mysite...OK
Starting rrdcached...OK
Starting npcd...touch: cannot touch `/omd/sites/mysite/tmp/pnp4nagios/run/npcd.pid'                         : No such file or directory
chown: cannot access `/omd/sites/mysite/tmp/pnp4nagios/run/npcd.pid': No such file or directory
An Error occured while reading your config on line 197
Message was: "Could not open pidfile '/omd/sites/mysite/tmp/pnp4nagios/run/npcd.pid                         ': No such file or directory"
OK
/omd/sites/mysite/etc/rc.d/80-icinga: line 54: /omd/sites/mysite/tmp/nagios/nagios.cfg                         : No such file or directory
Icinga configuration file /omd/sites/mysite/tmp/nagios/nagios.cfg not found. Terminating...
Starting xinetd...OK
Initializing Crontab...OK

I found a couple of reports about the same problem. The root cause seems to be a bug (or a feature?) in the package util-linux-ng-2.17.2-12.9.el6.x86_64 that prevents non root users to mount partitions from /etc/fstab, whose path name conatains a symlink (symbolic link). In case of OMD /omd is a symlink pointing to /opt/omd.

A workaround that helped me to solve the problem was adding /opt to the appropriate path in /etc/fstab:

tmpfs                   /opt/omd/sites/nysite/tmp  tmpfs   noauto,user,mode=755,uid=mysite,gid=mysite 0 0

Script to inform about new updates in CentOS

0 Kommentare
A couple days ago I shared my script for OpenSuSE. Now I've re-written that Perl script to speak the language of yum. The script below is intended to run periodically by cron and to send me an e-mail, if new updates have been found for the system. It's nothing extraordinary, yum-cron can this too. But an advantage of my Perl script is that the e-mail is sent only once. No email is sent, if the same updates are found again. The trick is that the Perl script saves the updates (if any) in a temporary file to compare its content then with the updates found at the current run.

Besides I wanted to see the installed and the available versions of a package side by side. I could unfortunately get this output with yum or repoquery directly.

Script to inform about new updates in OpenSuSE

1 Kommentare
Some time ago I wrote a script that informs me via e-mail, when zypper finds new updates. Now I'd like to share the script (actually there are two scripts: a main Perl script and a Shell script as wrapper).

An advantage of my script is that it informs you only once, if there are new updates and not every time you start it. It is achieved due to the storing the last result in the file system. The next time you'll get an e-mail is, when the script finds a newer update as found before.