252 Commits

Author SHA1 Message Date
Jenkins
e80616d15a Merge "Log with info instead of warn when collector not configured" 2015-06-04 17:15:33 +00:00
Jenkins
163030c081 Merge "Drop use of 'oslo' namespace package" 0.1.35 2015-05-29 09:40:47 +00:00
Steve Baker
d2c5bd1b0e Log with info instead of warn when collector not configured
Users who are debugging unrelated issues are frequently interpreting
logged warnings as an indication that os-collect-config is misconfigured
when the warning is actually harmless.

This change uses info instead of warn for this logging.

Change-Id: I28e0fb37b603364eea72cdc5299a29259489b820
Closes-Bug: #1437952
2015-05-15 11:54:23 +12:00
Doug Hellmann
4a41f0b3e5 Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: If51059c31c82d5235e2ae21143911b5561783ca6
2015-05-06 18:45:17 +00:00
Jenkins
eefebd7682 Merge "Use non-versioned auth_url for keystone" 0.1.34 2015-05-06 14:27:25 +00:00
OpenStack Proposal Bot
11d69d9d3d Updated from global requirements
Change-Id: I780644b67e532cd82476a1c6ad072c99173eebfa
2015-04-24 13:03:37 +00:00
Yanyan Hu
f6ca7618c4 Use non-versioned auth_url for keystone
keystoneclient discover can't get v3 auth_url using v2 auth_url. It
accepts an url without version number. This patch fixes this issue.

Change-Id: I45b4c016bd91afc39d39620920951043bb71df05
Closes-Bug: #1398254
2015-04-24 13:52:24 +02:00
OpenStack Proposal Bot
599fe89cc9 Updated from global requirements
Change-Id: I79d43903aff8d818ff1b583be2f5b46263d3b129
2015-03-21 00:16:39 +00:00
OpenStack Proposal Bot
450188d52e Updated from global requirements
Change-Id: I13c5693efba1114c8b8eaba31af10ab75985ed76
0.1.33
2015-03-05 04:57:02 +00:00
OpenStack Proposal Bot
ed95ad3d04 Updated from global requirements
Change-Id: I5a542669fbe25cb83cfaba1f0403035dc051cde5
0.1.32
2015-01-08 18:50:19 +00:00
Endre Karlson
c917665af9 Add ca_certificate option for SSL'd api
Change-Id: I12eb9dbbb8bee24e50ae342ffbc7356d4583a973
0.1.31
2014-12-05 13:59:55 +01:00
Jenkins
de6d420f40 Merge "Add unit test for heat_local" 2014-11-25 17:53:11 +00:00
OpenStack Proposal Bot
8e603ed3c8 Updated from global requirements
Change-Id: I7503a6a56367f0d01a896441723df4fc3f3a7567
2014-11-20 14:11:12 +00:00
OpenStack Proposal Bot
61cb285d23 Updated from global requirements
Change-Id: I3d2eab22bfd5b35bb6d799b8b924dca147483ed1
0.1.30
2014-11-18 11:36:00 +00:00
Dougal Matthews
4bc37fd50e Bump hacking to 0.9.x series
Change-Id: I474266c647f31f0ad92ec9878fc03eb5a5c97f43
2014-11-13 13:11:00 +00:00
OpenStack Proposal Bot
dc26874ab5 Updated from global requirements
Change-Id: I7ac9a3db15d6fff36e626d74fedfb35a5ecd0532
2014-11-10 23:28:59 +00:00
Gregory Haynes
46e950ddd1 Enable local collector by default
This is a useful collector and it seems odd to not have it on by
default.

Change-Id: Ibc3be6ff27c6290ce32bc01d0e62acf3253545c3
2014-10-30 01:26:09 -07:00
Jenkins
72bd2854f6 Merge "Handle missing local collector directory" 2014-10-29 16:13:22 +00:00
Gregory Haynes
d05f57b092 Handle missing local collector directory
We currently explode if local collector is enabled with the data
directory missing. Changing this to a warning allows us to have this
turned on by default without greatly inconveniencing users.

Change-Id: I36364ba1a0706a5a2c820eadd526f2ba424ac665
2014-10-28 13:34:48 -07:00
Steve Baker
ad475ee927 Collector which does a simple HTTP GET
This change implements a collector which does an HTTP GET via
python requests to fetch the metadata.

It should work with any GET-able URL, however it is designed to
work with Swift TempURLs.

Swift objects are not consistent, so the Last-Modified header is
checked for each poll and metadata is not fetched if the last
modified is not newer than the previous successful poll.

