The scheduler hints and disk config extensions were not using
proper prefixes when deserializing xml. This patch modifes
them to deserialize properly. It leaves the old deserialization
in place as well so anyone using the broken implementation
will continue to work.
It also updates the api samples to use the new format. Note that
the proper fix required changing the alias for the scheduler hints
extension, since the alias is used for xml, so the samples had
to be moved.
Finally it fixes an issue with deserialization, allowing it to
support multiple hints with the same name.
Part of bug 1050997
Change-Id: I9969582d65d44de25388f07b6d2013fb7d093fb2
We were not deserializing xml values causing the multiple create
extension and the availability zone extension to fail with xml.
This adds deserialization for these attributes and adds tests
Part of bug 1050997
Change-Id: Ic40ce58b0854717dd99dba8ed39c861e31e6bba4
The nova-manage volume commands weren't updated when the switch
from int volume-id's to uuid's was made. This updates the
param2id method to call the appropriate conversion, and doesn't
attempt to cast the value to an int.
There is an additional issue with the nova-manage commands with the
introduction of Cinder. The calls in nova-manage are direct to the
nova database which when using Cinder is not valid. Add an error message
when trying to use delete or re-attach commands as they don't work.
This change deprecates the nova-manage delete function as it's now
implemented as an admin extension (nova commit id: If795599d and
cinder commit id: I29f4b892).
The reattach command is only valid for nova-volumes, a similar extension
will need to be added to cover cinder at which time the nova-manage volume
reattach can be deprecated as well.
Partial fix for bug #1051603
Change-Id: I666d4e627dee4a2025f7135560ee36c40f4bf17a
If there are not enough hosts available during a multi-instance launch,
every failing instance should be updated to error state, instead of
just the first instance. Currently only the first instance is set
to Error and the rest stay in building.
This patch makes a number of fixes to error handling during scheduling.
* Moves instance faults into compute utils so they can be created
from the scheduler.
* Moves error handling into the driver so that each instance can be
updated separately.
* Sets an instance fault for failed scheduling
* Sets task state back to none if there is a scheduling failure
* Modifies chance scheduler to stop returning a list of instances
as it is not used.
* Modifies tests to check for these states.
In addition to the included tests, the code was manually verified on
a devstack install
Fixes bug 1051066
Fixes bug 1019017
Change-Id: I49267ce4a21e2f7cc7a996fb2ed5d625f6794730
Fix for Bug 1029762
The symptom of this bug is that the response data of an
OSAPI create call always shows and empty dict for volume_metadata
regardless of what was passed in to created and actually used.
Upon the db create_volume call a reference to the volume
object is all that was being returned. Since metadata is
specified and set, it should also be returned with the
create reference object.
This will result in the the osapi create call returning
a body with correct metdata info rather than always showing
and empty dict as it was previously.
Change-Id: I469e06941f446526bae39168f3b1ebfea851e0ef
The compute manager needs to reset the task state after a backup
is complete. However it was only correctly reseting after a
snapshot due to the current expected state being hardcoded.
Now looks for the correct expected state depending on whether a
backup or snapshot was being executed.
Fixes bug 1051069
Change-Id: Ie91f7745b98232370be6c99d318a8033a93cc50c
There are cases where an operation will fail when communicating with
libvirt. We were eating the exception even though the operation
failed, which has the potential to put the instance into an
unrecoverable state.
This patch allows NotFound exceptions to propogate up so that they
are caught by the state handling code and the task state can be
set to error.
Fixes bug 1002814
Change-Id: Iddc319b24aee0b7132155f50b9d3b0eee9bb3fa8
Fixes bug #1048565
Use the new Controller.is_valid_body() helper to validate the entity
body in various volumes related POST/PUT handlers and return 422
as appropriate.
(Cherry picks commit dcecb586 from Cinder and adds similar fixes for
the volumes bits in the compute API)
Change-Id: I04127972981522c1ed81903893396c4f9665bcd3
The return value of current deregister_image implementation is the AMI id.
Howerver, according to Amazon EC2 API documentation, the return value of
DeregisterImageResponse should be boolean.
See more detailed documentation in:
http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeregisterImage.html
The example response:
<DeregisterImageResponse xmlns="http://ec2.amazonaws.com/doc/2012-08-15/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<return>true</return>
</DeregisterImageResponse>
This patch changes the response and test case for deregister_image.
Fixes bug 1051752.
Change-Id: Ifd31b88ec4f575f50244079cdeed4c9ff57206f8
Also adds better validation for b64 encoded data since python
will happily ignore illegal bytes in the base64 encoded data.
Fixes bug 1050797
Change-Id: I4f380d029ec2d51f130a6dbd581410873e414216
So far the xml format to schedule hints were not defined.
Once defined (in ML), this patch add support to its deserialization.
This patch also includes a xml deserialization method to get the Elements
between the childs of a node.
Partially fixes bug 1050997
Change-Id: I2a34dbbd6200755818d7eaa7330a96d61a043614
The optional os-admin-actions extension adds new wsgi_actions to the
volumes/action resource and a new snapshots/action endpoint.
With this extension both controllers will support an os-reset_status
action to force a database update of a volume or snapshot that is stuck
in a failed/incorrect status. The os-reset_status action works
similarly to the compute api's os-reset_state action for instances.
The os-force_delete action behaves similarly to the "cinder-manage
volume delete" command and allows operators/admins to retry the delete
operation after it has gone into an error_deleting status with an admin
api call.
The os-admin-actions extension is enabled by default, but limited to the
admin api by the default policy.json rules. Individual admin actions
can be disabled with policy rules as well.
Example of os-reset_status action on a volume:
curl http://localhost:8776/v1/${PROJECT_ID}/volumes/${VOLUME_ID}/action \
-H "x-auth-token: ${ADMIN_AUTH_TOKEN}" \
-H 'content-type: application/json' \
-d '{"os-reset_status": {"status": "error"}}'
The new admin only api can assist deployers who encounter bugs or
operational issues that result in failed actions.
It can also be used by future storage backends to support async callback
style status updates from long running actions or operations which have
encountered an error will be retried.
Also updates the api.openstack.wsgi.ControllerMetaclass to support
sub-classing wsgi.Controllers that define wsgi_actions.
Partial fix for bug #1039706
Change-Id: If795599d5150dea362279d75a75276f3166d0149
Libvirt < 0.9.4 doesn't support undefineFlags, so the vms can't be
deleted. This patch adds a workaround to fallback to the old style
of undefine if undefineFlags throws an Attribute error. It also
attempts to remove any managed save images that exist.
Fixes bug 1051010
Change-Id: I155fe2ab3be347b1515c5aab4a9233921bd722ca
This commit pulls in the following change from openstack-common:
ee44222 Change the qpid_heartbeat default to 60 seconds.
Fix bug 1050661.
Change-Id: I42acdca42f27fbbe9a52441f8cf7ea8261fd8d24
This picks up the following attributes which are currently ignored
when poking this via XML:
- accessIPv4
- accessIPv6
- adminPass
Change-Id: I947aa2f942022d839919ae7516759955e5b06668