* 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
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
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
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>
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
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
With new hacking>=0.8.0,<0.9 requirements, some functions are
now deprecated.
assertEquals -> assertEqual
assertNotEquals -> assertNotEqual
Change-Id: I70287b0c8561a901069bddcf3007751c34a4e0b5
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
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
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
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
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
The option allows other programs to find the cache directory and files
without having access to OS_CONFIG_FILES.
Change-Id: Iad87efb65ea4db387e94160376c9eaf956fff413
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
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
__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
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
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
FakePopen will make the migration to check_call easier, and narrowly
replaces the engire rather than replacing the subprocess entry point.
Change-Id: Ic868ce4cdbef79f256ef01a9a030767522b855a3
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
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