RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1361581 - Review Request: openstack-tripleo-validations
Summary: Review Request: openstack-tripleo-validations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: RDO
Classification: Community
Component: Package Review
Version: trunk
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: trunk
Assignee: Alan Pevec
QA Contact: hguemar
URL:
Whiteboard:
Depends On:
Blocks: RDO-NEWTON 1368442
TreeView+ depends on / blocked
 
Reported: 2016-07-29 12:49 UTC by Martin André
Modified: 2017-06-18 13:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1368442 (view as bug list)
Environment:
Last Closed: 2017-06-18 13:39:41 UTC
Embargoed:
apevec: rdo-review+


Attachments (Terms of Use)
Latest SRPM (23.93 KB, application/x-rpm)
2016-08-24 06:37 UTC, Martin André
no flags Details
Latest SRPM (23.90 KB, application/x-rpm)
2016-08-24 07:12 UTC, Martin André
no flags Details

Description Martin André 2016-07-29 12:49:01 UTC
Spec URL: https://tokyo.mandre.org/~martin/packaging/openstack-tripleo-validations.spec
SRPM URL: https://tokyo.mandre.org/~martin/packaging/openstack-tripleo-validations-0.0.1-1.fc24.src.rpm
Description: A collection of Ansible playbooks to detect and report potential issues during TripleO deployments.

Comment 1 Martin André 2016-07-29 14:15:13 UTC
I've moved the spec file to https://github.com/mandre/tripleo-validations-packaging, I figured it would be easier to respond to feedback if I versionate my changes.

Added html documentation and test subpackage.

Comment 2 Chandan Kumar 2016-08-01 05:01:43 UTC
Hello Martin,

Thanks for submitting for Package Review:

Below is my comments:

[1.] Replace Version: and Release: fields to 'XXX' as dlrn takes both of these from the tags set on the git repositories

[2.] include python-pbr and python-setuptools to Requires also.

[3.] remove this line rm -rf *.egg-info, please do not delete egg files, it contains text fixtures which does not get copied under %{python2_sitelib}/<pypi_module>/tests folders.

[4.] please include Build Requires and Requires for openstack-tripleo-validations-tests based on packages present in test-requirements.txt

and also include Requires: %{name} = %{version}-%{release}

[5.] include
%check
%{__python2} setup.py testr to run the tests while building the rpms.

[6.] For Building Documentation you can simply use:

Add this line above in the spec file:
%global with_doc %{!?_without_doc:1}%{?_without_doc:0}

# docs generation
export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
%if 0%{?with_doc}
SPHINX_DEBUG=1 sphinx-build -b html source build/html
# Fix hidden-file-or-dir warnings
rm -fr build/html/.doctrees build/html/.buildinfo
%endif
popd 

[7.] Since docs are not so big, please include it under %files section
as %doc doc/build/html

[8.] Include egg files in %files section

