[BUG] Deltaproxy __proxy_keepalive only works for 1 of 8 subproxys
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
When setting up deltaproxy with napalm, we only get one __prox_keepalive session when expecting 8 one per subproxy
Setup
top.sls:
base:
'delta-*':
- deltaproxy
'*-lab':
- jrouter
- juniper_schedule
jrouter.sls:
proxy:
proxytype: napalm
driver: junos
host: {{ opts.id }}
username: {{ salt['environ.get']('NEBULA_USER_ID') }}
passwd: {{ salt['environ.get']('NEBULA_USER_PW') }}
optional_args:
port: 22
deltaproxy.sls:
{% set delta_number = opts.id.split('-')[3] | int %}
{% do salt.log.debug(delta_number) %}
{% set routers = [
'a1-304763-lab', 'm2-304765-lab', 'a1-304761-lab', 'a1-304762-lab', 'r1-304762-lab',
'b1-304763-lab', 'b1-304761-lab', 'c2-304763-lab', 'c2-304764-lab', 'y1-304763-lab',
'y1-304764-lab', 'c1-304762-lab',
'y2-304761-lab', 'y2-304762-lab',
'm1-304765-lab'
] %}
## 'z1-304763-lab', 'z1-304764-lab', 'z1-304764-lab', 'f2-304765-lab','z1-304761-lab', 'z1-304762-lab','f1-304765-lab',
{% set routers_per_delta = 8 %}
{% set start_index = (delta_number - 1) * routers_per_delta %}
{% set end_index = delta_number * routers_per_delta %}
proxy:
parallel_startup: False
proxytype: deltaproxy
ids:
{% for index in range(start_index, end_index) %}
{% if routers[index] is defined %}
{% do salt.log.debug(routers[index]) %}
- {{ routers[index] }}
{% endif %}
{% endfor %}
Please be as specific as possible and give set-up details.
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service, please be explicit and add details
- [x ] container (Kubernetes)
- or a combination, please be explicit
- jails if it is FreeBSD
- classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the Behavior
(Include debug logs if possible and relevant)
Expected behavior
expected behavior is one jobb per subproxy
Screenshots
images of logs showing only one working __proxy_keepalive when expecting 8
here is one with exact same schedule added via pillar and it works fine.
Versions Report
Salt Version:
Salt: 3006.2
Python Version:
Python: 3.10.4 (main, Apr 20 2022, 01:21:48) [GCC 10.3.1 20210424]
Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: 1.1.0
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: 1.6.1
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: Not Installed
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: alpine 3.14.6
locale: utf-8
machine: x86_64
release: 5.15.0-69-generic
system: Linux
version: Alpine Linux 3.14.6
PASTE HERE
Additional context
Add any other context about the problem here.
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 the proxy definitions in top.sls, jrouter.sls, and deltaproxy.sls, reproducing the Salt 3006.2 setup in the Kubernetes container. Compare the deltaproxy configuration with the equivalent pillar schedule and verify that eight subproxies each create a __proxy_keepalive session and job.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, python
- Domain
- infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100