'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: Iea38327f48caf8c060479dfa4f42f3124a87fee8
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: Id5b1b0d8815c8324c53eca0fb9a32b1495617eba
Python 3 will complain when trying to split a byte-string using a string
so this change enables universal_newlines to make the split work in both
python 2 and 3. Also add a py3 tox environment.
Change-Id: I9af74b6c6cc9cfd0c973c85be04791aa6dc0acd4
When the os-collect-config process is started on multiple systems at the
same time, the polling intervals can line up to cause performance
problems against the configuration source. To reduce the impact, this
change adds a splay option to allow the operator to configure a random
delay prior to the polling to attempt to offset the polling
syncronization.
Change-Id: I1a8be3345d783da9014eca7ea26da19d57e767c0
Closes-Bug: #1677314
The older hacking library has a cap on pbr <2.0, with the recent 2.0.0
release of PBR it's causing failures in the pep8 job.
hacking isn't kept in sync via the typical proposal-bot updates.
Do it manually to clear the gate issue.
pep8 runtests: commands[0] | flake8
./os_collect_config/merger.py:45:22: W292 no newline at end of file
return final_list
Change-Id: If863d2e190a4e1701ebf1fcb99a783075cda2556
Related-Bug: #1668848
The H803 rule have been removed from hacking since v0.10.0.
we can remove H803 from the ignore list.
Change-Id: Ib63f8a57db170bac08fecd2924e5a042d909b84e
I1c94ad82c3b20cc331045c19d4a9987a701b081b fixed the issue in Zaqar where
the pop argument was wrongly named. We can now use it in the zaqar
collector to retrieve messages over websocket.
Change-Id: I0ce894b0eef7018a37db9ef9d1b43d8d20629bf0
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove os-collect-config.
Change-Id: I2a0983f41372b52e6d4e6a85cca1c51f980af36c
This patch adds a new zaqar.use_websockets option which if set to True
in the config file will configure the Zaqar collector to use
the websocket transport instead of wsgi. This can be more efficient
where you want to avoid the continuous polling of o-c-c and instead
just listen on the websocket that is subscribed to a queue.
Like other collectors each iteration creates a new socket object. This
allows us to use the normal re-exec logic in o-c-c and thus gives
the option to re-configure the agent in the future to use other types
of collectors. We could (optionally) look into a higher level option in
the future that would allow o-c-c to avoid re-exec'ing and thus re-use
the same websocket for multiple sets of metadata.
Depends-On: Ia2a8deb599252d8308e44d595eb2bf443999aaad
Change-Id: Id5c7ed590df776844b6c7961eb40f89206cd24e0
This change will first attempt to get ec2 metadata from a v2 config
drive before falling back to the nova metadata server if no config
drive is detected.
Config drive is enabled in overcloud nodes, so using this for
os-collect-config will allow the undercloud nova metadata server to be
disabled.
V2 of the config-drive was released in OpenStack Folsom, so a decision
was made to not support V1 discovery at all. This makes the block
device candidate selection much simpler than the cloud-init one[1].
[1] https://git.launchpad.net/cloud-init/tree/cloudinit/sources/DataSourceConfigDrive.py#n219
Change-Id: I2aec0544fe40c2e901aee38c79bb838a627d20da
Closes-Bug: #1619074
Currently the ec2 collector polls the nova metadata service every
$polling_period even though the data is not expected to change and no
known config actions have been written to respond to changes in these
values.
With larger overclouds, this metadata polling will cause noticeable
load on the undercloud, especially nova-api and neutron (for port
lookups).
This change will check for data in /var/lib/os-collect-config/ec2.json
and simply return that if it exists.
Change-Id: I84156f8b005b319fccf8ac17af8943aefb0a8f6d
Closes-Bug: #1619072
Currently if http requests are not correctly mocked, behaviour of the
unit tests will depend on what happens to be running on localhost.
Jobs like gate-os-collect-config-python27-ubuntu-xenial are currently
broken because discover requests are being made to localhost and
something has change in the environment to cause test failure.
This change does the following:
- replace unit tests addresses from 127.0.0.1 to 192.0.2.1 (TEST-NET-1)
- fix mocking of tests which now stall because 192.0.2.1 isn't accessable
- change the mocking approach to keystoneclient.discover.Discover to
a simple stub class
Change-Id: I6d9450d6854b9f50dac0f55f54f1ea1d579a27ac
To avoid pushing an artificial alpha tag, following PBR semver keyword
bumps major version. See http://docs.openstack.org/developer/pbr/#version
Change-Id: I1e60356351ccbad772a37ecb6547d21bfd8f5d29
Sem-Ver: api-break
All CI jobs are timing out currently during NetworkDeployment
because 99-refresh-completed is not signaling to Heat due to
instance-id being detected as null by os-apply-config.
I suspect this patch is causing the issue.
This reverts commit 8717436db99a84588532e792f8c9ea909f3e3628.
Change-Id: Id0d122d7e855cd828a0742dabc5f7089fb6a913c
Closes-Bug: 1623754
Currently the ec2 collector polls the nova metadata service every
$polling_period even though the data is not expected to change and no
known config actions have been written to respond to changes in these
values.
With larger overclouds, this metadata polling will cause noticeable
load on the undercloud, especially nova-api and neutron (for port
lookups).
This change allows collect calls to raise a SourceAlreadyCollected
exception if the data for this collector never changes. The ec2
collector raises this if its data has already been cached to
/var/lib/os-collect-config/ec2.json
Change-Id: Ib7df590601132857690c8ab64fe32098a81752d8
Closes-Bug: #1619072
There are 2 things at play here. First the logic added in
4cfeb28d12295154f1b57308022283cc2eaab079 is no longer needed
because our initial sleep time is very low and increases
gradually up to the max.
2nd, I'm proposing that we avoid reexecing unless the config
file actually changes. Not re-execing will give us the option
to optimize os-collect-config for some long running collectors
(like zaqar websockets). Also, Os-collect-config updates would
already be handled by packaging restarts and or other deployment
system changes anyways.
Change-Id: I04b2752d007089f72af42c88c4249c3e11c8346f
This is required so that a the TripleO undercloud can
switch to polling for metadata from a Zaqar rather than Heat or
Swift.
Change-Id: Ieb076185314a7aeadd8a708ab01b48dfbccef006
Closes-bug: 1604098