`deployment environment create/delete` and `plugins upload` workflows are not blocked when create snapshot is running

Description

Users can currently run `dep_env_create/delete` workflows while other system workflows are running.
The reason is that when running one of these commands we don't verify whether other workflows are running (see https://github.com/cloudify-cosmo/cloudify-manager/blob/master/rest-service/manager_rest/resource_manager.py#L539).
This means that you can run a snapshots and during the DB backup also run `cfy dep create` - a command that changes the state of the DB.
For some historical reason `_create_deployment_environment' and '_delete_deployment_environment' are system workflows, I think that before executing one of them we need to use the same verification any "regular" (deployment) workflows goes through.

Steps to Reproduce

Steps to reproduce:
------------------
1. Add a `sleep` to https://github.com/cloudify-cosmo/cloudify-common/blob/master/cloudify/dispatch.py#L603 if the execution is 'create_snapshot'
2.Run `cfy deployments create...`

Expected result:
---------------
The second command (`cfy deployments create...`) should raise an error (manager_exceptions.ExistingRunningExecutionError)

Actual result:
-------------
`cfy deployments create...` works while a snapshot is running

Why Propose Close?

None
Done

Assignee

Adi Grabow

Reporter

Adi Grabow

Severity

High

Target Version

4.5

Premium Only

no

Found In Version

4.4

QA Owner

None

Bug Type

legacy bug

Customer Encountered

No

Customer Name

None

Release Notes

no

Priority

None

Sprint

None

Priority

Major
Configure