Commit Graph

184 Commits (6c242a9e0405e7a72df63b0281a7804de4d2f7ed)

Author SHA1 Message Date
Jeremy Stanley 6c242a9e04 Remove tox locale overrides
* tox.ini: The LANG, LANGUAGE and LC_ALL environment overrides were
introduced originally during the testr migration in an attempt to be
conservative about the possibility that locale settings in the
calling environment could cause consistency problems for test runs.
In actuality, this should be unnecessary and any place where it does
cause issues ought to be considered an actual bug. Also, having
these in the configuration actively causes older pip to have
problems with non-ASCII content in some package metadata files under
Python 3, so drop it now.

Change-Id: I808926b0e3de197cf45dafd40818e755f623433a
Closes-Bug: #1277495
2014-02-10 03:08:07 +00:00
OpenStack Jenkins 2812f01d67 Updated from global requirements
Change-Id: Icfd1ce9d60179bdc839ccd88e14df0fef098ad4b
2014-01-24 22:39:53 +00:00
Clint Byrum 8f095feee6 Move default cache dir to persistent location
While this is called a "cache", it is important for it to survive. On
reboot, servers may need what was in the cfn config to restore complex
network configurations.

We introduce a new command line option, --backup-cachedir, that will
default to the old path, /var/run/os-collect-config. This will keep
things working for any tools that have been hard coded to use the old
path.

Change-Id: I78b3851b35addfc16913e3cd53c9d0e7eb3d191a
2014-01-22 12:16:37 -08:00
Mark McLoughlin a479edb493 Log the value of OS_CONFIG_FILES
We pass the list of json files containing the collected metadata to
os-refresh-config using the OS_CONFIG_FILES env variable, so it's a
pretty useful piece of information to log.

Change-Id: Id09e3f352e6a5a09e4183c0743a6e99a2783a888
2013-12-17 07:59:17 +00:00
James E. Blair bcea327f91 Have tox install via setup.py develop
tox 1.6 was released, which means that we can now take advantage of
the feature we added to it - which is using setup.py develop to
install the code into the virtualenv. The logic was taken from
run_tests.sh - so the performance issues around using tox vs. using
install_venv should now be gone.

Additionally, override the tox pip install command to avoid using the
"--pre" option which is the default in tox.  "--pre" means "Include
pre-release and development versions."  By default, pip will only
install stable versions of software, and that is the behavior we want.

Change-Id: Ida5e440d1bdb9f8e9031277ea53a02d2ef171438
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
2013-12-11 08:59:59 -08:00
OpenStack Jenkins cfa1a384d3 Updated from global requirements
Change-Id: I7b0bb541765afe02c69da6163ae6cfeee6b58c7e
2013-12-10 23:44:40 +00:00
Roman Podoliaka 4a1487ec58 Revert "Support building wheels (PEP-427)"
This reverts commit 9d460a44e4.

The patch being reverted should not have been merged, because
setting universal to True is used to claim in-place python 2/3
compatibility in Wheel packages.

We don't support python 3 yet, so we must not claim the opposite
here (as this would harm end users as soon as we start uploading
Wheel packages to PyPi).

Please see the following links for details:
 - http://pythonwheels.com/
 - http://lists.openstack.org/pipermail/openstack-dev/2013-November/020059.html

Change-Id: I73106d2a1752fa8ee11694c6d9c123a953e6c462
2013-11-29 12:56:17 +02:00
JUN JIE NAN e6810895dc Tidy up README.rst, formatting
Wrap long line, add heading, formatting.

Change-Id: Id6d09c19832385a64134cd0115b909ecc7c6de29
2013-11-28 18:34:47 +08:00
JUN JIE NAN 2068717f05 Fix typo error in README.rst
From source code we can see the config file should be
/etc/os-collect-config.conf instead of
/etc/os-collect-config/sources.ini

Change-Id: Ieb1149991c4009fe05610ee5737d320274597404
2013-11-28 10:11:11 +08:00
Sascha Peilicke 9d460a44e4 Support building wheels (PEP-427)
With that, building and uploading wheels to PyPI is only one "python
setup.py bdist_wheel" away.

Change-Id: I78af0cc8661d2ac8107af462a39bf8b9f378f94a
2013-11-19 10:23:36 +01:00
OpenStack Jenkins 66f13d0d97 Merge "Updated from global requirements" 2013-11-18 23:02:50 +00:00
Ghe Rivero 48ff408222 Comply with new hacking requirements
With new hacking>=0.8.0,<0.9 requirements, some functions are
now deprecated.

assertEquals -> assertEqual
assertNotEquals -> assertNotEqual

Change-Id: I70287b0c8561a901069bddcf3007751c34a4e0b5
2013-11-18 12:37:15 +00:00
OpenStack Jenkins 4f193d6638 Updated from global requirements
Change-Id: I034e626dd77cd977d0b21819df3298eead2ba2ed
2013-11-15 16:50:27 +00:00
Clint Byrum 69d74dde12 Reduce default polling interval to 30 seconds
The initial value of 300 seconds was a conservative estimate. However,
the requests and responses are somewhat small, so we can drop the polling
interval significantly and still maintain a high degree of network
scalability. After measuring the responses from the ec2 and cfn servers
with typical workloads, at 30 second intervals 100 servers will generate
around 26kB/s of requests, with about 66kB/s of responses.

