We're updating the issue view to help you get more done. 

Snapshot restore fails when deployments number > 1000

Description

The script /opt/manager/env/bin/python /opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_system_workflows/snapshots/fix_snapshot_ssh_db.py fails on restoring on a manager that has already more than 1000 deployments restored. The script misses pagination handling.

1 2 3 4 5 6 7 8 9 10 11 12 13 RuntimeError: Failed running command: /opt/manager/env/bin/python /opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_system_workflows/snapshots/fix_snapshot_ssh_db.py default_tenant /home/cloudify/.ssh/agent_key.pem cfyagent_key___home_cloudify_.ssh_agent_key.pem (Traceback (most recent call last): File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_system_workflows/snapshots/fix_snapshot_ssh_db.py", line 182, in <module> main(original_string, secret_name) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_system_workflows/snapshots/fix_snapshot_ssh_db.py", line 96, in main res = sm.list(model_class=Deployment) File "/opt/manager/env/lib/python2.7/site-packages/manager_rest/storage/storage_manager.py", line 494, in list results, total, size, offset = self._paginate(query, pagination) File "/opt/manager/env/lib/python2.7/site-packages/manager_rest/storage/storage_manager.py", line 330, in _paginate SQLStorageManager._validate_returned_size(total) File "/opt/manager/env/lib/python2.7/site-packages/manager_rest/storage/storage_manager.py", line 358, in _validate_returned_size config.instance.max_results manager_rest.manager_exceptions.IllegalActionError: Response size (1402) bigger than max allowed (1000), please use pagination. ).

Steps to Reproduce

Environment:
OS (CLI), HA cluster, cloud provider
------------------------------------

Steps to reproduce:
------------------
1. Create 1001 deployments with credentials on 3.4.2
2. Create a snapshot
3. Restore on 4.3+

Expected result:
---------------

Actual result:
-------------

Why Propose Close?

None

Status

Assignee

Unassigned

Reporter

Anna Szpoton

Labels

None

Severity

Critical

Target Version

4.4

Premium Only

no

Found In Version

4.3

QA Owner

Uri Wygodny

Bug Type

unknown

Customer Encountered

Yes

Customer Name

None

Release Notes

yes

Priority

None

Sprint

None

Priority

Unprioritized