RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1347193 - Openstack Watcher service
Summary: Openstack Watcher service
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: Package Review
Version: Mitaka
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: trunk
Assignee: Javier Peña
QA Contact: hguemar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-16 09:33 UTC by Daniel Pawlik
Modified: 2017-06-18 07:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-18 07:53:25 UTC
Embargoed:
jpena: rdo-review+


Attachments (Terms of Use)

Comment 1 Javier Peña 2016-06-16 15:54:10 UTC
Hi Daniel,

Thank you for your submission. I have some comments on the current spec:

- Package summary doesn't seem to correspond to the Watcher project (copy/paste from mistral maybe?)

- Please remove Conflict: and lines requiring a package version < X.Y from the requirements. We take care of that in the repo configuration rather than in the spec file, as it can create issues there (check https://trunk.rdoproject.org/centos7/current/ for the current package versions in trunk).

- In the %build and %install sections, please use {__python2} instead of {__python}. You could also use the %py2_build and %py2_install macros to simplify.

- I'm not very sure about the -all subpackage. Is it meant to be a meta-package to install the -api, -applier and -decision-engine packages? If so, it should require them, because -common will not fetch them automatically.

- Please remove the %clean section, it's not needed.

- (nitpick): there are several lines with just a dot. They can be removed, I guess.

- For the upstream_version define, we will need to use a different one once it is imported in DLRN, but it is fine for now.

Also, I have a question about the documentation. I see it is disabled due to the absence of python-sphinxcontrib-pecanwsme. Is that the only needed package in CentOS? It's already available in Fedora, so we could get it imported in CBS.

Comment 2 Javier Peña 2016-06-16 15:55:44 UTC
Also, as a side note. Since we use fedora-review to automate some review tasks, it requires the links to be directly downloadable, i.e. we'd need https://raw.githubusercontent.com/dduuch/openstack-watcher-rpm/master/openstack-watcher.spec and https://github.com/dduuch/openstack-watcher-rpm/blob/master/openstack-watcher-0-27.0.src.rpm?raw=true to be listed.

Comment 3 Daniel Pawlik 2016-06-16 22:23:17 UTC
I modeled watcher specs on Openstack Mistral specs, but it was not just copy/paste ;)

Package description -> changed. 

As I see in debian control files (https://ftp-master.debian.org/new/watcher_0.27.0-2.html) dependencies are the same:

watcher-api require watcher-common,
watcher-applier require watcher-common,
watcher-decision-engine require watcher-common,
watcher-common require python-watcher
python-watcher require some dependencies.

They didn't have watcher-all, but as I see in another RPM specs for Openstack projects, subpackage -all it often occurs.

I will add -api, -applier, -decision-engine as a depencies to -all subpackage. 



About python-sphinxcontrib-pecanwsme that was copied from Openstack Mistral specs. Watcher service require this package, so if you can export it, it would be great ;)

"- (nitpick): there are several lines with just a dot. They can be removed, I guess." - I can't find them. I check it tomorrow.

Comment 4 Javier Peña 2016-06-17 15:05:09 UTC
Hi Daniel,

I've checked the latest spec in the github repo. Just for the record, the URLs are:

SPEC: https://raw.githubusercontent.com/dduuch/openstack-watcher-rpm/master/openstack-watcher.spec
SRPM: https://github.com/dduuch/openstack-watcher-rpm/blob/master/openstack-watcher-0-27.0.src.rpm?raw=true

I have found some more details to polish:

- The -all subpackage does not get created when building the package. I see an empty openstack-watcher package, but it does not have the proper dependencies. I think the way to fix it is to change the first %files entry to be "%files all". Alternatively, we could ditch the -all subpackage and add the dependencies to the main package (openstack-watcher).

- The python subpackage is called "python-openstack-watcher" when it should be "python-watcher".

- Going through the dependencies, I see some versions are not available in the dependencies repo. For now, could you remove the version requirement, and just leave the package for the following:

  * python-voluptuous
  * python-stevedore

