Small cleanups:
* Use openstack-lower-constraints-jobs template, remove individual
jobs.
* Sort list of templates
Change-Id: Ib24ffd7701d8e7e88fb6c6ab9854244a4a656687
Needed-By: https://review.openstack.org/623229
This patch fixes the bug tracker link in the readme. It is set to
depend on a job definition change in project-config so we can use this
patch to test the new release jobs.
Change-Id: I6dad9b1d6499d615c60d3c23b5cd8c44040abddd
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
So we should switch to stestr.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I14ae3879465e622f36fd7bba3f04cb6e0cb7500e
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ic4a3b28cb670c71fb205640a9a9338bbcf9bc9bf
Conform to the PTI for docs builds, add lower-constraints jobs, and use
upper-constraints instead of synced global requirements constraints.
Change-Id: Iaf1b54b35d02dbb733c7782b178e4eb774c02ef6
We are stuck on a very old version of hacking (0.8). In order to move
forward, we need to fix a bunch of things that flake8 will complain about.
Change-Id: If40ac29094b90c5bae63e7423061a190655f50a3
The Oslo team has moved all previously incubated code from the
'openstack/oslo-incubator' repository into separate library
repositories and released those libraries to the Python Package,
so the directory should be removed.
Change-Id: I0ee30c36e87970bc1b1175230a1bffa27e0b3e09
LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.
Change-Id: I6e8df0e072448fbd4077c4e5d98b2986e9855489
Closes-Bug:#1508442
Initialized logger with default value of NOTSET.
Added if statement to handle verbose argument and set the logger to
DEBUG.
Change-Id: I997b8b964dade013db265d088d00ccfdd6ab030e
Closes-Bug: #1269465
argparse was external in python 2.6 but not anymore, remove it from
requirements.
This should help with pip 8.0 that gets confused in this situation.
Installation of the external argparse is not needed.
Change-Id: Ib7e74912b36c1b5ccb514e31fac35efeff57378d
Python 2.6/3.3 support would be dropped by Infra team from mitaka,
CI would no longer be testing it, so projects should drop it too.
Change-Id: I13250170bd04d07b97990ed52a8c7a0c0f7e76c6
Closes-Bug: #1526170
OpenStack projects are no longer being tested under Python 2.6, so
remove the trove classifier implying that this project supports 2.6.
Change-Id: I1f8cc2d5d25a2e00b7ad4d12b013b69695536ab8
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.
Change-Id: Id0d2de40081a59d5819d2e6c52c98135f26808b5
Closes-bug: #1489059
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.
Change-Id: Ic2dca04e7cdd4f837c42b39dd1ce37604c8f101b
Closes-bug: #1280522
Commands from AWS::CloudFormation::Init, when supplied as list, should
be run with shell=False. Only when commands are given as string, they
are meant to be run on shell.
In principle, we are trying to give least access to the shell to avoid
any inadvertent shell injections.
Change-Id: I3dc6fe0c29a14f75be044846f737e1ade23a6d6b
Closes-Bug: 1498300
Make all internal commands as list to avoid any possibility of command
line injection. Commands supplied as string are susceptible to
substitution.
All the internal commands are supplied as list to CommandRunner. As a
convention, all the commands must be given as list to subprocess except
the commands read from file, like in case of cfn hooks and commands
section in metadata.
Few internal commands require shell redirects and they will be
implemented in another patch.
Change-Id: Ifabaf44e341144bc85508dc05c76b1d83e41ae44
Partial-Bug: #1312246
Control the privileges by setting the effective UID before running the
command. Earlier we used to run command using su -c "USER".
Original EUID is restored after running the command. This is required to
run multiple commands in succession with different run-as users.
Change-Id: I414fc6a802f11deb320b43c6d011f802a42c40c9
Partial-Bug: #1312246
This reverts commit e424af2236ed1d6e6d0e11768f873ffe4e696221.
Splitting command strings that were previously assumed to be interpreted
by the shell at whitespace and then passing them as separate args to
execvp will not work.
Change-Id: I7c37b5852ce9b20e63bdbbaddfb852463548aa90
Remove the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.
This helps ensure that the _ from i18n is used.
Activating this check did not flag any violations.
Change-Id: Ibb457fc16b64ead1acbf359531ecd79e624df8ab
The CommandRunner used to run commands using su command and passing the
actual command to be run as argument to it.
su USER -c <cmd>
This is susceptible to command line injection as noted in the bug.
The fix required to do two things:
1. Pass the command to be run as list instead of a string. This is to
ensure that the actual arguments are passed as arguments to the program
ought to be executed. And by doing so, avoids running any commands
passed in the argument. On the contrary, if the command were passed as a
string to the shell, the arguments could be formed in a way to execute
malicious commands.
2. The CommandRunner runs the command directly and uses setuid to lower
the privileges if needed. If the 'runas' user is other than root, then
its UID is obtained and setuid is invoked to set the real user-id and
effective user-id to the given user.
Change-Id: I654117e994fd38411508dbe9b85d06c28dc0e411
Closes-Bug: #1312246
cfn-signal will not work when heat-cfn-api server is configured
for the https. This patch will provide a option to make a insecure
request to the cfn server.
Change-Id: I9dcd53b40a389811e292c331ff625a8b5af827b7
Closes-Bug: 1460007
* ConfigParser import from six
* Drop iteritems()
* To support both Python 2 and 3
* Encode string before writing it to file
* To support both Python 2 and 3
* Use six.string_types
* To support both Python 2 and 3
* Use key on Python 3
* Because cmp is no longer working
* Add py33 and py34 to tox.ini
Change-Id: I23985be55302cd4ef577919efb51975ecbd9563d
Related-Bug: 1347899