On RHEL 8, we have no pip but we have pip3, so we need to adapt the
pip detection and setup to this.
This also requires taking into account a new possible location for
packstack.rst, under /usr/local/share.
Change-Id: I3b93449fb4b7faabb15a8b186d2be1c174b754b6
We were only depending on setuptools for runtime to use pkg_resources,
so we could fetch the path to the rst documentation in certain cases
(mainly during development). We can figure out that path using
other means, so we do not depend on setuptools anymore.
Closes-Bug: #1713950
Change-Id: I9c0f676ac2219001118f7191a6e5c8faee3312c4
Refactor setup.py using Python Build Reasonableness[1]
as a standard for OpenStack projects.
[1] http://docs.openstack.org/developer/pbr/
Closes-Bug: #1559150
Change-Id: Ie3b3845f11236f5338228690418760599914cce4
Previously, the dependencies for the openstack-puppet-modules and
openstack-packstack-puppet RPMs were being manually resolved and
installed in any non-installer node (usually the controller). Since
Newton, the OPM package is a meta-package, that includes all the
puppet-* packages as dependencies. In this context, Packstack would
try to install all puppet-* packages in all nodes, which is not
needed and causes issues.
We are solving this by removing the dependency resolution code, adding
a new array to include OPM dependencies (only rubygem-json as of now)
and installing them when needed. Note that, if a dependency is added
to any puppet package, it will have to be added to Packstack as well.
CI will notify us, though.
Change-Id: I54d0c0296c0b57946e7af1f7fd13dae35c1c1a36
This maintains the intended functionality while simultaneously
allowing to copy or move the folder somewhere else.
Otherwise, if I copy /var/tmp/packstack elsewhere, the symlink
will keep pointing to /var/tmp/packstack.
Change-Id: I7da0af24dbccb14d1f7fb1d75079ac109e981882
Apply patch from David Xie (davidx@fedoraproject.org) to add
/var/tmp/packstack/latest symbolic link pointing to latest packstack
log dir.
Closes-Bug: rhbz#1051828
Change-Id: I1d931a073234b6ebd01d1505e4606f377b537b45
This patch implements translation from CIDR to interface name,
which should allow deployments to heretogenous infrastructure.
Package openstack-packstack-puppet will need new require,
which is rubygem-ippaddress.
Workaround for rhbz#1200604
Change-Id: Id27881f616781e5a24a1bdb1e169915b7619eebd
This patch improves hosts' discovery logic by using Facter to do the work.
Original code was taken from Kanzo (https://github.com/paramite/kanzo)
Prerequisite for fixing rhbz#1200604
Change-Id: I8de024e55679d70a5d16f48df51337ebfea37514
* H102 Apache 2.0 license header not found
* H232 Python 3.x incompatible octal xxx should be written as 0oxxx
* H233 Python 3.x incompatible use of print operator
* H301 one import per line
* H904 Wrap long lines in parentheses instead of a backslash
Change-Id: I07003acb76eaa719daabc451239067494efa2bba
* E122 continuation line missing indentation or outdented
* E126 continuation line over-indented for hanging indent
* E127 continuation line over-indented for visual indent
* E128 continuation line under-indented for visual indent
* E131 continuation line unaligned for hanging indent
* E303 too many blank lines
* W601 .has_key() is deprecated, use 'in'
* H234 assertEquals is deprecated, use assertEqual
* H401 docstring should not start with a space
* H402 one line docstring needs punctuation.
Change-Id: I1c264dba19bfe7cb9173e8999429827bd026b930
* F401 module imported but unused
* E271 multiple spaces after keyword
* E272 multiple spaces before keyword
* E202 remove extraneous whitespace
* E711 comparison to None should be 'if cond is None:'
* E712 comparison to True/False should be 'if cond is True/False:' or 'if cond:'
Change-Id: I56a1dbee2ae17b8315a55215e2c676e0de8311f7
Instead of 'Welcome to Installer setup utility' it should be
'Welcome to the Packstack setup utility'.
Change-Id: I698d17645f4a53ce738be5ea463335466408ed6e
Packstack configures Hiera as data backend. Packstack puppet templates are now
using hiera() and hiera_array() functions to fetch data from hiera backend.
Packstack generates a defaults.yaml file in the /var/tmp/packstack directory.
Firewall rules for each openstack components are inserted into the hiera
backend as hash and created by the create_resources function.
Change-Id: Iab553a71264b0fc0f26d33a6304b545ad302f664
Fixes: rhbz#1145223
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
According to https://docs.python.org/3/howto/pyporting.html the
syntax changed in Python 3.x. The new syntax is usable with
Python >= 2.6 and should be preferred to be compatible with Python3.
Change-Id: I4a951aecc32ef9e5131da236ae4815b84897d67b
- creates keystonerc_admin for user running Packstack
in case OpenStack client host is the host where packstack
is running (eg. all-in-one installation)
Change-Id: I37be40de46f54c78c934a27bc3f5e3c9381e7f19
Fixes: rhbz#964005, rhbz#976394
- cleaned from useless functions
- refactored to be pep8 compliant
- separated to standalone modules
- added unit tests
Change-Id: If5a300fe04efab9e13549f2b4d05c1b28e2e40c6
This test effectivly runs all of the python code ran by
packstack --install-hosts=127.0.0.1 --os-swift-install=y \
--nagios-install=y
It is a fairly wide net but boost code coverage of the packstack
python code to about 85%, more finer grained tests should also be
Added to target speficic test cases.
Popen is replaced in PackstackTestCaseMixin so no actual commands get
run on the host running the unit tests
Change-Id: Ie5208394d6eb6034a3044014ffc35482805e41fd
The temp directory packstack was using was being created in
an insecure manor with world readable permissions. This commit ensures
temp directories are created securly on both the local and remote
hosts
o Create var directory with tempfile.mkdtemp
o remove other places where var directory was created
o change permissions of all files that do (or may) contain
sensitive data to 600
o No longer append data to mainifest file, it is now created and
writen out in once
o Attempts to remove data on remote hosts after the packstach run
CVE-2013-0261
https://bugzilla.redhat.com/show_bug.cgi?id=908101
Change-Id: Ie7105207d3da128d630628c1df037ffafc94beb8
Collect all packstack's logs in a subdirectory called packstack and use
a '%Y%m%d-%H%M' formated datetime instead of a uuid for folder names.
Fixes bz#888360
Change-Id: Ib5a3bcc74e7819c3c3ee43d2b790922fad358e40