If we later find the newer versions are needed, they'll be added to the dependencies repo.

- Also, I just realized there are some hardcoded directories in the %install section: /etc, /var/log, /var/run and /usr/bin. We should use the corresponding macros: %{_sysconfdir}, %{_localstatedir}/log, %{_localstatedir}/run and %{_bindir}

I think that should be all we need to fix (besides enabling doc build once the missing package is ready).

Comment 5 Daniel Pawlik 2016-06-20 09:02:54 UTC
Subpackage -all can be removed.
All of the above suggestions have been repaired and pushed into my github account.


SPEC: https://raw.githubusercontent.com/dduuch/openstack-watcher-rpm/master/openstack-watcher.spec
SRPM: https://raw.githubusercontent.com/dduuch/openstack-watcher-rpm/master/openstack-watcher-0-27.0.src.rpm

Comment 6 Javier Peña 2016-06-20 10:45:22 UTC
This is the result of the fedora-review output:

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines
- Dist tag is present.
- Package contains BR: python2-devel or python3-devel


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Apache (v2.0)", "Unknown or generated", "*No copyright* Apache
     (v2.0)". 20 files have unknown license. Detailed output of
     licensecheck in /tmp/1347193-openstack-watcher/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/systemd/system,
     /usr/lib/python2.7/site-packages/watcher, /usr/lib/systemd
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[x]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: %config files are marked noreplace or the reason is justified.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: No %config files under /usr.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[x]: Sources can be downloaded from URI in Source: tag
     Note: Could not download Source0:
     http://tarballs.openstack.org/watcher/python-watcher-0.27.0.tar.gz
     See: http://fedoraproject.org/wiki/Packaging:Guidelines#Tags
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[ ]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in python-
     watcher , openstack-watcher-common , openstack-watcher-api ,
     openstack-watcher-applier , openstack-watcher-decision-engine ,
     python-watcher-tests , python-watcher-tempest-plugin
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Scriptlets must be sane, if used.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Files in /run, var/run and /var/lock uses tmpfiles.d when appropriate
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[x]: Spec file according to URL is the same as in SRPM.


Installation errors
-------------------
INFO: mock.py version 1.2.17 starting (python version = 3.4.3)...
Start: init plugins
INFO: tmpfs initialized
INFO: selinux enabled
Finish: init plugins
Start: run
Start: chroot init
INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64/root.
INFO: reusing tmpfs at /var/lib/mock/fedora-rawhide-x86_64/root.
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
Mock Version: 1.2.17
INFO: Mock Version: 1.2.17
Finish: chroot init
INFO: installing package(s): /tmp/1347193-openstack-watcher/results/python-watcher-tempest-plugin-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-applier-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-api-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/python-watcher-tests-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/python-watcher-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-decision-engine-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-common-0-27.0.noarch.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 25 --disableplugin=local --setopt=deltarpm=false install /tmp/1347193-openstack-watcher/results/python-watcher-tempest-plugin-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-applier-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-api-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/python-watcher-tests-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/python-watcher-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-decision-engine-0-27.0.noarch.rpm /tmp/1347193-openstack-watcher/results/openstack-watcher-common-0-27.0.noarch.rpm --setopt=tsflags=nocontexts


Rpmlint
-------
Checking: python-watcher-0-27.0.noarch.rpm
          openstack-watcher-common-0-27.0.noarch.rpm
          openstack-watcher-api-0-27.0.noarch.rpm
          openstack-watcher-applier-0-27.0.noarch.rpm
          openstack-watcher-decision-engine-0-27.0.noarch.rpm
          python-watcher-tests-0-27.0.noarch.rpm
          python-watcher-tempest-plugin-0-27.0.noarch.rpm
          openstack-watcher-0-27.0.src.rpm
