Bug 1559864 - Review Request: gluster-collectd plugin to collect metrics and push to collectd
Summary: Review Request: gluster-collectd plugin to collect metrics and push to collectd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-DEADREVIEW 1470532
TreeView+ depends on / blocked
 
Reported: 2018-03-23 12:42 UTC by Venkata R Edara
Modified: 2021-01-08 00:45 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-01-08 00:45:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Venkata R Edara 2018-03-23 12:42:34 UTC
Hi 

Request to review the gluster-collectd package. This package provides gluster plugin for collectd. it collects metrics about the gluster and pushes to collectd daemon. 

SPEC URL:https://github.com/gluster/gluster-collectd/blob/master/gluster-collectd.spec

Source RPM : https://copr-be.cloud.fedoraproject.org/results/redara/gluster-collectd/fedora-27-x86_64/00731673-gluster-collectd/

Description:
Gluster collectd plugin is based on collectd python plugin. The gluster collectd plugin collects metrics about

   1. glusterd, glusterfs process cpu and memory
   2. io statistics and brick utilization
   3. volume statistics (heal entries)

RPM Installation.

    #git clone https://github.com/gluster/gluster-collectd
    #cd gluster-collectd
    #./makerpm.sh
    # rpm -ivh build/gluster-collectd.noarch.rpm

Comment 1 Robert-André Mauchin 🐧 2018-03-27 13:22:27 UTC
You don't seem to have a FAS account?

