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

Mathias Kettner mk at mathias-kettner.de
Thu Jun 25 17:13:43 CEST 2015


Hi Oliver,

simply create mount points blow /omd/sites. Steps:

1. omd create foo --no-init

# omd create --no-init foo
Adding /opt/omd/sites/foo/tmp to /etc/fstab.
Create new site foo in disabled state and with empty /omd/sites/foo.
You can now mount a filesystem to /omd/sites/foo.
Afterwards you can initialize the site with 'omd init'.

2. Mount your filesystem there

3. omd init foo

And you should be fine...

Am 25.06.2015 um 16:54 schrieb Oliver O'Boyle:
> Hi Mathias,
>
> Thanks for the reply. I understand the concern. Is there an alternative way to create sites on different disk volumes? It would help improve a number of areas, including performance of individual sites and some management tasks.
>
> I've been keeping a very close eye on the installation that I did. It's not a production site but I do have live data coming into it from a variety of host types. I'm not seeing any issues at all. The status info is getting updated as expected, all graphs are showing correct data, I'm not seeing any errors in logs or elsewhere. It really looks and feels very stable.
>
> Also, I installed check_mk RAW 1.2.6p5 on top of OMD yesterday, restored all data from the 1.2.4p5 OMD site into it, and it continue to work flawlessly.
>
> I'd be happy to run any tests you want or provide you any information you need. I'd even be happy to run any additional beta or alpha code if that would help you feel more comfortable.
>
> Oliver
>
> -----Original Message-----
> From: omd-devel-bounces at lists.mathias-kettner.de [mailto:omd-devel-bounces at lists.mathias-kettner.de] On Behalf Of Mathias Kettner
> Sent: June-24-15 3:37 AM
> To: OMD developers mailing list (english)
> Subject: Re: [omd-devel] Create site in sylinked path fails - suggested fix
>
> 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
> _______________________________________________
> omd-devel mailing list
> omd-devel at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-devel
> _______________________________________________
> 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