Steve Baker [Wed, 27 Mar 2013 20:29:38 +0000 (09:29 +1300)]
Allow cinder operations with only auth_token
This uses the same technique as Horizon for auth_token operations.
Specifically, the cinder endpoint is found directly from keystone
and the auth_token and management_url are set on cinderclient
after it has been created.
Client libs are in theory capable of looking up their own endpoints
given an auth_token, but in practice this is the code-path least
travelled and there are many issues. I think it is best to do what
Horizon does, since all Horizon operations use only a token and always
provide the endpoint to the client lib.
Tested by launching a stack with and without the --token-only flag
Also tested using Horizon, which is auth_token only
Since the change implemented as part of bug #1136148 we no longer
wait for nova to create the instance before reloading the loadbalancer
which means we race nova assigning an IP to the instance and typically
the loadbalancer config ends up with the 0.0.0.0 default value
which the loadbalancer implementation uses when nova returns no IP.
This patch moves the LB reload into a separate function, which is called
after instances are active on group creation or adjustment
Since our loadbalancer is broken without this fix, this is a candidate
for backporting to grizzly milestone-proposed.
Steve Baker [Tue, 26 Mar 2013 04:11:47 +0000 (17:11 +1300)]
Fix swift client token authentication
Triggered by launching a stack containing swift containers
through Horizon.
The swift client does its own endpoint lookup if we don't know
it, so we don't have to do it ourselves. Also, our endpoint lookup
was broken in the auth_token codepath.
Currently the engine validate_template returns cfn formatted
Parameters from the template, which isn't actually very useful
to build a full UI from a validate call.
This change returns the original Parameters template snippet
and changes the cfn api to reformat to the CFN API legacy format.
The Parameters section of the RPC and the REST APIs now return
a dictionary containing the parameters as specified in the template.
Previously the Parameters section contained a list in the CFN API
format.
Pseudo parameters are filtered out of the validate results.
Steve Baker [Sun, 17 Mar 2013 20:21:35 +0000 (09:21 +1300)]
Create a wsgi factory method for Debug filter.
This can be enabled by putting the following in the *-paste.ini
file:
[filter:debug]
paste.filter_factory = heat.common.wsgi:filter_factory
heat.filter_factory = heat.common.wsgi:debug_filter
Steven Dake [Sat, 16 Mar 2013 20:37:29 +0000 (13:37 -0700)]
If a stack create fails, ensure the stack is deleteable
The resource delete operation attempts to delete CREATE_FAILED
resources. Further it attempts to delete resources that were
not created during a creation operation because further processing
of the template does not take place.
This patch special cases these two conditions in the delete operation.
sdake [Wed, 13 Mar 2013 04:50:58 +0000 (21:50 -0700)]
Allow per-deployment configuration of user id
Previously user ids of new instances were limited to ec2-user.
This patch adds a new configuration option to be placed in
/etc/heat/heat-engine.conf called "default_instance_user" which
allows the default of ec2-user to be overriden.
Note for reviewers that runcmd does not work properly. It was
actually running after the loguserdata.py script finished execution.
Zane Bitter [Wed, 13 Mar 2013 11:41:06 +0000 (12:41 +0100)]
Remove Nova dependencies from hacking test
References to Nova in the docstrings(!) of the hacking.py tests caused the
run_pep8.sh script to fail if the Grizzly development version of Nova was
not installed. Update all the references to use Heat packages instead.
Steven Hardy [Tue, 12 Mar 2013 14:39:11 +0000 (14:39 +0000)]
heat templates : Update for F18
Remove F16 as it's EOL, update with F18 as it's the current
version. Leave the default as F17 for now in all except the
Openshift templates (because Openshift doesn't work on F17,
although these templates are currently broken anyway..)
Zane Bitter [Tue, 12 Mar 2013 09:03:29 +0000 (10:03 +0100)]
Use internal DB management
Use our own internal code for managing database migrations, rather than
calling sqlalchemy-migrate's command line directly. This allows us to
automatically specify the initial version of the database, which is
required in order to be able to squash migrations (bug 1072949).
Zane Bitter [Mon, 11 Mar 2013 15:54:21 +0000 (16:54 +0100)]
Register DB options independently of engine
We need a script that will just manage database migrations (for bug 1072949), so for this purpose we want to register only the DB options, not
all of the engine options.
Zane Bitter [Mon, 11 Mar 2013 15:54:21 +0000 (16:54 +0100)]
Avoid manipulating DB directly in unit test
Use the parser.Stack class for inserting data into the database in the
watch rule unit tests. If there is direct database manipulation in the unit
tests, it risks falling out of step with the implementation in the code (in
this case, by not supplying the disable_rollback value).
Aaron Rosen [Fri, 8 Mar 2013 18:12:14 +0000 (10:12 -0800)]
Update to Quantum Client 2.2.0
This patch updates tools/pip-requires to use the python-quantumclient 2.2
It also limits the version to <3.0.0 to prevent breaking something accidently
when 3.0.0 is released.
Steve Baker [Fri, 8 Mar 2013 00:06:04 +0000 (13:06 +1300)]
Add tests to validate REST path to action mapping.
The Routes mapping performs some brittle regexp manipulation
to build the parameter mapping on the path, so its nice to validate
that it is doing what is expected.