Change-Id: Iaa99ae405ba7c72ef8afc11c946400a2d0db5206
2013-10-25 09:38:13 -07:00
OpenStack Jenkins 3b052fd09c Updated from global requirements
Change-Id: I689a2a07be66021840f1e7b483d5f341cbb2bc5a
2013-10-24 13:17:17 +00:00
OpenStack Jenkins 7bb72c97f2 Updated from global requirements
Change-Id: Ib4aa7305320a77ac2c01a9620d46037f259622f9
2013-10-23 14:37:10 +00:00
OpenStack Jenkins 65a49f6266 Updated from global requirements
Change-Id: I19607c757d699065dc0cec655548ae83260ead3e
2013-10-20 00:00:42 +00:00
OpenStack Jenkins 555c120934 Merge "Updated from global requirements" 2013-10-15 16:34:44 +00:00
Angus Salkeld 1e43bdf2b6 Fix the formatting in the README
the backlinks don't seem to work on github use "::" instead.

Change-Id: I33acfc82df70344577dac7d775a061829c8038d8
2013-10-15 14:28:30 +11:00
OpenStack Jenkins b7d34a2830 Updated from global requirements
Change-Id: I4f26d3a8790c799e5c1f7f81031406e0c57545f9

Change-Id: Ica7315effe308bd739e90f885849fac27a3c542b
2013-10-10 20:26:17 +00:00
Clint Byrum e82a98f127 Imply --one-time when --force is used
Without this change, if a user runs os-collect-config --force, it will
lock the user in an infinite loop running the command over and over with
very little chance to cancel. There are no compelling use cases for that
behavior, but it is extremely inconvenient, so implying --one-time
improves usability of os-collect-config for users.

Change-Id: Ia8c9bf0bf97ab9e40e465c947c2f0cbeb981c08e
2013-10-05 23:39:49 -07:00
OpenStack Jenkins ff45223f13 Updated from global requirements
Change-Id: I44b10975f90ef576cea38b48c00c8df3d771011a
2013-10-01 16:14:18 +00:00
Jenkins f1f71c05e7 Merge "Make --version work properly" 2013-09-18 18:15:51 +00:00
Monty Taylor efe1fa256b Replace github references with git.o.o
Change-Id: I0c854540b93ff1cf17cac8c252b8db0eef2a87ec
2013-09-18 07:50:44 -05:00
Clint Byrum db896fdf3a Make --version work properly
We have pbr and we have oslo.config. Tell them about eachother.

Change-Id: I65d449b0ed961c824a3e7c1307aab63f73bc03ad
2013-09-17 17:30:52 -07:00
Clint Byrum 635955def4 Add --print option to force printing
The use case for --print is an administrator wanting to view the
metadata that os-collect-config sees without running any commands.

Fixes bug #1213195

Change-Id: I0251f2c70574aeaa79997ce822d2a5ffbe08e345
2013-09-16 12:35:25 -07:00
Jenkins f21f986ff4 Merge "Add a --force option" 2013-09-13 16:47:48 +00:00
Monty Taylor 1351034731 Update requirements
Specifically, stop using d2to1

Change-Id: Ie8af1dd5a8519bdb4105f11d94d95ce4e464c95a
2013-09-13 11:17:07 -05:00
Clint Byrum c1e60159f5 Add a --force option
This is a useful debugging and/or system fixer tool for instances where
metadata has not changed but one needs to re-run the configuration.

Fixes bug #1223693

Change-Id: I62b097bafa339fefcf6e03d11636f5ab622fb71a
2013-09-13 07:52:58 -07:00
Clint Byrum 6eb8eb9af3 Store list of collected configs in cachedir
This will allow tools like os-apply-config to read the list even when
they are run out of band from os-collect-config.

Change-Id: Ic4eaf649e234f4a1367d20c7ec52e93e787a7bb3
2013-09-13 00:39:49 -07:00
Clint Byrum c2b1b3909c Add --print-cachedir option
The option allows other programs to find the cache directory and files
without having access to OS_CONFIG_FILES.

Change-Id: Iad87efb65ea4db387e94160376c9eaf956fff413
2013-09-13 00:33:14 -07:00
Derek Higgins 61b6dfb604 Replace tearDown with NestedTempfile Fixture
Teardown isn't called if Setup errors, this should be more reliable.

Change-Id: I7804738527b1da18908652cf5dee591d75fa66b5
2013-09-03 20:50:14 +01:00
Derek Higgins 4cfeb28d12 Rerun os-collect-config if config changed
Keep a hash of the config file for os-collect-config and if it changes
during a failed run then rerun immediately(without sleep), effectively
causing new nodes to be ready 5 minutes earlier.