%{python2_sitelib}/*-*.egg-info

[9.] These two lines are not required:
%{_datadir}/%{name}
+%{_defaultdocdir}/%{name}

Rest looks ok to me.

Thanks,

Chandan Kumar

Comment 3 Martin André 2016-08-01 06:55:48 UTC
Thanks Chandan for the very thorough review. I've created the tripleo-validations spec file based on the one of tripleo-common and other information I could find on RDO website but apparently missed quite a few things.

(In reply to Chandan Kumar from comment #2)
> Hello Martin,
> 
> Thanks for submitting for Package Review:
> 
> Below is my comments:
> 
> [1.] Replace Version: and Release: fields to 'XXX' as dlrn takes both of
> these from the tags set on the git repositories

Done.
https://github.com/mandre/tripleo-validations-packaging/commit/51b40f927d1420512ae664eb559395ac29620763

> [2.] include python-pbr and python-setuptools to Requires also.

Done.
https://github.com/mandre/tripleo-validations-packaging/commit/1b2908852128a3cac84bda1815c0b630ae364df4

> [3.] remove this line rm -rf *.egg-info, please do not delete egg files, it
> contains text fixtures which does not get copied under
> %{python2_sitelib}/<pypi_module>/tests folders.

Done.
https://github.com/mandre/tripleo-validations-packaging/commit/1308d380d422c00fc03d29550fb46d84458ec2f3

> [4.] please include Build Requires and Requires for
> openstack-tripleo-validations-tests based on packages present in
> test-requirements.txt

I'm not too sure about what should be in Requires and BuildRequires for the test package. I've looked at other spec files but couldn't find a package in RDO which has more than the "Requires: %{name} = %{version}-%{release}" line.

> and also include Requires: %{name} = %{version}-%{release}

Done.
https://github.com/mandre/tripleo-validations-packaging/commit/5604bfcde9fe428b56e9ffb8a2ced2abc2462c68

> [5.] include
> %check
> %{__python2} setup.py testr to run the tests while building the rpms.

Done.
https://github.com/mandre/tripleo-validations-packaging/commit/49d33ac3681a86028e7b2b21c1137017b42c5842

> [6.] For Building Documentation you can simply use:
> 
> Add this line above in the spec file:
> %global with_doc %{!?_without_doc:1}%{?_without_doc:0}
> 
> # docs generation
> export PYTHONPATH="$( pwd ):$PYTHONPATH"
> pushd doc
> %if 0%{?with_doc}
> SPHINX_DEBUG=1 sphinx-build -b html source build/html
> # Fix hidden-file-or-dir warnings
> rm -fr build/html/.doctrees build/html/.buildinfo
> %endif
> popd 

Done.
https://github.com/mandre/tripleo-validations-packaging/commit/4f442b3fe76c38551fddf7809e60e4eb321fbfd3

> [7.] Since docs are not so big, please include it under %files section
> as %doc doc/build/html
> 
> [8.] Include egg files in %files section
> 
> %{python2_sitelib}/*-*.egg-info
> 
> [9.] These two lines are not required:
> %{_datadir}/%{name}
> +%{_defaultdocdir}/%{name}

7, 8, and 9 done in https://github.com/mandre/tripleo-validations-packaging/commit/5223b90950d0aa04ac43b21589fd3afdfe8bf562

> Rest looks ok to me.
> 
> Thanks,
> 
> Chandan Kumar

Comment 4 Martin André 2016-08-02 12:37:53 UTC
Just a little update: I was able to successfully build tripleo-validations package with spec file at https://raw.githubusercontent.com/mandre/tripleo-validations-packaging/bde878b7482eac1945e76d7348c16a01b4a9bde6/openstack-tripleo-validations.spec

I needed https://review.openstack.org/#/c/322178/ in tripleo-validations though, otherwise the build fails due to missing /usr/share/openstack-tripleo-validations directory.

Comment 5 Jason E. Rist 2016-08-17 13:32:24 UTC
Martin it looks like 322178 was merged, what's the next step?

Comment 6 Tomas Sedovic 2016-08-19 14:51:26 UTC
Jason, that just means the package should build cleanly now.

Is there anything else we ought to do/fix or do we just wait?

Comment 7 Mike Burns 2016-08-19 15:08:42 UTC
Haikel/Chandan,  anything else we need on this?

Comment 8 Chandan Kumar 2016-08-24 04:47:57 UTC
Hello Martin,

The specs looks good now.
Please attach the latest srpm to this bug for further review.

Thanks,

Chandan Kumar

Comment 9 Chandan Kumar 2016-08-24 04:58:07 UTC
Hello Martin,

[1.] some more correction in the spec file,
Documentation size is 675840 bytes in 51 files. so we need to add a doc subpackage, we need to move files under this package.

[2.] Some rpmlint errors on packages:
openstack-tripleo-validations.noarch: E: zero-length /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-post-deployment.txt
openstack-tripleo-validations.noarch: E: zero-length /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-pre-deployment.txt

https://fedoraproject.org/wiki/Common_Rpmlint_issues#zero-length this link will help to fix it.

Thanks,

Chandan Kumar

Comment 10 Martin André 2016-08-24 06:37:12 UTC
Created attachment 1193490 [details]
Latest SRPM

Comment 11 Martin André 2016-08-24 06:46:47 UTC
(In reply to Chandan Kumar from comment #9)
> Hello Martin,
> 
> [1.] some more correction in the spec file,
> Documentation size is 675840 bytes in 51 files. so we need to add a doc
> subpackage, we need to move files under this package.

These are almost entirely due to the html format of the doc (static assets generated automatically). Can we consider switching to a text format to reduce the size and avoid creating a doc subpackage?

> [2.] Some rpmlint errors on packages:
> openstack-tripleo-validations.noarch: E: zero-length
> /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-post-
> deployment.txt
> openstack-tripleo-validations.noarch: E: zero-length
> /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-pre-
> deployment.txt

These files are needed. They are sourced by the README file and were introduced in https://github.com/openstack/tripleo-validations/commit/7456102348bef7535a82338acab631bd4999397f

Comment 12 Martin André 2016-08-24 07:12:08 UTC
Created attachment 1193491 [details]
Latest SRPM

Comment 13 Chandan Kumar 2016-08-25 12:26:05 UTC
Hello Martin,

I have added the doc subpackage, tripleo-validation executables and fixed rpmlints in this review https://github.com/mandre/tripleo-validations-packaging/pull/1 

Please have a look.

Thanks,

Chandan Kumar

Comment 14 Martin André 2016-08-25 12:47:21 UTC
Hi Chandan, I confirm the changes you made look good to me. Thanks a lot.

Comment 15 Chandan Kumar 2016-08-26 12:01:58 UTC
Hello Martin,

Thanks for the changes, The spec file looks ok to me.

Please make sure the current generated rpms for this spec file works properly.

@hguemar, please have a look, anything more needed for further package approval.

Thanks,

Chandan Kumar

Comment 16 Martin André 2016-08-26 12:10:36 UTC
The RPM built with spec at https://raw.githubusercontent.com/mandre/tripleo-validations-packaging/master/openstack-tripleo-validations.spec works as expected.

Thanks,
Martin

Comment 17 Alan Pevec 2016-08-31 21:54:44 UTC
spec is good for the initial import, after project is created in review.rdoproject.org

Comment 18 Haïkel Guémar 2016-09-01 00:51:00 UTC
Ok, builds and runs correctly.
Few items needs to be fixed before approval:
* Provides/Obsoletes: tripleo-validations is useless, this is a new package, we're just messing up RPM dep solver for free.
* doc generation must be moved to %build
* use $PWD instead of forking shell with $( pwd)

Comment 20 Alan Pevec 2016-09-01 09:22:36 UTC
Let's import this latest spec into review.rdoproject.org and continue commenting there, I've few more nitpicks but it's not worth blocking initial review here.
IMHO we should import initial spec as soon as basic licensing check is done then iterate in the initial gerrit review (step 3. in https://www.rdoproject.org/documentation/rdo-packaging/#how-to-add-a-new-package-to-rdo-trunk )

Comment 21 Alan Pevec 2016-09-08 18:01:57 UTC
Available for testing in the RDO Newton3 testing repo:
http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-master-tested/openstack-tripleo-validations-5.1.1-0.20160907135818.3652f12.el7.centos.noarch.rpm

How-to-test steps from https://etherpad.openstack.org/p/rdo-test-days-newton-m3

* install openstack-tripleo-validations package on the undercloud
* source ~/stackrc
* ansible-playbook -i /bin/tripleo-ansible-inventory /usr/share/openstack-tripleo-validations/validations/some_validation.yaml

Comment 22 Christopher Brown 2017-06-18 13:39:41 UTC
This landed so closing.


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