Commit Graph

37 Commits

Author SHA1 Message Date
Kendall Nelson 353f75eca0 Retire Karbor
As announced on the openstack-discuss ML[1], Karbor is retiring
this cycle (Wallaby).

This commit retires this repository as per the process defined in
the project-guide[2].

Thank you to all the contributors of Karbor for your hard work!

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018643.html
[2] https://docs.openstack.org/project-team-guide/repository.html#retiring-a-repository

Depends-On: https://review.opendev.org/c/openstack/project-config/+/767030
Change-Id: I972ffb299f93863c4e34b1f504b002095661e6af
2020-12-21 11:51:02 -08:00
wangyu d8187d7e5f Replace use of log.warn with log.warning
LOG.warn is deprecated in Python3 and was used only here
in karbor, this patch updates it to LOG.warning.

Change-Id: Icad346bb6fd3efcac2f42fead1327585297f2f96
2019-09-16 02:24:50 +00:00
jiaopengju ecc6b64f4a Add support to reset checkpoint state
Now when doing checkpoint copy failed, checkpoint
will be wait_copying status forever, and so we can
not do the restore anymore. So we should add an API
to support checkpoint status reset if we deeply knows
that the checkpoint is ok. This patch added API
support for doing checkpoint state reset.
Implements: bp checkpoint-status-reset

Change-Id: Iabaa98c9900fba554be2ad0833d438901e01147a
2018-12-03 14:02:01 +08:00
jiaopengju 37c197851a Add permission check when creating restore
Currently, general users have rights to restore other users'
checkpoints. We should add permission check to avoid the security
risk.
Closes-Bug: #1805004

Change-Id: If0f957a3aa8f25778833d7611342fab6b8efa388
2018-11-25 21:09:11 +08:00
jiaopengju b6342feeb6 Add project id support for checkpoints filter
Change-Id: I93ab8a3a503045fb8a7612cf47bbfa014ac00fd2
2018-11-21 17:58:49 +08:00
jiaopengju abab99c0eb Add all tenants support for checkpoints listing
Change-Id: Ic02a60a0eec1e7d3b0ca7b1a355a5d62d5c0046c
Implements: bp checkpoint-all-tenants
2018-11-19 09:35:33 +08:00
chenying d85ec6aa58 Add content parameter for checkpoint and bank modules
Add optional content parameter for checkpoint interface, so that other
checkpoint bank plugin like database bank plugin can be introduced to
Karbor.

Change-Id: I4eaad0b3fe38cb95a668b83acba39cd831bbb7df
Closes-Bug: #1745909
2018-01-31 14:52:10 +08:00
chenying cf1fb3610d Add the checkpoint copy API for Karbor
Change-Id: I203733f9e810e16bcaba8e3ac7d11d06e4347372
Implements: blueprint support-copy-the-checkpoint-api
2017-11-13 15:28:09 +08:00
chenying 22ed8a9d9f Add verification API for Karbor
Add VerificationsController to Karbor API. The verify action
of the volume backup plugin is introduced in this patch.
The verify aciton of other plugins will be introduced later.

Implements: blueprint support-verify-the-checkpoint-api
Change-Id: I2fb36fe836b23519aaf0a5219b4404f819f0dc36
2017-10-23 10:33:45 +08:00
jiaopengju fde94b28e3 Add tenant isolation of checkpoints
Change-Id: Iaae21b4c7339f6453c391cb958fb828694b083fd
Implements: blueprint checkpoint-tenant-isolation
2017-10-20 09:22:38 +08:00
Jenkins 653d55d7c2 Merge "Fix NoneType error when got non-exist instance of protectable." 2017-09-26 01:40:15 +00:00
chenying 892f96c9a6 Add pod to the parent resource types of volume protectable plugins
Change-Id: I3e3a76450ba91e9b04400841b13a23efcbd5cca2
Implements: blueprint kubernetes-pods-protection-plugin
2017-09-19 14:33:28 +08:00
ericxiett 1f364aefa4 Fix NoneType error when got non-exist instance of protectable.
When calling show_resource() in protection.manager.ProtectionManager,
the result may be None that got the NoneType has no attribute
 'to_dict'. This patch fixes it.

