Skip to content

get_table - rpc timeout #242

@pshemk

Description

@pshemk

I'm trying to pull the routing table using get_table:

RouteTable:
  rpc: get-route-information
  args_key: destination
  item: route-table/rt
  key: rt-destination
  view: RouteTableView
   - name: get routing table
     junos_get_table:
      host: "10.69.0.208"
      user: "*****"
      passwd: "*****"
      table: "RouteTable"
      file: "routes.yml"
      logfile: "/tmp/10.69.0.208.log"

But that times out:


$ ansible-playbook -i ./inventory/ ./getdata.yaml

PLAY [fetch info] ****************************************************************************************************************************************************************************

TASK [get facts from device] *****************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ncclient.operations.errors.TimeoutExpiredError: ncclient timed out while waiting for an rpc reply.
fatal: [10.69.0.208]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_YoigC2/ansible_module_junos_get_table.py\", line 268, in <module>\n    main()\n  File \"/tmp/ansible_YoigC2/ansible_module_junos_get_table.py\", line 258, in main\n    dev.close()\n  File \"/usr/local/lib/python2.7/dist-packages/jnpr/junos/device.py\", line 1250, in close\n    self._conn.close_session()\n  File \"/usr/local/lib/python2.7/dist-packages/ncclient/manager.py\", line 162, in wrapper\n    return self.execute(op_cls, *args, **kwds)\n  File \"/usr/local/lib/python2.7/dist-packages/ncclient/manager.py\", line 232, in execute\n    raise_mode=self._raise_mode).request(*args, **kwds)\n  File \"/usr/local/lib/python2.7/dist-packages/ncclient/operations/session.py\", line 28, in request\n    return self._request(new_ele(\"close-session\"))\n  File \"/usr/local/lib/python2.7/dist-packages/ncclient/operations/rpc.py\", line 343, in _request\n    raise TimeoutExpiredError('ncclient timed out while waiting for an rpc reply.')\nncclient.operations.errors.TimeoutExpiredError: ncclient timed out while waiting for an rpc reply.\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}

The log doesn't show anything suspicious:

2017-05-23 01:33:06,348:CONFIG:10.69.0.208:connecting to host: *****@10.69.0.208:830
2017-05-23 01:33:06,424:ncclient.transport.ssh:Connected (version 2.0, client OpenSSH_6.2)
2017-05-23 01:33:07,059:ncclient.transport.ssh:Authentication (password) successful!
2017-05-23 01:33:10,309:ncclient.transport.session:initialized: session-id=55639 | server_capabilities=<dictionary-keyiterator object at 0x7f0361a129f0>
2017-05-23 01:33:10,317:CONFIG:10.69.0.208:Getting data from device
2017-05-23 01:33:10,317:ncclient.operations.rpc:Requesting 'ExecuteRpc'
2017-05-23 01:33:40,321:CONFIG:10.69.0.208:Uncaught exception - please report: RpcTimeoutError(host: 10.69.0.208, cmd: get-route-information, timeout: 30)
2017-05-23 01:33:40,321:ncclient.operations.rpc:Requesting 'CloseSession'

I suspect it might have something to do with the size of the table, so is there a way to somehow limit the scope of the request (either to given routing instance or even a single prefix)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions