[omd-devel] Create site in sylinked path fails - suggested fix

Mathias Kettner mk at mathias-kettner.de
Wed Jun 24 09:36:47 CEST 2015


Hi Oliver,

some tools are *very* picky about the difference between symlinks
and physical paths. Some of them are "mount" and the "rrdcached".
They do symlink resolution and convert things to absolute paths
sometimes and *then* compare with configuration values.

So I personally really cannot forsee into which kinds of trouble
these and other tools can run if we change it that way. So I'm a bit
frightened to be honest and would rather not apply your patch....

Mathias



Am 23.06.2015 um 17:24 schrieb Oliver O'Boyle:
> Hello,
>
> I recently tried to create an OMD site in a previously symlinked path.
> The procedure failed due to broken symlinks. The broken symlinks occur
> because the relative path of ‘../../versions/<OMD_VERSION>’ is used
> during the creation process. The create_version_symlink function in
> /usr/bin/omd can be changed to use the /omd/versions path instead, as such:
>
> ORIGINAL:
>
> def create_version_symlink(sitename, version):
>
>      linkname = site_dir(sitename) + "/version"
>
>      if os.path.exists(linkname):
>
>          os.remove(linkname)
>
>      os.symlink("../../versions/%s" % OMD_VERSION, linkname)
>
> LINE 415 CHANGED TO:
>
> def create_version_symlink(sitename, version):
>
>      linkname = site_dir(sitename) + "/version"
>
>      if os.path.exists(linkname):
>
>          os.remove(linkname)
>
>      os.symlink("/omd/versions/%s" % OMD_VERSION, linkname)   <--line 415
>
> I’ve made this change and tested the creation of new sites. It seems to
> work flawlessly.
>
> Is it possible to make this change (or something similar that allows for
> sites to be created in a symlinked path) to the distribution?
>
> Regards,
>
> Oliver
>
> *_________________________________*
>
> *Oliver O’Boyle*
>
> Director, IT • *Atlific Hotels*
>
> 250 Saint-Antoine W., Suite 400 Montreal, Quebec H2Y 0A3
>
> T: 514.509.5545   C: 514.608.8533   F: 514.509.5498
>
> *ooboyle at atlific.com <mailto:ooboyle at atlific.com>**www.atlific.com*
> <http://www.atlific.com/>
>
> *_________________________________*
>
>
>
> _______________________________________________
> omd-devel mailing list
> omd-devel at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-devel
>

-- 
We’ll meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
http://mathias-kettner.de/conference


Wir treffen uns zur 2. Check_MK-Konferenz in München!
Rechtzeitig buchen und dabei sein!
18.-20. Oktober 2015
http://mathias-kettner.de/conference


Mathias Kettner GmbH
Kellerstraße 29, 81667 München, Germany
Registergericht: Amtsgericht München,  HRB 165902
Geschäftsführer: Mathias Kettner
http://mathias-kettner.de
Tel. +49 89 1890 435-0
Fax. +49 89 1890 435-29


More information about the omd-devel mailing list