Change-Id: I895fa492acbac8885cfb27640528280b69ba7c14
Closes-Bug: #1716860
2017-09-14 18:54:20 +08:00
Yuval Brik dfb5c454d7 FS Bank: raise correct exceptions
In 2 places, 'raise' was used without value, and with no exception
context, causing NoneType to be raised. Fix that by raising the correct
exception type. In list_objects, return an empty response if no objects
are found.

Change-Id: Ib7e902bd1f4d491ba0d53c6f9c85559fb7292a4c
2017-07-24 17:24:08 +03:00
Jeremy Liu ccb4985aec Fix bug: karbor-protection can not load provider-registry
We should provide the plugin name as defined in entry_point instead of
the path for the plugin when loading by stevedore.

Change-Id: I1b95699befd1e8a6d7cfdc61d0fe98e8c3c61ca0
Closes-bug: #1701786
2017-07-01 16:24:23 +08:00
Jenkins cabd32674e Merge "Refactor resource.py/Resource" 2017-06-02 02:37:24 +00:00
chenying ffe1b8f25c Add a verification about restore's parameter
The restore properties of restore's parameter have not been
checked. The restore property value should be one of the pr
operties in restore_schema of the plugin.

Closes-Bug: #1686709
Change-Id: I910f74fb4254951b399980c1cd616abc354392a0
2017-06-01 10:53:10 +08:00
zengchen b1255e1966 Refactor resource.py/Resource
Create a class of 'Recource' to replace the original definition.
It will bring several advantages.

1. The new class will be used as tuple which can't be modified,
accessed by name or index.

2. The instance of new class can be hashable whatever the type of
members of instace. So, it can be used in method of 'build_graph'.

3. Add some other functions to it, such as transform it to dict.

4. It is easy to chose members of it to be serialized by modifing
the definition of property of 'Resource'.

Change-Id: Ib5f3fea53bff9fe0a7c3b88339af26b70a6b7d3c
2017-05-31 10:04:55 +08:00
chenying b769957149 Add extra_info field to the response of instances API
User can get the extra_info of resource instances from
the response of this API.

Co-authored-by: xiangxinyong <xiangxinyong@huawei.com>

blueprint instances-extra-info
Change-Id: Id97b8e5b3c29283320f5d4aa81d3947505b35671
2017-03-30 22:55:42 +08:00
zhangshuai 9b88f73b87 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I62bf3bda7a0769fc8ff941d8238222beb392cf68
2017-03-17 05:11:16 +08:00
Jenkins cc6be6a8c4 Merge "Add metadata parameter to checkpoint API" 2017-03-13 13:40:31 +00:00
chenying 9ee39b54b9 Add metadata parameter to checkpoint API
Co-Authored-By: zhangshuai <446077695@qq.com>

Change-Id: I34c3f2996b11a0597091276eedd120c5222073b4
blueprint smaug-checkpoint-metadata
2017-03-09 23:28:36 +08:00
Yuval Brik 24e0ef24ad client_factory, keystone plugin: lazy init
Change-Id: I0aeddb50fea40d2ce6fd4b7abc9a759b6898e92f
2017-03-09 04:26:09 +08:00
chenying fa9fd3b1a1 Update the nova backup protection plugin
Refactor the nova backup protection plugin with the new protection plugin
API, using hooks.

Change-Id: I4239ea22fef2d294124bf661435e325388366127
2017-02-07 15:53:45 +02:00
zhangshuai 198ea44701 Checkpoint list bug
When I create some checkpoints by "OS Infra Provider" and "Noop",
and I query checkpoints by one provider(such as "OS Infra Provider"),
it return all checkpoints include "OS Infra Provider" and "Noop".

Change-Id: Ia93d3131b2d9df8fea6a5d7a66027ae652d4cfa1
Closes-Bug: #1657394
2017-01-23 05:01:40 +08:00
zengchen 6386bf5bf5 Prepare for refactoring clients used in protect service
This patch has done the preparation works for refactoring clients,
such as initiate keystone plugin, generate session etc. There are
several patches to do for refactoring the clients.

