Re: [Ganglia-developers] request to merge some corrective patches (specfile, systemd service files, INSTALL, fixconfig)
Hi Jeff, That was my 1st time doing that, but apparently it has been already merged. Regarding scripts/fixconfig.in it has been merged as well. This is better than nothing, but my comment was, while it fixes the issue, is IMHO a bad solution and I was asking for better solution. If a skilled autoconf developer is reading this, please help as IMHO, it's an easy fix for someone that is used in autotools. To be more precise, I'm using @envdir@ and @runstatedir@ to set correct paths in systemd service files. This support is added in fixconfig.in, and IMHO, I think that it's bad doing everything here. The sed of course is needed, but the runstatedir=@localstatedir@/run and the if -d @sysconfigdir@/sysconfig used to set envdir should be moved to configure.ac IMHO That would permit to set them using --runstatedir and --envdir in the ./configure script. In the fixconfig.in we should only have runstatedir=@runstatedir@ envdir=@envdir@ ... $SED -e ... ... I have absolutely no skills (or almost none) in autotools unfortunately, otherwise I would have fixed that as well for a clean config. Right now, as sysconfigdir is set to points to /etc/ganglia, the env files goes to /etc/ganglia/sysconfig/gmetad which is strange and not FSH compliant I suppose. In configure.ac, we should handle the 2 following parameters: 1/ --runstatedir set to /var/run by default. Note that autoconf = 2.70 handles that by default, so either we required autoconf 2.70 = AC_PREREQ(2.70) (see if it's acceptable: rhel-6 which is an old distro has 2.63 for instance) or we set @runstatedir@ to @localstatedir@/run (making sure that is autoconf =2.60 is used it doesn't conflict. 2/ --envdir set to /etc/sysconfig on a redhat variant or /etc/default on a debian variant. I think that for that, the correct test is to 1st test /etc/sysconfig and use it if present. Indeed, /etc/default is also present on redhat variants due to some bad packaging that do not fix hardcoded debian env directory. In the opposite, on debian variant, I've never seen any /etc/sysconfig directory. That's why I think that the safest way to test is to test for /etc/sysconfig and there after /etc/default. This directory contains files that are sourced before starting a daemon (either using init script or systemd service) to set its environment. Aside that, (IMHO), I think that installing config files in @sysconfdir@ is a bad thing as it forces the installation to use the --syconfdir=/etc/ganglia and also triggers problems when dealing with envdir for exemple. IMHO, config files should be installed in @sysconfdir@/ganglia. this would result in the same installation except that --syconfdir=/etc/ganglia would not be required anymore and could be used to install init scripts using Makefile instead of doing so thru the packaging files. the systemd logic exists (HAVE_SYSTEMD), aand thus, depending on systemd or not, the make install would install the init scripts or the service files accordingly. Thanks a lot for so long reading and help. Best regards, Olivier. - Mail original - De: Jeff Buchbinder rufustfire...@gmail.com À: olivier lahaye1 olivier.laha...@free.fr Cc: Ganglia Developers ganglia-developers@lists.sourceforge.net Envoyé: Jeudi 27 Février 2014 21:31:40 Objet: Re: [Ganglia-developers] request to merge some corrective patches (specfile, systemd service files, INSTALL, fixconfig) On Thu, Feb 27, 2014 at 2:26 PM, olivier.laha...@free.fr wrote: Hi Jeff, I think I committed to my fork and sent a pull request. Can you see my pull request? It isn't showing up here : https://github.com/ganglia/monitor-core/pulls Are you sure that you created a new pull request? Jeff-- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers
Re: [Ganglia-developers] request to merge some corrective patches (specfile, systemd service files, INSTALL, fixconfig)
On Thu, Feb 27, 2014 at 12:57 PM, olivier.laha...@free.fr wrote: Hi, I'm an active developper of OSCAR Cluster project and we are using ganglia. I've ported OSCAR to systemd systems, and found that ganglia doesn't support systemd or at least, no packaging uses systemd service files and the service files are broken. The following patches are relative to git that I cloned a few hours ago. 1/ So 1st of all, here is a fixed specfile.in: - It adds support for systemd (supports both initscripts and systemd) - It fixes build that tries to package the web interface which is now splitted of the ganglia-core. - Add missing ck-devel build require. http://olivier.lahaye1.free.fr/OSCAR/ganglia-ganglia_spec_in.patch 2/ Then the gmetad.service and gmond.service are broken. 1/ gmtad doesn't recognize the -f option (clearly a gmond.service past error in gmetad.service). 2/ missing Type= fork 3/ missing EnvironmentFile= (behaviour would be different from init script if /etc/sysconfig/gmetad file was not sourced) 4/ missing --pid-file option for gmetad and no PidFile= in service file. 5/ User=ganglia is wrong as if gmetad starts as user ganglia (provided it exists in the systems), then it fails to setuid to user configured in gmetad.conf.which is by default nobody = remove the User and let gmetad setuid to the user specified in the config file. http://olivier.lahaye1.free.fr/OSCAR/ganglia-gmetad_service_in.patch http://olivier.lahaye1.free.fr/OSCAR/ganglia-gmond_service_in.patch Note: Those files need @runstatedir@ = /var/run or /run and @envdir@ = /etcf/sysconfig on redhat clones and /etc/default on deb variants. = need to fix scripts/fixconfig.in to have that support. 3/ In order to correctly fix the above files, we need to fix scripts/ fixconfig.in to add runstatedir and envdir. I'm not happy with this patch as I think that this should got to configure.ac (unfornutately out of my skill). Using configure.ac would permit to define variables --runstatedir (autoconf starting at version 2.70 supports that by default) and --envdir from the command line. It would also simplify fixconfig.in (the test between /etc/sysconfig and /etc/defaults wouldn't be needed in fixconfig.in). So feel free to enhance this. @runstatedir@ should point to /var/run (autoconf 2.70+ uses this as default) @envdir@ should point to /etc/sysconfig on a redhat clone and /etc/defaults on a debian variant. http://olivier.lahaye1.free.fr/OSCAR/ganglia-fixconfig_in.patch Once applied, the configure line in the spec.in file could be enhanced by adding --runstatedir=/var/run --envdir=/etc/sysconfig 4/ It seems that now the CK package is required. (searching for ck on google was hard) Thus the INSTALL file needs to be updated. http://olivier.lahaye1.free.fr/OSCAR/ganglia-INSTALL.patch Can someone with access to the source tree review those simple patches and merge/update them into the main source tree so they are part of the next release? Those patch should close the following tickets: #138 - (#126)? - #110 - #109 Please submit the patches as a github pull request ( https://help.github.com/articles/using-pull-requests ). Thanks, Jeff -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers
Re: [Ganglia-developers] request to merge some corrective patches (specfile, systemd service files, INSTALL, fixconfig)
Hi Jeff, I think I committed to my fork and sent a pull request. Can you see my pull request? Best regards, Olivier. - Mail original - De: Jeff Buchbinder rufustfire...@gmail.com À: olivier lahaye1 olivier.laha...@free.fr Cc: Ganglia Developers ganglia-developers@lists.sourceforge.net Envoyé: Jeudi 27 Février 2014 19:13:56 Objet: Re: [Ganglia-developers] request to merge some corrective patches (specfile, systemd service files, INSTALL, fixconfig) On Thu, Feb 27, 2014 at 12:57 PM, olivier.laha...@free.fr wrote: Hi, I'm an active developper of OSCAR Cluster project and we are using ganglia. I've ported OSCAR to systemd systems, and found that ganglia doesn't support systemd or at least, no packaging uses systemd service files and the service files are broken. The following patches are relative to git that I cloned a few hours ago. 1/ So 1st of all, here is a fixed specfile.in : - It adds support for systemd (supports both initscripts and systemd) - It fixes build that tries to package the web interface which is now splitted of the ganglia-core. - Add missing ck-devel build require. http://olivier.lahaye1.free.fr/OSCAR/ganglia-ganglia_spec_in.patch 2/ Then the gmetad.service and gmond.service are broken. 1/ gmtad doesn't recognize the -f option (clearly a gmond.service past error in gmetad.service). 2/ missing Type= fork 3/ missing EnvironmentFile= (behaviour would be different from init script if /etc/sysconfig/gmetad file was not sourced) 4/ missing --pid-file option for gmetad and no PidFile= in service file. 5/ User=ganglia is wrong as if gmetad starts as user ganglia (provided it exists in the systems), then it fails to setuid to user configured in gmetad.conf.which is by default nobody = remove the User and let gmetad setuid to the user specified in the config file. http://olivier.lahaye1.free.fr/OSCAR/ganglia-gmetad_service_in.patch http://olivier.lahaye1.free.fr/OSCAR/ganglia-gmond_service_in.patch Note: Those files need @runstatedir@ = /var/run or /run and @envdir@ = /etcf/sysconfig on redhat clones and /etc/default on deb variants. = need to fix scripts/ fixconfig.in to have that support. 3/ In order to correctly fix the above files, we need to fix scripts/ fixconfig.in to add runstatedir and envdir. I'm not happy with this patch as I think that this should got to configure.ac (unfornutately out of my skill). Using configure.ac would permit to define variables --runstatedir (autoconf starting at version 2.70 supports that by default) and --envdir from the command line. It would also simplify fixconfig.in (the test between /etc/sysconfig and /etc/defaults wouldn't be needed in fixconfig.in ). So feel free to enhance this. @runstatedir@ should point to /var/run (autoconf 2.70+ uses this as default) @envdir@ should point to /etc/sysconfig on a redhat clone and /etc/defaults on a debian variant. http://olivier.lahaye1.free.fr/OSCAR/ganglia-fixconfig_in.patch Once applied, the configure line in the spec.in file could be enhanced by adding --runstatedir=/var/run --envdir=/etc/sysconfig 4/ It seems that now the CK package is required. (searching for ck on google was hard) Thus the INSTALL file needs to be updated. http://olivier.lahaye1.free.fr/OSCAR/ganglia-INSTALL.patch Can someone with access to the source tree review those simple patches and merge/update them into the main source tree so they are part of the next release? Those patch should close the following tickets: #138 - (#126)? - #110 - #109 Please submit the patches as a github pull request ( https://help.github.com/articles/using-pull-requests ). Thanks, Jeff-- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers
Re: [Ganglia-developers] request to merge some corrective patches (specfile, systemd service files, INSTALL, fixconfig)
On Thu, Feb 27, 2014 at 2:26 PM, olivier.laha...@free.fr wrote: Hi Jeff, I think I committed to my fork and sent a pull request. Can you see my pull request? It isn't showing up here : https://github.com/ganglia/monitor-core/pulls Are you sure that you created a new pull request? Jeff -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers