Red Hat Bugzilla – Bug 1031007
[RFE] [Nova] Cancelling a swap volume
Last modified: 2014-03-21 00:10:30 EDT
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/cancel-swap-volume
-- Description --
* In this blueprint, I suggest ClientToken that user can specify, and post
requests which idempotency is guaranteed by the previous ClientToken.
* First, ClientToken is implemented in the run_instance of AmazonEC2.
It is also implemented in Openstack EC2 run_instance.
* I think that there is no reason to ClientToken is limited to only the run_instance.
I suggest implementation of ClientToken to other Openstack API.
* This suggestion is based on following exchange...
-- Use cases --
1. User AAA boot own server.
2. Unfortunately, the client has gone down.
3. AAA is no way to know how was his server.(In fact, his server runs normally.)
4. AAA thought booting is failure, so AAA booted a new server with same param request as 3.
* This appears to be no problems at first glance, but money problems may occur in service.
(There is a possibility that the overage charges for two servers.)
So AAA need to way how is his server, how is his server status.
In this case, idempotency client token is so useful.
To specify the token itself by AAA, AAA can know status of server.
How many times AAA put POST method, it is guaranteed the state of the POST which was same with return of AAA's first POST request.
-- How to use? --
In curl command, you add header of request 'X-Client-Token: foo'.
In this name, I already implemented python-novaclient implementation.
So, you can put request like 'nova --x-client-token boot --flavor 1 --image hoge ...'
If 'X-Client-Token' become another good name, I am going to refoctor.
In this page, I paste curl command sample.
-- Configuration --
You don't need any specific permission and policies.
Only just you put or not. It does not affect in the configuration.
If you don't put it, that API works same as before.
-- Implements --
* Plan to implement ClientToken across POST method of whole Openstack for idempotency.
In OpenstackAPI, ClientToken shall be specified in the header.
-- Remaining challenges --
I implemented idempotent.py temporarily.
Appropriate file path is need to be considered.
This feature is decorator. And I applied this decorator to 'Create Server'.
In nova, I also applied it to create keypair.
I am going to apply other nova POST method.
About other component, basic POST, I am able to confirm that the API movement.
-- I assume the code like this. --
Incorrectly mixed two separate blueprints, closing.