Many python files have their executable permissions flag set but they shouldn't Removed executable flag from files that did not need it
Closes-Bug: #2055736
Change-Id: Ic04051fdc597b2f915f76e4c4c47f392354ddfe1
When an action is cancelled, it should release any associated cluster or
node locks so that new operations can be performed on the cluster or
node.
Remove action status check for action force operation.
Change-Id: I6a520a90feed7ab1e9c99a595863ca3ff90aef40
When policy check fails, the cluster lock will not be released because
the the policy check status is incorrectly set to ok. This patch fixes
it so the cluster lock is released on failed policy checks.
Change-Id: I6f964d16e243476730e1fd5a628fa6a4870a0c6f
Closes-Bug: #1903568
The policy_check needs to load projects without project safe restriction
because it is possible for users to attach policies belonging to other
projects.
Change-Id: I019e7765bdce3f3338167ce11660f4eae70639fc
Closes-Bug: #1896099
Current, an action was created haven't information of a cluster.
When a specific action is created, we do not know what action this action takes
in a cluster and when we execute the query API:
GET http://senlin_host:8777/actions
so many actions are returned even though we can limit using parameters
such as name, target, action, status combined with limit and marker.
But, we can't just get the actions executed in a particular cluster.
So, I want us to be able to do this by enabling the query with a cluster_id parameter.
To accomplish this, I need to modify the schema of
action models and action tables in the database of senlin service.
Change-Id: I49d172414eecf9158192cf0869abb91822ee2226
This patch allows the cluster delete actions to detach policies
and delete receivers for the cluster being deleted. This
simplifies deleting clusters by not having to detach or delete
all dependancies from it beforehand.
Depends-On: https://review.opendev.org/657713/
Change-Id: I9c723516a65a43533e0589bc85bd485a6387711b
This patch adds node_operation to lock & conflict bypass. This
allows the node operation to be accepted even when a cluster is
locked.
This fixes an issue when a cluster stop_on_delete flag is set.
Change-Id: Ic92eda3964c0a90aac165b412243f62c2933e459
This patch adds the force query parameter to action_update.
When force is set to true on an action cancel request the
action status will be updated in the database to cancelled
rather than signaled to cancel. This will also update any
child actions to update their status in the database to
cancelled.
Change-Id: I45ab4a6ad57e3bfe791da1d2e70d3b2ed3ad9a21
This patch implements the action_update API to allow the status
of an action to be updated. For now we are only accepting
'CANCELLED' as a valid status value.
Implements: blueprint action-update
Change-Id: I76402401cb67bc9a2aa1df43ec0f28fc446f04bd
When cluster/node actions were updated to reject when there is a
conflict/lock we broke the way CLUSTER_DELETE could steal the
lock from a cluster. This changes makes CLUSTER_DELETE actions
able to steal locks and ignore conflicts. However a
CLUSTER_DELETE action can conflict with another CLUSTER_DELETE.
Change-Id: Ia771449c76d0d7bb07ffc0cc37317f47f900db48
Closes-Bug: 1800549
This patch alters the cluster_scale_in and cluster_scale_out actions to
no longer place the action into the actions table when a conflict is
detected. This behavior is an improvement on the old way actions are
processed as the requester will now receive immediate feedback from the API
when an action cannot be processed. This change also honors the scaling
action cooldown in the same manner by erring via the API when a scaling
action cannot be processed due to cooldown.
Depends-On: https://review.openstack.org/#/c/602460/
Implements: blueprint scaling-action-acceptance
Change-Id: If0dcf5e427d3d6973d2c5e52fada8a6c925240d5
- If an action targets a cluster or node that is already locked, reject
the action with 409 error.
- Added simulated wait time option to nova test driver to allow tempest
to test resource locked exception.
Implements: blueprint fail-fast-locked-resource
Change-Id: I27b6996c65ffd1777dad5047f869596373e693c7
- Move cooldown check inside pre-op of scaling policy. Cooldown only
applies to scaling policy so it doesn't make sense to check it for all
the other policies.
- Move last_op update into post_op of scaling policy.
- Change policy_check for scaling policy to pass for AFTER if action is
either scale out or scale in. This allows the post_op of the scaling
policy to be called and the last_op to be updated for either scaling action.
Closes-Bug: 1795503
Change-Id: I043cb2b67648c5767d00aca05b8d0825a6a371dc
* Consistently use """ instead of ''' for comments and multi-line text
* Wrap multi-line calls in round brackets, instead of backslashes
Change-Id: I51f6efef0a433ae425d28a821fd9131a02bd6699
- Add lockmode to some DB APIs
- Improve event module to handle entity not set case
- Improve action deserialize operation for better initialization
Change-Id: I3d636e9c73b8ebfae3112601b402a546877afaff
* Added lifecycle hook properties to deletion policy
* Check if deletion policy has lifecycle hook properties during
deletion and perform lifecycle specific actions if it does
* Added complete lifecycle API endpoint
* Bumped microversion to 1.9
* Added unit-test cases for lifecycle hooks
* Added lifecycle hook notification
* Added lifecycle hook properties to deletion policy
* Modified node_action to process policy preop if it was a
derived action with lifecycle hook properties
* Modified LB policy to defer deletion of node until node_deletion
action is executed if lifecycle hook properties are defined in
deletion policy
* Added zaqar test driver
* Added documentation for lifecycle hook
Depends-On: Id7804abc351c063563b58fb69a66074d0d854ecf
Change-Id: I888a01c4f26959649121d6f82430017858a4c481
It report the error with "Field `user' cannot be None" when
I create a cluster.
I found the RequestContext() code had changed from 'user' to
'user_id' in the commit 66e8486c27,
but in action/base.py, the params were not to changed. So cause
the 'user' is None and cannot create a cluster successfully.
I modify the 'user' to 'user_id' to match the RequestContext()
of context.py.
Closes-Bug: #1740377
Change-Id: Id0e12c31b4e107bb0c69c394e81d3e0ef10462f9
There have been changes to oslo_context which are producing a lot of
annoying warning messages. This patch is an attempt to silent them.
Change-Id: I7c47daebe093ca814a14c972d9d5d53e8103afc9
this patch add retry times and retry interval which are configurable.
please help review this patch, I'm not comfotable with line 327,328.
Is that better that we add parameter to ao.Action.abandon() to pass
the data field?
Change-Id: I65d200ce43c33434b8b33187d9f97d800f0e0916
There are cases where we make assertions about the requirements upon a
request. We should use 'must' instead of 'should' because the latter
implies that the assertion is optional.
Change-Id: I14c5cf0a71cc27147f243316bfb04d53af6e59a5
This patche fixes scheduing problem about abondon action. The action can't
get lock and setted to "READY" status, but may not be schedued util next action
come.
Change-Id: Id335b0095052206e62b2407bea57d67a4b9f9634
Closes-Bug: #1682002
When policy check succeeds, we are not supposed to emit an event (either
to database or to message queue) because the success of such a check is
not interesting to users at all. They only care about the abnormal
behaviors, aka. errors or warnings.
Change-Id: I4cfbb8fb90aeefc3750365c9d3998bd3246c21d1
This removes the 'load_all' method from the cluster_policy module. We
are using the cluster_policy versioned object as an alternative.
Change-Id: I7f1df0441d808341dd50ffa6f20f36ccc1cb54ab
The 'load_all' class methods in both cases are no longer used anywhere
any more. This proposes a removal of them.
Change-Id: I55ac335bf18f7c5f77083697c71d7ff1e3469158
This patch replaces the definition about action cause in action base
class with the definition in consts module.
Change-Id: I262dc188fd62f764c2e293793992aa0f802f3dae
Admin users are designed to retrieve objects from all projects even
take actions on them, this will cause a lot problems, for example:
1. name_unique checking issue:
https://bugs.launchpad.net/senlin/+bug/1652742
2. cluster-node-add, admin user can add projectB's node to projectA's
cluster
Admin users should respect the project concepts as well, this patch
enforces project_safe checking fro admin users. And as for some actions
that admin users should be authorized to retrieve things from all projects,
will be added in following patches.
Change-Id: I7103efabccbb4d10c2572e2df51a38ade009df84
action-show can't show user and project, this patch
adds in server side.
Other patches will follow up.
Change-Id: Iaef6c3a6dcb2ae688669d736f1850112d9916faa
Closes-Bug: #1652423
'NotImplementedError' is the name of an exception, 'NotImplemented' is
the name of a constant. This patch fixes the usage.
Change-Id: If6293e1644a4c95d27114b2c28a2a264f65c330a
No need to retry, just wait for engine to pick action up again.
The workflow is:
ActionProc -> action.execute() -> return RES_RETRY
-> action.set_status -> ignore RES_RETRY and continue
Change-Id: Ic622a79b754131171cb940aa9f31ec5aef11ee47
Closes-Bug: #1648681
This furter simplifies the event dispatch interface considering we are
unnecessarily complicating the interface specification.
partial-blueprint: generic-event
Change-Id: I623e472404bfdcc4d791779a2e0b99a8b334d611
This patch fixes the event calls from the action base class. It is
effectively removing the situation where we pass Action class as entity
when logging, thus we don't need to check it later.
Change-Id: I08bcba4d6979644f8fa58d7bad1bb57619af4761
partial-blueprint: generic-event
When signaling an action for different reasons, these are mostly not
originated from users thus not suitable for event generation or
notification. In future when we add support to action-notify, we can
override the 'signal()' method in subclasses to resurrect this
functionality. This patch removes the call to EVENT module for ease of
handling notifications in a consistent manner.
partial-blueprint: generic-event
Change-Id: I4baa22227a48b8fd6d2122ebc223c0a392578982