Bug 511246 - Review Request: pacemaker - cman/rgmanager alternative
Review Request: pacemaker - cman/rgmanager alternative
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Fabio Massimo Di Nitto
Fedora Extras Quality Assurance
:
Depends On: 511212
Blocks: 509880
  Show dependency treegraph
 
Reported: 2009-07-14 08:37 EDT by Andrew Beekhof
Modified: 2009-07-31 02:01 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-31 02:01:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
fdinitto: fedora‑review+
tibbs: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Andrew Beekhof 2009-07-14 08:37:07 EDT
Spec URL: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker.spec

SRPM URL: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker-1.0.4-1.fc11.src.rpm

Description: Advanced High Availability cluster manager.

Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Linux-HA (Heartbeat) and/or OpenAIS.

It supports "n-node" clusters with significant capabilities for
managing resources and dependencies.

It will run scripts at initialization, when machines go up or down,
when related resources fail and can be configured to periodically check
resource health.

Background:  I've recently been hired by RedHat in order to work on Pacemaker.
We'd like to include it in F12 so that we can offer it as a tech preview in RHEL6. 

This package requires cluster-glue and the current version of corosync from the upstream SVN in order to build.

Please note, along with cluster-glue, this is my first package so I am looking for a sponsor.

I. rpmlint output:

