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

Snapshot restore fails when node instances > 1000

Description

1. Missing pagination of node instances in agent restore
2. Currently if agents restore fails due to this error snapshot continues its restore and do not alert at the end (just the status is terminated), only in logs it's visible; I think some flag like ignore_agent_restore should be added to fail entire snapshot restore without a flag.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2018-07-06 11:32:39,463 [a6a0f748-5237-4c6c-94be-533f49bd812e] WARNING: Failed restoring agents for deployment `CTS_ALRT_P6_ORACLE_4118_1` in tenant `None` Traceback (most recent call last): File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_system_workflows/snapshots/agents.py", line 108, in _insert_agents_data self._create_agent(nodes, tenant_name) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_system_workflows/snapshots/agents.py", line 148, in _create_agent node_instance_id) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_system_workflows/snapshots/agents.py", line 137, in _get_tenant_name node_instances = client.node_instances.list(_all_tenants=True).items File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_rest_client/node_instances.py", line 194, in list _include=_include) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 252, in get timeout=timeout) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 224, in do_request verify=self.get_request_verify(), timeout=timeout) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 158, in _do_request self._raise_client_error(response, request_url) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 119, in _raise_client_error response=response) File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 131, in _prepare_and_raise_exception status_code, error_code=error_code, response=response) CloudifyClientError: 400: Response size (13741) bigger than max allowed (1000), please use pagination.

Steps to Reproduce

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

Steps to reproduce:
------------------
1. Create > 1000 node instances on 3.4.2
2. Create a snapshot
3. Restore a snapshot on 3.4.2

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

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

Why Propose Close?

None

Status

Assignee

Unassigned

Reporter

Anna Szpoton

Labels

None

Severity

High

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