Commit Graph

24 Commits (master)

Author SHA1 Message Date
Alex Schultz 3a7d05a9e8 Drop six
With python2 not being supported anymore, let's drop six.

Change-Id: I22f3d28e22ad209806b78ad78f46671a74179157
2 years ago
Steve Baker e5518c11c7 Set a timeout for all data fetches using requests
A timeout config value is added for each collector which uses requests
to fetch data, and this value is used for any requests calls.

Without a timeout a request may stall indefinitely and
os-collect-config will stop polling.

A timeout default of 10 seconds is chosen as the default. This is used
for both the connection timeout and the read timeout.

Change-Id: I4ad0065b5a85393105c6385a15653d7204b4f880
Closes-Bug: #1600652
7 years ago
Ben Nemec f092ea133f Switch to oslo.log again
We're currently still using unmaintained oslo-incubator code for
our logging, which is bad.  This switches us to oslo.log as
described in [1].

1: http://docs.openstack.org/developer/oslo.log/migration.html

Change-Id: Ibce86ab4ee24eeb55d0de1b0d5ff4ee4ea6ef66f
7 years ago
Ben Nemec ab5c66df45 Revert "Switch to oslo.log"
This isn't quite right and broke on stable/liberty.  Pushing
a revert in case I3c22d77dece399d21ab94783b74990789a1e1481
doesn't actually fix the problem.  We should probably merge
whichever passes first.

This reverts commit 69653318f4.

Change-Id: I9304429f25d28ca756e50b1788e149c5bb46b1d6
7 years ago
Ben Nemec 69653318f4 Switch to oslo.log
The old oslo-incubator log module isn't maintained (and doesn't even
exist anymore), so we don't really want to be using it.  It appears
this was the only incubator module we were actually using, so this
allows us to remove all of the unmaintained incubator code.

Change-Id: Ib4ad3b231360987a1ef4f95b5b5a8b656232efc4
7 years ago
Steve Baker acafb1b94a Merge deployments data for collectors heat, request
This is required so that a swift-enabled TripleO undercloud can switch
to polling for metadata from a TempURL rather than heat.

Change-Id: I73ac9e01f85e0c72ce7411e2c61c545322f3dccc
Closes-Bug: #1424913
8 years ago
Steve Baker 4b68dfd53d Refactor merging out of cfn collector
This is a pure refactoring change which moves the os-apply-config
deployment data merging into its own module. This will allow
other collectors (request, heat) to do the same merging.

Partial-Bug: #1424913
Change-Id: Ic78a60e3efebadbb06ebfd262ceb275ca519a3f2
8 years ago
Jenkins e80616d15a Merge "Log with info instead of warn when collector not configured" 8 years ago
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
8 years ago
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
8 years ago
Endre Karlson c917665af9 Add ca_certificate option for SSL'd api
Change-Id: I12eb9dbbb8bee24e50ae342ffbc7356d4583a973
9 years ago
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
9 years ago
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
9 years ago
Clint Byrum 8cfe571c70 Restore 'deployments' key to cfn Metadata
In recent changes support was added to explode the deployment key into
multiple json files for merging by os-apply-config. But this breaks
other users who want direct access to the full deployments structure.

There seems to be no real reason to delete the key other than tidiness,
so we will stop deleting it from the main cfn structure.

Change-Id: Icf9479376e32c3ad8f9be29359e6100c1aeda2a5
Closes-Bug: #1299110
9 years ago
Clint Byrum 831ab0be03 Parse deployments if found in cfn metadata
Will result in multiple cache files to be merged per
OS::Heat::StructuredDeployment. This is needed as the new features for
software configuration break things up a bit differently in Metadata.

Change-Id: Iec0fd947bac674f6b6f36e8c0789d10580c325fd
Closes-Bug: #1295787
9 years ago
Clint Byrum 16158684a6 Change collector interface to return a list
With the new OS::Heat::StructuredDeployment resource, each Metadata
section may have multiple "deployments" in it. With this, we will return
a list with tuples of key and content to write to the cache.

Change-Id: I9f4272b0761e1dfd850bc5a5c6b27a78f126281f
Related-Bug: #1295787
9 years ago
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
10 years ago
Clint Byrum 4cc2c41bbc Use heat-cfntools path hint for cfn.metadata_url
Heat passes this in via cloud-init to assist heat-cfntools in finding the
cfn metadata server url. This will likely be the primary location used,
and cfn.metadata_url will be an override.

Also doing some cleanup, removed unused cfn.EC2_METADATA_URL and
reordered and regrouped imports.

Change-Id: I52093bdd8a4b939ae06cf483535ed5d5a0e273d4
10 years ago
Clint Byrum 24ffbf5356 Fix problems exposed by trying against heat-api-cfn. 10 years ago
Clint Byrum ffb503ed04 Use Ec2Signer from keystoneclient
Also refactor some tests for less confusing monkeypatching.
10 years ago
Clint Byrum a13845a737 Run all collectors.
Also refactor internal API a bit to make code more generic.
10 years ago
Clint Byrum e10ce66791 Fix bugs and improve test coverage for cfn. 10 years ago
Clint Byrum 3cf47cefd6 Actual implementation of CloudFormation 10 years ago
Clint Byrum 9e1afa9d76 Skeleton implementation of cfn 10 years ago