[beekhof@f11 pacemaker]$ rpmlint x86_64/* pacemaker.spec pacemaker-1.0.4-1.fc11.src.rpm 
libpacemaker3.x86_64: W: no-documentation
libpacemaker3.x86_64: W: shared-lib-calls-exit /usr/lib64/libcib.so.1.0.1 exit@GLIBC_2.2.5
libpacemaker3.x86_64: W: shared-lib-calls-exit /usr/lib64/libcrmcluster.so.1.0.0 exit@GLIBC_2.2.5
libpacemaker3.x86_64: W: shared-lib-calls-exit /usr/lib64/libpengine.so.3.0.0 exit@GLIBC_2.2.5
libpacemaker-devel.x86_64: W: no-dependency-on libpacemaker/libpacemaker-libs/liblibpacemaker
libpacemaker-devel.x86_64: W: no-documentation
pacemaker.spec:191: E: hardcoded-library-path in /usr/lib/ocf
pacemaker.spec:192: E: hardcoded-library-path in /usr/lib/ocf/resource.d
pacemaker.spec:193: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker
pacemaker.src:191: E: hardcoded-library-path in /usr/lib/ocf
pacemaker.src:192: E: hardcoded-library-path in /usr/lib/ocf/resource.d
pacemaker.src:193: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/heartbeat/crm 0750
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/pengine 0750
pacemaker.x86_64: E: non-standard-dir-perm /var/run/crm 0750
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/constraints-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/crm.dtd
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/crm-transitional.dtd
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/nvset-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/pacemaker-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/pacemaker.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/resources-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/rule-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/score.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/upgrade06.xsl
pacemaker.x86_64: E: wrong-script-interpreter /usr/share/pacemaker/cts/CTSlab.py "env"
pacemaker.x86_64: E: wrong-script-interpreter /usr/share/pacemaker/cts/extracttests.py "env"
pacemaker.x86_64: E: wrong-script-interpreter /usr/share/pacemaker/cts/OCFIPraTest.py "env"
5 packages and 1 specfiles checked; 22 errors, 6 warnings.

II. Errors

a. There are many script-without-shebang errors which appears to be an rpmlint bug.
These files are XML related, not scripts, and should not include a shebang.

b. There are three instances of wrong-script-interpreter, which I also believe to be an rpmlint problem.
The use of 'env' redirection allows us to execute with the version of python preferred by the user.

c. The instances of non-standard-dir-perm would also appear to be incorrect, it is not intended that users other than daemon should be allowed to write to these locations.

d. The most controversial errors are probably the hardcoded-library-path ones, which I also believe to be a bug in rpmlint.  
Rpmlint expects %{_libdir}, which is generally the right thing to do.  However, the OCF RA API specifies the use of /usr/lib/ocf:

http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent-api.txt?rev=1.10&content-type=text/vnd.viewcvs-markup

Despite being unconventional from a Fedora perspective, this is not a violation of the LSB nor the FHS:

http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA

There is nothing which states that packages on x86_64 must use /usr/lib64 and so forth, and using %{_libdir} in this case would violate OCF standards.  
This could, in turn, break third-party OCF resource agents installed in /usr/lib/ocf as per the OCF standard.

III. Warnings

a. I believe the no-documentation warnings should be ignored as the documentation is included in the main package.

b. The no-dependency-on appears to be an rpmlint bug as the subpackage is libpacemaker3 and the -devel package does indeed have a dependancy on it. 

c. The shared-lib-calls-exit are legitimate.
They result from the way the library handles OOM conditions.
The library was initially a private one and as such took the easy way out by calling exit().

If this is a particularly offensive warning, I can investigate options for conditionally disabling it.
Comment 1 Andrew Beekhof 2009-07-19 14:58:14 EDT
Strictly speaking Pacemaker doesn't need to be a replacement and could happily live side-by-side with cman/rgmanager.
Comment 2 Lon Hohberger 2009-07-20 09:52:22 EDT
Hey, can we get this reviewed?  I don't have the proper powers to do so, but I've gone over it a couple of times with Fabio and Andrew here, and I think the package is pretty high quality.
Comment 3 Andrew Beekhof 2009-07-20 10:59:05 EDT
New spec and source rpm (this time for f12):
   http://oss.clusterlabs.org/~beekhof/fedora/pacemaker.spec
   http://oss.clusterlabs.org/~beekhof/fedora/pacemaker-1.0.4-2.fc12.src.rpm

Conducted a self-review based on http://fedoraproject.org/wiki/Packaging/ReviewGuidelines and made a number of improvements.

In particular the spec now references the upstream tarball, the summaries are a little better and (after reading the discussion regarding #!env python fedora-packaging) the wrong-script-interpreter errors have been removed.

Here is the new rpmlint output (previous explanations of the remaining errors and warnings still apply):
 
rpmlint ~/rpmbuild/RPMS/x86_64/*pace* pacemaker.spec 
libpacemaker3.x86_64: W: shared-lib-calls-exit /usr/lib64/libcrmcluster.so.1.0.0 exit@GLIBC_2.2.5
libpacemaker3.x86_64: W: shared-lib-calls-exit /usr/lib64/libpengine.so.3.0.0 exit@GLIBC_2.2.5
libpacemaker3.x86_64: W: shared-lib-calls-exit /usr/lib64/libcib.so.1.0.1 exit@GLIBC_2.2.5
libpacemaker3.x86_64: W: no-documentation
libpacemaker-devel.x86_64: W: no-dependency-on libpacemaker/libpacemaker-libs/liblibpacemaker
libpacemaker-devel.x86_64: W: no-documentation
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/pengine 0750
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/heartbeat/crm 0750
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/constraints-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/crm.dtd
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/pacemaker.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/rule-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/score.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/nvset-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/upgrade06.xsl
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/pacemaker-1.0.rng
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/resources-1.0.rng
pacemaker.x86_64: E: non-standard-dir-perm /var/run/crm 0750
pacemaker.x86_64: E: script-without-shebang /usr/share/pacemaker/crm-transitional.dtd
pacemaker.spec:166: E: hardcoded-library-path in /usr/lib/ocf
pacemaker.spec:167: E: hardcoded-library-path in /usr/lib/ocf/resource.d
pacemaker.spec:168: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker
4 packages and 1 specfiles checked; 16 errors, 6 warnings.
Comment 4 Andrew Beekhof 2009-07-20 11:09:52 EDT
Oh, and I forgot to mention that it no longer needs an updated version of corosync to compile.
The current one from rawhide is sufficient.
Comment 5 Andrew Beekhof 2009-07-24 05:41:56 EDT
Another update:
- Include an AUTHORS and license file in each package
- Change the library package name to pacemaker-libs to be more Fedora compliant
- Remove execute permissions from xml related files
- Update the tarball from upstream to version c9120a53a6ae
- Reference the new cluster-glue devel package name

SPEC: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker.spec
SRPM: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker-1.0.4-3.fc12.src.rpm

Current rpmlint output follows:

[beekhof@rawhide pacemaker]$ rpmlint /home/beekhof/rpmbuild/RPMS/x86_64/pacemaker-*.rpm pacemaker.spec 
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/pengine 0750
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/heartbeat/crm 0750
pacemaker.x86_64: E: non-standard-dir-perm /var/run/crm 0750
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libcrmcluster.so.1.0.0 exit@GLIBC_2.2.5
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libpengine.so.3.0.0 exit@GLIBC_2.2.5
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libcib.so.1.0.1 exit@GLIBC_2.2.5
pacemaker.spec:177: E: hardcoded-library-path in /usr/lib/ocf
pacemaker.spec:178: E: hardcoded-library-path in /usr/lib/ocf/resource.d
pacemaker.spec:179: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker
4 packages and 1 specfiles checked; 6 errors, 3 warnings.

All remaining errors/warnings are discussed in the initial description.
Comment 6 Andrew Beekhof 2009-07-28 04:00:49 EDT
Another update:
- Incorporate the feedback from the cluster-glue review
- Realistically, the version is a 1.0.5 pre-release
- Use the global directive instead of define for variables
- Use the haclient/hacluster group/user instead of daemon
- Use the _configure macro
- Fix install dependancies

SPEC: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker.spec
SRPM: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker-1.0.5-4.c9120a53a6ae.hg.fc12.src.rpm

Current rpmlint output:
[beekhof@rawhide pacemaker]$ rpmlint pacemaker.spec /home/beekhof/rpmbuild/RPMS/x86_64/p*.rpm 
pacemaker.spec:179: E: hardcoded-library-path in /usr/lib/ocf
pacemaker.spec:180: E: hardcoded-library-path in /usr/lib/ocf/resource.d
pacemaker.spec:181: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker
pacemaker.x86_64: W: non-standard-uid /var/lib/pengine hacluster
pacemaker.x86_64: W: non-standard-gid /var/lib/pengine haclient
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/pengine 0750
pacemaker.x86_64: W: non-standard-uid /var/lib/heartbeat/crm hacluster
pacemaker.x86_64: W: non-standard-gid /var/lib/heartbeat/crm haclient
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/heartbeat/crm 0750
pacemaker.x86_64: W: non-standard-uid /var/run/crm hacluster
pacemaker.x86_64: W: non-standard-gid /var/run/crm haclient
pacemaker.x86_64: E: non-standard-dir-perm /var/run/crm 0750
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libcrmcluster.so.1.0.0 exit@GLIBC_2.2.5
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libpengine.so.3.0.0 exit@GLIBC_2.2.5
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libcib.so.1.0.1 exit@GLIBC_2.2.5
4 packages and 1 specfiles checked; 6 errors, 9 warnings.
Comment 7 Andrew Beekhof 2009-07-28 12:36:57 EDT
Add a leading zero to revision when alphatag is used.

SRPM http://oss.clusterlabs.org/~beekhof/fedora/pacemaker-1.0.5-0.5.c9120a53a6ae.hg.fc12.src.rpm
SPEC  http://oss.clusterlabs.org/~beekhof/fedora/pacemaker.spec
Comment 8 Kevin Fenzi 2009-07-28 12:41:03 EDT
Removing needsponsor here, as I am sponsoring the submitter.
Comment 9 Andrew Beekhof 2009-07-29 06:33:57 EDT
Now that cluster-glue is in, I can do proper builds (which showed up a couple of problems).

Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=1562151
SPEC: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker.spec 
SRPM: http://oss.clusterlabs.org/~beekhof/fedora/pacemaker-1.0.5-0.6.c9120a53a6ae.hg.fc12.src.rpm
Comment 10 Fabio Massimo Di Nitto 2009-07-30 03:28:53 EDT
rpmlint output:

pacemaker.src:184: E: hardcoded-library-path in /usr/lib/ocf
pacemaker.src:185: E: hardcoded-library-path in /usr/lib/ocf/resource.d
pacemaker.src:186: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker
pacemaker.src: W: mixed-use-of-spaces-and-tabs (spaces: line 29, tab: line 3)
pacemaker.x86_64: W: non-standard-uid /var/lib/pengine hacluster
pacemaker.x86_64: W: non-standard-gid /var/lib/pengine haclient
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/pengine 0750
pacemaker.x86_64: W: non-standard-uid /var/lib/heartbeat/crm hacluster
pacemaker.x86_64: W: non-standard-gid /var/lib/heartbeat/crm haclient
pacemaker.x86_64: E: non-standard-dir-perm /var/lib/heartbeat/crm 0750
pacemaker.x86_64: W: non-standard-uid /var/run/crm hacluster
pacemaker.x86_64: W: non-standard-gid /var/run/crm haclient
pacemaker.x86_64: E: non-standard-dir-perm /var/run/crm 0750
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libcrmcluster.so.1.0.0 exit@GLIBC_2.2.5
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libpengine.so.3.0.0 exit@GLIBC_2.2.5
pacemaker-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libcib.so.1.0.1 exit@GLIBC_2.2.5

All of the above have been discussed and properly explained. I have no objections to those. Might be nice to fix the mixed-use-of-spaces-and-tabs that was recently introduced but for sure it's not a blocker.

OK - Package meets naming and packaging guidelines
OK - Spec file matches base package name.
OK - Spec has consistant macro usage.
OK - Meets Packaging Guidelines.
OK - License (GPLv2+ and LGPLv2+)
OK - License field in spec matches
See below - License file included in package
OK - Spec in American English
OK - Spec is legible.
See below - Sources match upstream md5sum:
0737aaf01c73868fe006b4880ef2776e  c9120a53a6ae.tar.gz
0737aaf01c73868fe006b4880ef2776e  c9120a53a6ae.tar.gz.1
OK - BuildRequires correct
OK - Package has %defattr and permissions on files is good.
OK - Package has a correct %clean section.
OK - Package has correct buildroot.
OK - Package is code or permissible content.
OK - Packages %doc files don't affect runtime.
OK - Package has rm -rf RPM_BUILD_ROOT at top of %install.

OK - Headers/static libs in -devel subpackage.
OK - Spec has needed ldconfig in post and postun.
OK - .so files in -devel subpackage.
OK - -devel package Requires: %{name} = %{version}-%{release}.
OK - .la files are removed.

OK - Package compiles and builds on at least one arch.
http://koji.fedoraproject.org/koji/taskinfo?taskID=1565197
OK - Package has no duplicate files in %files.
OK - Package doesn't own any directories other packages own.
OK - Package owns all the directories it creates.
OK - Package obey's FHS standard (note execptions have been discussed and agreed upon).
OK - final provides and requires are sane.

SHOULD Items:

OK - Should build in mock.
NOTE: My mock doesn't work. Tested with koji scratch build and local build (see logs above)
OK - Should build on all supported archs.
(as above)
OK - Should have subpackages require base package with fully versioned depend.
OK - Should have dist tag.
OK - Should package latest version.
OK - Should not use file requires outside of /etc, /bin, /sbin, /usr/bin, or
/usr/sbin.

Good to go.
Comment 11 Andrew Beekhof 2009-07-30 03:34:20 EDT
New Package CVS Request
=======================
Package Name: pacemaker 
Short Description: Advanced High Availability cluster manager
Owners: beekhof
Branches:
InitialCC: lon fabbione
Comment 12 Jason Tibbitts 2009-07-30 18:52:33 EDT
CVS done.
Comment 13 Andrew Beekhof 2009-07-31 02:01:44 EDT
Built and tagged: http://koji.fedoraproject.org/koji/buildinfo?buildID=124937
Closing.  Thanks all!

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