python-watcher.noarch: W: spelling-error %description -l en_US scalable -> salable, callable, calculable
python-watcher.noarch: W: spelling-error %description -l en_US multi -> mulch, mufti
python-watcher.noarch: W: spelling-error %description -l en_US profiler -> profile, profiles, profiled
python-watcher.noarch: E: no-changelogname-tag
python-watcher.noarch: W: invalid-url URL: https://launchpad.net/watcher HTTP Error 503: Service Temporarily Unavailable
python-watcher.noarch: W: no-documentation
openstack-watcher-common.noarch: W: spelling-error %description -l en_US scalable -> salable, callable, calculable
openstack-watcher-common.noarch: W: spelling-error %description -l en_US multi -> mulch, mufti
openstack-watcher-common.noarch: W: spelling-error %description -l en_US profiler -> profile, profiles, profiled
openstack-watcher-common.noarch: E: no-changelogname-tag
openstack-watcher-common.noarch: W: no-documentation
openstack-watcher-common.noarch: W: non-standard-uid /etc/watcher/policy.json watcher
openstack-watcher-common.noarch: W: non-standard-gid /etc/watcher/policy.json watcher
openstack-watcher-common.noarch: W: non-standard-uid /etc/watcher/watcher.conf watcher
openstack-watcher-common.noarch: W: non-standard-gid /etc/watcher/watcher.conf watcher
openstack-watcher-common.noarch: E: non-readable /etc/watcher/watcher.conf 640
openstack-watcher-common.noarch: W: non-standard-uid /var/log/watcher watcher
openstack-watcher-common.noarch: W: non-standard-gid /var/log/watcher watcher
openstack-watcher-common.noarch: W: non-standard-uid /var/run/watcher watcher
openstack-watcher-common.noarch: W: non-standard-gid /var/run/watcher watcher
openstack-watcher-common.noarch: E: dir-or-file-in-var-run /var/run/watcher
openstack-watcher-common.noarch: W: log-files-without-logrotate ['/var/log/watcher']
openstack-watcher-common.noarch: W: no-manual-page-for-binary watcher-decision-engine
openstack-watcher-common.noarch: W: no-manual-page-for-binary watcher-api
openstack-watcher-common.noarch: W: no-manual-page-for-binary watcher-db-manage
openstack-watcher-common.noarch: W: no-manual-page-for-binary watcher-applier
openstack-watcher-api.noarch: E: no-changelogname-tag
openstack-watcher-api.noarch: W: invalid-url URL: https://launchpad.net/watcher The read operation timed out
openstack-watcher-api.noarch: W: non-etc-or-var-file-marked-as-conffile /usr/lib/systemd/system/openstack-watcher-api.service
openstack-watcher-api.noarch: W: no-documentation
openstack-watcher-applier.noarch: E: no-changelogname-tag
openstack-watcher-applier.noarch: W: non-etc-or-var-file-marked-as-conffile /usr/lib/systemd/system/openstack-watcher-applier.service
openstack-watcher-applier.noarch: W: no-documentation
openstack-watcher-decision-engine.noarch: E: no-changelogname-tag
openstack-watcher-decision-engine.noarch: W: invalid-url URL: https://launchpad.net/watcher The read operation timed out
openstack-watcher-decision-engine.noarch: W: non-etc-or-var-file-marked-as-conffile /usr/lib/systemd/system/openstack-watcher-decision-engine.service
openstack-watcher-decision-engine.noarch: W: no-documentation
python-watcher-tests.noarch: W: summary-not-capitalized C watcher tests
python-watcher-tests.noarch: E: no-changelogname-tag
python-watcher-tests.noarch: W: no-documentation
python-watcher-tempest-plugin.noarch: E: no-changelogname-tag
python-watcher-tempest-plugin.noarch: W: invalid-url URL: https://launchpad.net/watcher The read operation timed out
python-watcher-tempest-plugin.noarch: W: no-documentation
openstack-watcher.src: W: summary-ended-with-dot C Openstack Infrastructure Optimization service.
openstack-watcher.src: E: no-changelogname-tag
openstack-watcher.src: W: invalid-url Source0: http://tarballs.openstack.org/watcher/python-watcher-0.27.0.tar.gz <urlopen error [Errno 111] Connection refused>
8 packages and 0 specfiles checked; 10 errors, 36 warnings.




