PaloAltoNetworks / PaloAltoNetworks/pan-os-python
Maximum recursion depth exceeded in High Availability Pairs with Panorama
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 400
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
I am not sure if this is a bug or a problem at my end, but the problem is as follow.
Describe the bug
I am running the code from https://pandevice.readthedocs.io/en/latest/howto.html#high-availability-pairs
but when it tries to create the object, it returns a RecursionError: maximum recursion depth exceeded.
The only difference from the sample, is that I am running with two panoramas and not two firewalls.
Current behavior
Traceback (most recent call last):
File "paloalto_debug.py", line 29, in
pano.add(AddressObject("test", '10.0.1.1', tag='test')).create()
File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 642, in create
self.xpath_short(), element, retry_on_peer=self.HA_SYNC
File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3642, in method
result = getattr(ha_peer.xapi, super_method_name)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3642, in method
result = getattr(ha_peer.xapi, super_method_name)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3642, in method
result = getattr(ha_peer.xapi, super_method_name)(*args, **kwargs)
[Previous line repeated 329 more times]
File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3592, in method
ha_peer = self.pan_device.ha_peer
RecursionError: maximum recursion depth exceeded
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with panos/base.py around the HA proxy method at lines 3592 and 3642, then reproduce the documented high-availability-pairs example using two Panorama devices. Trace how ha_peer delegates the operation and verify that creating an AddressObject completes without recursive calls or a RecursionError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100