This collector will be enabled for OS::Nova::Server
software_config_transport: POLL_TEMP_URL which is available
in the Juno release of Heat. Using POLL_TEMP_URL will result
in no metadata polling load on heat, which has historically been
an issue with tripleo scalability.

Change-Id: I22155c22bdcc3c81a5e945ca5436a8f29f196528
2014-10-17 09:40:23 +13:00
Jenkins
fa3d4e34e8 Merge "Modify gitignore to ignore cover" 0.1.29 2014-10-16 12:48:51 +00:00
OpenStack Proposal Bot
a10fed7ef2 Updated from global requirements
Change-Id: I7fd4a2770a2b9b3b6dc7d3e61a4500013d8c3195
2014-10-13 18:50:10 +00:00
OpenStack Proposal Bot
c49d2dcb14 Updated from global requirements
Change-Id: I1c2823c416cebfdd5662b4c1a309c24bea237ba6
2014-10-11 22:37:04 +00:00
Gregory Haynes
6d32511dd0 Exit with error status on failed command
When we detect a failed command we log ERROR but we do not return an
error status. This makes it difficult for programs which may run
os-collect-config to detect whether a run was sucessful.

This only applies to runs which are performed with --one-time argument
as this is a straightforward case.

Change-Id: I168862e8c75c15d1ea405a417908d1284feb7b32
2014-10-09 00:20:03 -07:00
Gregory Haynes
7e913145a3 Fix py3k popen and locale test fails
A popen call is made in the Python 3 platform module which causes our
assertions for our mock'd popen to fail. Also fixing a locale issue to
use defaultlocale() rather than LC_ALL.

Co-Authored-By: Steve Kowalik <steven@wedontsleep.org>
Change-Id: I45cdf7d921fbca5f09e5f65bd69fcee83fb7c8e4
2014-10-09 00:17:43 -07:00
Motohiro OTSUKA
3822b55d21 Add unit test for heat_local
For improving test coverage, this patch adds unit test for heat_local.

Change-Id: I000a73d8c54b5bb9c506d8674fbd963fed72e8f3
2014-09-16 10:30:00 +09:00
Motohiro OTSUKA
18afc37de6 Modify gitignore to ignore cover
Prevent generated coverage report files from being imported.

Change-Id: Id0ded3cab56c5b924f82c421fa1b6f7994b1f472
2014-09-12 15:53:50 +09:00
Jenkins
0f83ecbc2f Merge "Using keystone discover to find V3 auth_url" 0.1.28 2014-09-03 16:54:24 +00:00
OpenStack Proposal Bot
1a59009168 Updated from global requirements
Change-Id: Iab28cdc166c480e7892c448a8e3a62a9d4d362eb
2014-09-03 07:40:53 +00:00
Yanyan Hu
47bb4bddb2 Using keystone discover to find V3 auth_url
This patch uses keystone client discover to find correct V3
auth_url which is expected by heat collector.

Change-Id: I2b8b5a768bdeb1cd1d20fab3b4234306c1429d6d
Closes-Bug: #1341936
2014-09-03 01:46:35 -05:00
Jenkins
7d61ca940c Merge "Add support for Python 3" 2014-09-02 10:17:38 +00:00
Jenkins
5af061bc79 Merge "Sync log from oslo" 2014-09-02 09:09:08 +00:00
Steve Kowalik
a3c1159ed4 Add support for Python 3
Make changes pretty much all over the code base with respect to
encoding strings and fixing imports to support Python 3.

Change-Id: Id1920129001b8e223474c1b2faf8bd9d527fe7e7
2014-09-02 16:56:18 +10:00
Steve Kowalik
a776aeace9 Sync log from oslo
Update the copy of oslo's log to oslo-incubator
0533894d6bfacd82a371bccd628b61d5016032cd.

This is the first step towards supporting Python 3 in
os-collect-config.

Change-Id: If282091d7f0cbd4e2ce90d70c066bb11cbf56d38
2014-09-02 15:22:22 +10:00
Clint Byrum
9cb442e93c Allow using non-default collectors
The local collector is not in DEFAULT_COLLECTORS, but should be usable
explicitly. It, however, suffers from a bug where only
DEFAULT_COLLECTORS are allowed through.

Change-Id: Ia42d1acd39638b448e2e2bfa26aff1c7ae415b71
0.1.27
2014-08-19 22:24:18 +00:00
OpenStack Proposal Bot
458bf3c013 Updated from global requirements
Change-Id: I09953c528035bf4789313580c6e151b4638de898
2014-08-13 23:23:46 +00:00
Jenkins
9b28e39fa1 Merge "Add a local data collector" 0.1.26 2014-08-08 16:59:35 +00:00
Clint Byrum
4696fd4f93 Add a local data collector
This collector will collect data from the local system, allowing image
builds or simple processes to influence the metadata.