Requires
--------
openstack-watcher-decision-engine (rpmlib, GLIBC filtered):
    /bin/sh
    config(openstack-watcher-decision-engine)
    openstack-watcher-common

openstack-watcher-applier (rpmlib, GLIBC filtered):
    /bin/sh
    config(openstack-watcher-applier)
    openstack-watcher-common

openstack-watcher-common (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/python2
    config(openstack-watcher-common)
    python-watcher
    systemd

openstack-watcher-api (rpmlib, GLIBC filtered):
    /bin/sh
    config(openstack-watcher-api)
    openstack-watcher-common

python-watcher (rpmlib, GLIBC filtered):
    python(abi)
    python-ceilometerclient
    python-cinderclient
    python-glanceclient
    python-jsonpatch
    python-keystoneauth1
    python-keystoneclient
    python-keystonemiddleware
    python-neutronclient
    python-novaclient
    python-openstackclient
    python-oslo-cache
    python-oslo-concurrency
    python-oslo-config
    python-oslo-context
    python-oslo-db
    python-oslo-i18n
    python-oslo-log
    python-oslo-messaging
    python-oslo-policy
    python-oslo-reports
    python-oslo-service
    python-oslo-utils
    python-paste-deploy
    python-pbr
    python-pecan
    python-prettytable
    python-setuptools
    python-six
    python-sqlalchemy
    python-stevedore
    python-taskflow
    python-voluptuous
    python-webob
    python-wsme

python-watcher-tempest-plugin (rpmlib, GLIBC filtered):
    openstack-watcher-common
    python(abi)

python-watcher-tests (rpmlib, GLIBC filtered):
    openstack-watcher-common
    python(abi)



Provides
--------
openstack-watcher-decision-engine:
    config(openstack-watcher-decision-engine)
    openstack-watcher-decision-engine

openstack-watcher-applier:
    config(openstack-watcher-applier)
    openstack-watcher-applier

openstack-watcher-common:
    config(openstack-watcher-common)
    openstack-watcher-common

openstack-watcher-api:
    config(openstack-watcher-api)
    openstack-watcher-api

python-watcher:
    python-watcher

python-watcher-tempest-plugin:
    python-watcher-tempest-plugin

python-watcher-tests:
    python-watcher-tests



Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1347193 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

The mock install error is expected, as some dependencies are not there in Fedora Rawhide.

The package is APPROVED, please go on with the next step from https://www.rdoproject.org/documentation/rdo-packaging/#how-to-add-a-new-package-to-rdo-trunk . During review, we will make sure the python-sphinxcontrib-pecanwsme package is available.

Comment 7 hguemar 2016-06-20 13:03:52 UTC
small nitpick: python2-devel ;-)

I'm creating the project in review.rdoproject.org

Comment 8 hguemar 2016-06-20 13:38:34 UTC
Projects created, please proceed with rdoinfo review and initial spec import in RDO.

Comment 9 Daniel Pawlik 2016-06-20 14:02:53 UTC
RDO review URL (rdo.yaml file):
https://review.rdoproject.org/r/#/c/1456/

Comment 10 Daniel Pawlik 2016-06-21 07:26:56 UTC
Watcher-distgit code review URL:
https://review.rdoproject.org/r/#/c/1472/

Comment 11 Daniel Pawlik 2016-06-24 19:29:29 UTC
URL to rdoinfo code review:

https://review.rdoproject.org/r/#/c/1538/ 

Added tags: Mitaka and Newton.

Comment 12 Christopher Brown 2017-06-18 07:53:25 UTC
This was landed so closing.


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