Change-Id: I61d2a42fb6f0de2d98714a7e19c1a220dec95082
Implements: blueprint refactor-clients
Partial-Bug: #1566793
2017-01-22 11:56:49 +08:00
Yuval Brik 04e2086ad9 Use parenthesis instead of slash for multiline
Change-Id: I4111fb46613cf44645cb2f276a21be685de865d8
2016-12-25 10:23:19 +02:00
Yuval Brik baa11d49dc Refactor flows
Refactor flows:
  - rename flows into a short-name logical operations
  - rename all 'restoration' into 'restore'

Change-Id: Ib676508b14b114a24c370e70f8e375d41239a973
2016-12-22 16:55:15 +02:00
Yuval Brik a80b9cc283 Stabilize Protection Plugin API
Protection plugin now needs to implement methods for each operation
(protect, delete, restore). Each protection plugin is created in the
context of the flow, while each operation is created in the context of
the resource.

A protection plugin is responsible for returning an Operation class for
each operation. Such Operation class defines the behavior of the
protection plugin by implementing these optional hooks:

- on_prepare_begin hook is invoked before any hook of this resource and
  dependent resources has begun
- on_prepare_finish hook is invoked after any prepare hooks of dependent
  resources are complete.
- on_main hook is invoked after the resource prepare hooks are complete
- on_complete hook is invoked once the resource's main hook is
  complete, and the dependent resources' on_complete hooks are complete

HeatTemplate is now created and supplied from a task instead of being
created and passed to resource tasks before the restore operation began.

Change-Id: I847eec6990b2d24a66a12542d242fbfb682272fe
Co-Authored-By: Saggi Mizrahi <saggi.mizrahi@huawei.com>
Implements: blueprint protection-plugin-is-design
2016-12-19 15:09:55 +02:00
Yuval Brik 223eeaf1cf Raise ProviderNotFound from ProviderRegistry
ProviderRegistry used to return None when the provider was not found.
Change this behavior - ProviderRegistry raises ProviderNotFound, and
it is the caller responsibility to handle the exception.

Change-Id: I249875412c7307161f9022190807f8907e8f5f1e
2016-11-28 17:32:21 +02:00
Yuval Brik 5a523b2cb7 restore: update success only upon heat complete
Currently, immediatelly after heat stack has been created, status is
updated to success, without waiting for the stack result.
Instead, set the success status only after heat stack finished
successfully.

Change-Id: I60c795ec547070b7d53f31fbd7865c573efe4433
2016-10-26 11:34:49 +03:00
chenying 8af4ffc5f7 Add parameters field for protectable instances API
Scenario #1
User need a parameter for the region name to query resource
instances from different region endpoint.

Scenario #2
User uses the Protectable Instances API to query database
instances from the verdor's backup software. User must provide
some parameters about authentication to the restfull API of the
verdor's backup software.

A dict type parameter is needed for Protectable Instances API.
And it is optional.

blueprint instances-parameters

Change-Id: I6677e86467c516433a1ba15eac42f339b953d3d9
2016-10-14 16:17:45 +08:00
Jenkins 77ae06ccab Merge "Allow deletion of erroneous checkpoints" 2016-10-09 10:18:03 +00:00
Yuval Brik 4b0b5af7d2 Allow deletion of erroneous checkpoints
In a case where checkpoint creation has failed, allow deletion
of the stale checkpoint.

Change-Id: Ia81c1ef08d5a21b534fa6123cbb4dea1abda4a2c
2016-09-29 14:15:48 +03:00
Yuval Brik 47695ae2be Allow restore only when checkpoint is available
Change-Id: Iab4a87f52595c203af490ba248df2164802da625
2016-09-29 14:13:44 +03:00
Yuval Brik 3771bdd1a9 Move restore auth parameters to restore_auth attr
Restore REST body includes the parameters attribute which specifies
each resource or resource type paramters according to protection
plugin's restore schema.
Restore target auth parameters (such as username and password) to be
sent in 'restore_auth' dictionary in the restore body and not saved
in the restore object.

Change-Id: I7e73d2a0f1d347e83c9bb412649533700bd35ea4
2016-09-18 09:47:13 +03:00
chenying 1c60dac7fa Change Smaug to Karbor
There was a decision in the community to change the project name.

Change-Id: I8b3d538b9573ebaa2a873f4696e1f1a500c941a8
2016-08-18 22:55:34 +08:00