Comment 2 Venkata R Edara 2018-04-02 10:24:15 UTC
(In reply to Robert-André Mauchin from comment #1)
> You don't seem to have a FAS account?

redara is my FAS account.

Comment 3 Artur Frenszek-Iwicki 2018-04-07 13:52:45 UTC
>Release: 0%{?dist}
This should start at 1.

>Source0: gluster-collectd-%{version}-%{_release}.tar.gz
It's preferred for Source0 to be a downloadable URL.

>cp -r conf/* %{buildroot}/%{_confdir}/
>cp -r types/* %{buildroot}/usr/share/collectd/
You should aim to preserve file timestamps. Use "cp -a" or "cp -rp". 

Also, the linked copr build failed.
>+ '%{__python2}' setup.py build
>BUILDSTDERR: /var/tmp/rpm-tmp.JzTM17: line 31: fg: no job control
The "no job control" error usually means that the macro failed to expand and the shell is interpeting the "%" as job control. You may need to add a BuildRequires for "python2-rpm-macros".

Comment 5 Venkata R Edara 2018-06-07 13:05:35 UTC
can anyone pick this up and do the review please.

Comment 6 Sahina Bose 2018-06-27 08:39:17 UTC
Sachi, could you help here

Comment 7 Sachidananda Urs 2018-06-27 14:07:37 UTC
(In reply to Venkata R Edara from comment #4)
> Sorry for delay, I made changes to spec file , now the build is success. 
> 
> SPEC:
> https://github.com/gluster/gluster-collectd/blob/master/gluster-collectd.spec
> 

* Instead of /usr/share use the _datadir macro.

> Requires : collectd >= 5.8.0
> Requires : collectd-python >= 5.8.0

If the fedora releases targeted has latest above 5.8.x you can ignore the version numbers.

> %{__python2} setup.py build
* py2_build macro should achieve this. Have you tried it?

Below is a comment from Ken Dreyer from another package. Since I see python2 in many places, I think it is still relevant.

Can this package work with Python 3 instead of Python 2? Maybe it would be a good idea to add a comment to the .spec file explaining why this will not work with Python 3 if that is the case. https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 is coming eventually. You could conditionalize py2/py3 with "%if %{?rhel} < 8" if you want to share the same .spec file across RHEL 7 and Fedora.

Comment 8 Venkata R Edara 2018-06-28 13:42:49 UTC
(In reply to Sachidananda Urs from comment #7)
> (In reply to Venkata R Edara from comment #4)
> > Sorry for delay, I made changes to spec file , now the build is success. 
> > 
> > SPEC:
> > https://github.com/gluster/gluster-collectd/blob/master/gluster-collectd.spec
> > 
> 
> * Instead of /usr/share use the _datadir macro.
> 
> > Requires : collectd >= 5.8.0
> > Requires : collectd-python >= 5.8.0
> 
> If the fedora releases targeted has latest above 5.8.x you can ignore the
> version numbers.
> 
> > %{__python2} setup.py build
> * py2_build macro should achieve this. Have you tried it?
> 
> Below is a comment from Ken Dreyer from another package. Since I see python2
> in many places, I think it is still relevant.
> 
> Can this package work with Python 3 instead of Python 2? Maybe it would be a
> good idea to add a comment to the .spec file explaining why this will not
> work with Python 3 if that is the case.
> https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 is coming
> eventually. You could conditionalize py2/py3 with "%if %{?rhel} < 8" if you
> want to share the same .spec file across RHEL 7 and Fedora.

I added comment saying why Python 2 is supported. for Python 3 we have to test many dependencies and packages. I added macro for _datadir. but for py2_build macro the build is failing in FAS site.

here is link for successful build: https://copr-be.cloud.fedoraproject.org/results/redara/gluster-collectd/fedora-27-x86_64/00772030-gluster-collectd/

specfile: https://github.com/gluster/gluster-collectd/blob/master/gluster-collectd.spec

Comment 9 Sachidananda Urs 2018-06-29 00:30:34 UTC
(In reply to Venkata R Edara from comment #8)
> (In reply to Sachidananda Urs from comment #7)
> > (In reply to Venkata R Edara from comment #4)
> > > Sorry for delay, I made changes to spec file , now the build is success. 
> > > 
> > > SPEC:
> > > https://github.com/gluster/gluster-collectd/blob/master/gluster-collectd.spec
> > > 
> > 
> > * Instead of /usr/share use the _datadir macro.
> > 
> > > Requires : collectd >= 5.8.0
> > > Requires : collectd-python >= 5.8.0
> > 
> > If the fedora releases targeted has latest above 5.8.x you can ignore the
> > version numbers.
> > 

Did you get a chance to check this? For the releases you are packaging, if they
by default ship later versions the checks are redundant.

Comment 10 Venkata R Edara 2018-06-29 06:29:05 UTC
(In reply to Sachidananda Urs from comment #9)
> (In reply to Venkata R Edara from comment #8)
> > (In reply to Sachidananda Urs from comment #7)
> > > (In reply to Venkata R Edara from comment #4)
> > > > Sorry for delay, I made changes to spec file , now the build is success. 
> > > > 
> > > > SPEC:
> > > > https://github.com/gluster/gluster-collectd/blob/master/gluster-collectd.spec
> > > > 
> > > 
> > > * Instead of /usr/share use the _datadir macro.
> > > 
> > > > Requires : collectd >= 5.8.0
> > > > Requires : collectd-python >= 5.8.0
> > > 
> > > If the fedora releases targeted has latest above 5.8.x you can ignore the
> > > version numbers.
> > > 
> 
> Did you get a chance to check this? For the releases you are packaging, if
> they
> by default ship later versions the checks are redundant.

Now i removed the versions, fedora is shipping 5.8.0 only. 
Here is latest spec : https://copr-be.cloud.fedoraproject.org/results/redara/gluster-collectd/fedora-27-x86_64/00772262-gluster-collectd/gluster-collectd.spec

Here is successful build: https://copr-be.cloud.fedoraproject.org/results/redara/gluster-collectd/fedora-27-x86_64/00772262-gluster-collectd/

I will checkin spec file to git repo, once review is over.

Comment 11 Sachidananda Urs 2018-06-29 07:41:53 UTC
Looks good to me.

Comment 12 Package Review 2021-01-08 00:45:18 UTC
This is an automatic action taken by review-stats script.

The submitter account doesn't exist anymore, therefore this ticket will be closed.


Note You need to log in before you can comment on or make changes to this bug.