implements bp tripleo-juno-occ-localdatasource

Change-Id: I0e58e8c631ffe8b63e8b4117df2c9ce2f413044f
2014-08-08 07:30:11 -07:00
Clint Byrum
79efeba4c3 Do not log unconfigured collector as warning
The configuration will dictate whether or not something is configured.
If it is not, this is a normal state and should not be logged as a
warning.

Change-Id: I479f0aed5837871009bc69fa028f5eb64a060c53
Closes-Bug: #1321551
0.1.25
2014-07-21 13:54:48 -07:00
Clint Byrum
42efe2b969 Revert "Make heat the default collection method"
This reverts commit 6b478e9d90bce18b03f5411822897740f68c3dd0.

We will break anybody who is expecting CFN to be tried in all
circumstances with this. We probably just need to base which collectors
to try on what configuration we have, and not log warnings on
unconfigured collectors.

Change-Id: I4bf7d6f9af9487bf9d2c0942381c0ba68fc03ee9
0.1.24
2014-07-08 14:04:42 -07:00
Clint Byrum
6b478e9d90 Make heat the default collection method
Previously we were relying on the CFN compatibility API. This makes the
native Heat version the default.

Note that we want to keep full coverage, which is why we are explicitly
adding cfn back in during tests.

Change-Id: I5adedd052827e176e2f39071c719600df62019d7
Closes-Bug: #1321551
2014-07-03 10:22:06 -07:00
Clint Byrum
ee911cfb69 Cache auth_ref from keystoneclient
Auth_ref is documented as a serializable object which we can save off
and use to reinitialize keystoneclient. That should in turn be passable
to heatclient directly. With this code, we will avoid authorizing with
Heat if we have a token in the cache.

Change-Id: I3dc6c3726054e77449cc9be46229e6d3521d4ef2
Closes-Bug: #1321437
2014-07-03 10:21:51 -07:00
Clint Byrum
328e1c6cfe Add dogpile cache to keystone abstraction layer
In later commits we will use this cache to memoize access to the
authentication details.

Change-Id: I389f78fe1eb176e37c90a1a87a4ba5fde3b33f05
Related-Bug: #1321437
2014-06-27 23:18:07 +01:00
Clint Byrum
1dc89292dc Split keystone away from heat collector
This will help segregate the changes as we abstract away details of
keystone such as caching the tokens.

Change-Id: I81ccb17658e5c9fa349fb183240f901d61b1fa93
Related-Bug: #1321437
0.1.23
2014-06-27 23:17:39 +01:00
OpenStack Proposal Bot
308aeb19db Updated from global requirements
Change-Id: Id185bb8f180f169072a821b95a774a297db8db1e
0.1.22
2014-06-18 00:46:47 +00:00
Jenkins
8f8b6cb362 Merge "Fix coverage report generation with tox" 0.1.21 2014-06-13 16:03:13 +00:00
Clint Byrum
69bd587667 Fix coverage report generation with tox
Previously no coverage report was produced as the package name was
confusing the coverage module. We were also using the wrong command.

This also adds a coveragerc so that the results are sane.

Change-Id: I204f52eeae71ac11274431f9cdf518d19e42f94b
2014-06-03 11:00:07 -07:00
Clint Byrum
dc35d20358 Use json equality rather than raw text
It turns out sometimes json will serialize differently given the same
python structure. A check of the two parsed data structures will detect
changes more reliably.

Change-Id: Id165b36c0fa0fa89730c3507444a41c68bd70fb3
Closes-Bug: #1320262
0.1.20
2014-05-22 12:13:08 -07:00
Jenkins
96248ee8a7 Merge "Only top-level some deployment configs" 0.1.19 2014-05-19 21:36:54 +00:00
Steve Baker
b066d4cc85 Only top-level some deployment configs
Only config which contains os-apply-config data should be written
to the top level config structure. This change will only top-level
configs which are in the group os-apply-config or the default group
Heat::Ungrouped.

This tripleo-heat-templates change will specify a group for all
config resources https://review.openstack.org/#/c/91731/ however
the expected top-levels will still be written out without this
change.

This change is to fix heat software config when the config is not
json.

Change-Id: I16e42825121cf4968d4b0f0d266f4f6daa962921
Closes-Bug: #1299109
2014-05-08 12:32:25 +12:00