Because the cfn credentials are placed into os-collect-config.conf by
os-apply-config and are not in place the first time os-collect-config is
run, the first run of os-collect-config results in error, o-c-c then
sleeps for 5 minutes before running successfully the second time.

Fixes bug #1219186

Change-Id: I090de7a3d84e0ea342f1a422646c0c455eb37f4a
2013-09-03 13:35:55 +01:00
Derek Higgins bbb1c77106 Setup loghandlers in o-c-c binary
On a system with o-c-c installed by pip the binary generated by PBR
calls __main__() directly, the code that sets up logging sould be placed
here otherwise it will be bypassed. Resulting in missing log messages.

Change-Id: I94ba4f61be9595a6ddee134d806e5f99ae4adf73
2013-09-02 17:01:58 +01:00
Jenkins 2edabf0141 Merge "Remove travis CI from repo." 2013-08-18 21:30:05 +00:00
Monty Taylor 3ddfcdbb2e Update stackforge references to openstack
Change-Id: Ibd777b5d9dbb19970aec537fe0145d97287d31f2
2013-08-17 22:59:30 -04:00
Clint Byrum 40ff4e899e Remove travis CI from repo.
We don't use travis CI anymore.

Change-Id: I84c0fb516ebfca2c4de57417fa891e95d90b77b3
2013-08-16 08:22:22 -07:00
Robert Collins 5b8fd361c2 Stop resetting logging on every call to __main__.
__main__ is called directly during tests, but was resetting the
logging environment within it, which prevented tests from capturing
the log events.

Change-Id: If710e11091723144c97c88aab4aa5e6126844d2b
2013-08-16 17:29:58 +12:00
Robert Collins f20f9954db Stop using tearDown.
TestCase.tearDown doesn't get called if setUp fails, it should never
be used.

Change-Id: Ib960c3f9610d8d8a0624e0c0709afa819e1858ad
2013-08-16 17:29:58 +12:00
Clint Byrum 1897ecf001 Do not cache new data if command fails
The point of delaying the commit of data to the cache is that we want to
make sure the command succeeds before giving up on the data changes.
This will ensure that we keep trying the command with any given change
to the metadata until it succeeds.

Change-Id: Idf3a09686b4bbf0e16a9bc9f3359ee9937fcc627
2013-08-16 17:29:58 +12:00
Robert Collins 4bdefc2041 Document the last file presence.
Smart hooks may want to perform delta analysis on metadata, and tests
want to be able to tell if the cache is updated it's previous state,
so we should make the presence and name of the old versions of the
files a stable interface.

Change-Id: Ia29c1ef9e10308d6461dae7823c5f497f6b90122
2013-08-16 17:29:58 +12:00
Robert Collins 98c8588867 Switch to StringStream.
In Python 3 stdout is a text stream not a byte stream, so we should be
prepared for that.

Change-Id: I4bc1151e491226f24591e9b3436db8d5d37fca65
2013-08-16 17:29:58 +12:00
Robert Collins def1daa155 Rework test_main to use FakePopen.
FakePopen will make the migration to check_call easier, and narrowly
replaces the engire rather than replacing the subprocess entry point.

Change-Id: Ic868ce4cdbef79f256ef01a9a030767522b855a3
2013-08-16 17:29:55 +12:00
Robert Collins d809ef9a8d Bump minimum version of fixtures.
We need a fixed version of FakePopen to improve the test harness.

Change-Id: I8e0fcb9943038b48f6c1256b6fefe47bf0323cbf
2013-08-16 15:15:56 +12:00
Clint Byrum 13b6732546 Reverse default order of collectors.
The default order results in less-dynamic heat_local and ec2 overriding
the more dynamic cfn source. That is the opposite of what is desired.

Change-Id: I7e1feb2e6869b4f076200668dd204219ecc4224e
2013-08-15 11:22:50 -07:00
Jenkins 0238175a89 Merge "Ignore H803 checks from flake8" 2013-08-06 07:09:02 +00:00
Jenkins bf31e030c4 Merge "Fix a hacking complaint" 2013-08-06 07:08:37 +00:00
Robert Collins 0e107ca7aa Ignore H803 checks from flake8
H803 isn't supported by community consensus. Blacklist it.

Change-Id: I50f3d545f694827507ffd238f41a38c0b12e3a59
2013-08-06 16:14:55 +12:00
Robert Collins e017b0d09f Fix a hacking complaint
We can't land changes while hacking is unhappy.

Change-Id: I8ae913a965cd9be1fecec9ea960b90c8a69dca2b
2013-08-06 16:14:55 +12:00
Clint Byrum 2d4451a80f Fix heat hint file reading to work properly
Heat does not give us the exact API version to request, so we must infer
version 1 (/v1/) since that is what we speak. The other test cases are
all updated to use /v1/ too, so that the fakes can remain the same.

Change-Id: Ifb74546db16836aaa67fdd647aad2c5cf8aa84b4
2013-08-01 22:21:08 -07:00