mirceaulinic / salt-sproxy

Salt plugin to automate the management and configuration of (network) devices at scale, without running (Proxy) Minions.
https://salt-sproxy.readthedocs.io/en/latest/
Apache License 2.0
117 stars 19 forks source link

Can't configure Junos 18.x using napalm #255

Open mkhachfeh opened 3 years ago

mkhachfeh commented 3 years ago

Describe the bug Hi All,

I was using salt-sproxy for a while with our Juniper-based network, and all was working fine.

I started to find some problems with the new Junos code we use (18.x)

I can communicate with the device (net.connected, net.cli, grains....etc), but I can't configure anything on it via neither net.cli nor net.load_config/template, the device isn't reporting back any diff, and sees that the new configs are already configured, even if the new set file contains new configs not configured on the device for sure.

And I can see nothing coming back from the device via rpc-reply while debugging the request.

I tested that for multiple Juniper devices with the same code, and all are the same wrong behaviour.

For example: - The working operational scenario:

salt-sproxy '10-220-1-9' net.cli 'show system license'
10-220-1-9:
    ----------
    comment:
    out:
        ----------
        show system license:

            License usage: none

            Licenses installed: none
    result:
        True

- The non-working configurational scenario 1, again: vlan888 isn't configured on the device 100%:

salt-sproxy '10-220-1-9' net.load_config text='set vlans vlan888 vlan-id 888'
10-220-1-9:
    ----------
    already_configured:
        True
    comment:
        Already configured.
    diff:
    loaded_config:
    result:
        True

mkh@sw220-1-9> show configuration vlans vlan888

{master:0}
mkh@sw220-1-9>

- The non-working configurational scenario 2:

root@/etc/pillar# cat /etc/salt/ext/REQ.set
set vlans vlan888 vlan-id 888

root@/etc/pillar# salt-sproxy '10-220-1-9' net.load_config filename='/etc/salt/ext/REQ.set'
10-220-1-9:
    ----------
    already_configured:
        True
    comment:
        Already configured.
    diff:
    loaded_config:
    result:
        True

mkh@sw220-1-9> show configuration vlans vlan888

{master:0}
mkh@sw220-1-9>

Within debug what I see during that is the following:

[INFO    ] [host 10.220.1.9 session-id 82730] Requesting 'ExecuteRpc'
[DEBUG   ] [host 10.220.1.9 session-id 82730] queueing <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ff66d123-c081-487d-971f-5d7e2932524a"><lock-configuration/></nc:rpc>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sync request, will wait for timeout=60
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sending message
[INFO    ] [host 10.220.1.9 session-id 82730] Sending:
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ff66d123-c081-487d-971f-5d7e2932524a"><lock-configuration/></nc:rpc>]]>]]>
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[INFO    ] [host 10.220.1.9 session-id 82730] Received message from host
[DEBUG   ] [host 10.220.1.9 session-id 82730] Received:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ff66d123-c081-487d-971f-5d7e2932524a">
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to different listeners: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ff66d123-c081-487d-971f-5d7e2932524a">
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.operations.rpc.RPCReplyListener object at 0x7fa31e732670>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Delivering to <ncclient.operations.third_party.juniper.rpc.ExecuteRpc object at 0x7fa31efeac10>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.transport.session.NotificationHandler object at 0x7fa31e644130>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <jnpr.junos.device.DeviceSessionListener object at 0x7fa31e628370>
[INFO    ] [host 10.220.1.9 session-id 82730] Requesting 'ExecuteRpc'
[DEBUG   ] [host 10.220.1.9 session-id 82730] queueing <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5f53421e-6d44-4c58-91e1-c19ccea38b1e"><load-configuration format="text" action="set"><configuration-set>set vlans vlan888 vlan-id 888
</configuration-set></load-configuration></nc:rpc>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sync request, will wait for timeout=60
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sending message
[INFO    ] [host 10.220.1.9 session-id 82730] Sending:
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5f53421e-6d44-4c58-91e1-c19ccea38b1e"><load-configuration format="text" action="set"><configuration-set>set vlans vlan888 vlan-id 888
</configuration-set></load-configuration></nc:rpc>]]>]]>
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[INFO    ] [host 10.220.1.9 session-id 82730] Received message from host
[DEBUG   ] [host 10.220.1.9 session-id 82730] Received:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5f53421e-6d44-4c58-91e1-c19ccea38b1e">
<load-configuration-results>
<ok/>
</load-configuration-results>
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to different listeners: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5f53421e-6d44-4c58-91e1-c19ccea38b1e">
<load-configuration-results>
<ok/>
</load-configuration-results>
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.operations.rpc.RPCReplyListener object at 0x7fa31e732670>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Delivering to <ncclient.operations.third_party.juniper.rpc.ExecuteRpc object at 0x7fa31f160fd0>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.transport.session.NotificationHandler object at 0x7fa31e644130>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <jnpr.junos.device.DeviceSessionListener object at 0x7fa31e628370>
[INFO    ] [host 10.220.1.9 session-id 82730] Requesting 'ExecuteRpc'
[DEBUG   ] [host 10.220.1.9 session-id 82730] queueing <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:aa19bafc-a8b9-42ee-a9ae-f18de0448176"><get-configuration compare="rollback" rollback="0" format="text"/></nc:rpc>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sync request, will wait for timeout=60
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sending message
[INFO    ] [host 10.220.1.9 session-id 82730] Sending:
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:aa19bafc-a8b9-42ee-a9ae-f18de0448176"><get-configuration compare="rollback" rollback="0" format="text"/></nc:rpc>]]>]]>
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[INFO    ] [host 10.220.1.9 session-id 82730] Received message from host
[DEBUG   ] [host 10.220.1.9 session-id 82730] Received:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:aa19bafc-a8b9-42ee-a9ae-f18de0448176">
<configuration-information>
<configuration-output>
</configuration-output>
</configuration-information>
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to different listeners: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:aa19bafc-a8b9-42ee-a9ae-f18de0448176">
<configuration-information>
<configuration-output>
</configuration-output>
</configuration-information>
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.operations.rpc.RPCReplyListener object at 0x7fa31e732670>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Delivering to <ncclient.operations.third_party.juniper.rpc.ExecuteRpc object at 0x7fa31f0edb80>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.transport.session.NotificationHandler object at 0x7fa31e644130>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <jnpr.junos.device.DeviceSessionListener object at 0x7fa31e628370>
[DEBUG   ] Discarding the config
[DEBUG   ] {'result': True, 'comment': '', 'already_configured': False, 'loaded_config': '', 'diff': ''}
[INFO    ] [host 10.220.1.9 session-id 82730] Requesting 'ExecuteRpc'
[DEBUG   ] [host 10.220.1.9 session-id 82730] queueing <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4ef1fa52-c32d-49c4-aab2-e2db867a3761"><load-configuration compare="rollback" rollback="0"/></nc:rpc>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sync request, will wait for timeout=60
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sending message
[INFO    ] [host 10.220.1.9 session-id 82730] Sending:
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4ef1fa52-c32d-49c4-aab2-e2db867a3761"><load-configuration compare="rollback" rollback="0"/></nc:rpc>]]>]]>
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[INFO    ] [host 10.220.1.9 session-id 82730] Received message from host
[DEBUG   ] [host 10.220.1.9 session-id 82730] Received:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4ef1fa52-c32d-49c4-aab2-e2db867a3761">
<load-configuration-results>
<ok/>
</load-configuration-results>
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to different listeners: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4ef1fa52-c32d-49c4-aab2-e2db867a3761">
<load-configuration-results>
<ok/>
</load-configuration-results>
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.operations.rpc.RPCReplyListener object at 0x7fa31e732670>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Delivering to <ncclient.operations.third_party.juniper.rpc.ExecuteRpc object at 0x7fa31f160f70>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.transport.session.NotificationHandler object at 0x7fa31e644130>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <jnpr.junos.device.DeviceSessionListener object at 0x7fa31e628370>
[INFO    ] [host 10.220.1.9 session-id 82730] Requesting 'ExecuteRpc'
[DEBUG   ] [host 10.220.1.9 session-id 82730] queueing <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ddb0f24c-387a-4366-9703-9a618e7ad6f4"><unlock-configuration/></nc:rpc>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sync request, will wait for timeout=60
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sending message
[INFO    ] [host 10.220.1.9 session-id 82730] Sending:
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ddb0f24c-387a-4366-9703-9a618e7ad6f4"><unlock-configuration/></nc:rpc>]]>]]>
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[INFO    ] [host 10.220.1.9 session-id 82730] Received message from host
[DEBUG   ] [host 10.220.1.9 session-id 82730] Received:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ddb0f24c-387a-4366-9703-9a618e7ad6f4">
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to different listeners: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ddb0f24c-387a-4366-9703-9a618e7ad6f4">
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.operations.rpc.RPCReplyListener object at 0x7fa31e732670>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Delivering to <ncclient.operations.third_party.juniper.rpc.ExecuteRpc object at 0x7fa31f0ed430>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <ncclient.transport.session.NotificationHandler object at 0x7fa31e644130>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to listener: <jnpr.junos.device.DeviceSessionListener object at 0x7fa31e628370>
[INFO    ] [host 10.220.1.9 session-id 82730] Requesting 'CloseSession'
[DEBUG   ] [host 10.220.1.9 session-id 82730] queueing <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f8b65a65-5563-46b3-a7a1-36f2da78487e"><nc:close-session/></nc:rpc>
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sync request, will wait for timeout=60
[DEBUG   ] [host 10.220.1.9 session-id 82730] Sending message
[INFO    ] [host 10.220.1.9 session-id 82730] Sending:
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f8b65a65-5563-46b3-a7a1-36f2da78487e"><nc:close-session/></nc:rpc>]]>]]>
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[DEBUG   ] [host 10.220.1.9 session-id 82730] parsing netconf v1.0
[INFO    ] [host 10.220.1.9 session-id 82730] Received message from host
[DEBUG   ] [host 10.220.1.9 session-id 82730] Received:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f8b65a65-5563-46b3-a7a1-36f2da78487e">
<ok/>
</rpc-reply>
[DEBUG   ] [host 10.220.1.9 session-id 82730] dispatching message to different listeners: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f8b65a65-5563-46b3-a7a1-36f2da78487e">
<ok/>
</rpc-reply>

Versions Report

Salt Version:
           Salt: 3003.3
    Salt SProxy: 2021.6.1

Dependency Versions:
        Ansible: Not Installed
           cffi: 1.14.6
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 3.0.2
     junos-eznc: 2.6.3
       jxmlease: 1.0.3
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 1.0.2
         NAPALM: 3.3.1
       ncclient: 0.6.9
        Netmiko: 3.4.0
       paramiko: 2.8.0
      pycparser: 2.20
       pycrypto: Not Installed
   pycryptodome: 3.11.0
         pyeapi: 0.8.4
         pygit2: Not Installed
       PyNetBox: Not Installed
          PyNSO: Not Installed
         Python: 3.8.10 (default, Sep 28 2021, 16:10:42)
   python-gnupg: Not Installed
         PyYAML: 5.4.1
          PyZMQ: 22.3.0
            scp: 0.14.1
          smmap: Not Installed
        textfsm: 1.1.2
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.4`

Just last note that the same set file+ net commands are working for another Junos code different than 18, tested on 20.4 and 15.1 with no similar problem

Wish it is clear, and thanks in advance.

mkhachfeh commented 3 years ago

@mirceaulinic your ideas here will be super appreciated

mkhachfeh commented 3 years ago

Just to complete the scenario: I tested configs via napalm library from the same host toward same Junos gear, and it success

sh-3.2# cat conf.set
set vlans vlan888 vlan-id 888
-------------------------------
sh-3.2# cat connect_to_junos.py
import napalm
from pprint import pprint as pp

driver = napalm.get_network_driver('junos')
device = driver(hostname='10.220.1.9', username='myuser', password='')

device.open()
device.load_merge_candidate(filename='conf.set')
pp(device.compare_config())
device.commit_config()
device.close()
-------------------------------
sh-3.2# python connect_to_junos.py
'[edit vlans]\n+   vlan888 {\n+       vlan-id 888;\n+   }

So it is proof that it isn't a napalm issue

mkhachfeh commented 3 years ago

Today I tested netconf with the rpc's which are generated with salt command, and it worked smoothly:

sh-3.2# ssh mkh@10.220.1.9 -s netconf
<!-- No zombies were killed during the creation of this user interface -->
<!-- user mkh, class j-super-user -->
<nc:hello xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <nc:capabilities>
    <nc:capability>urn:ietf:params:netconf:base:1.0</nc:capability>
    <nc:capability>urn:ietf:params:netconf:capability:candidate:1.0</nc:capability>
    <nc:capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</nc:capability>
    <nc:capability>urn:ietf:params:netconf:capability:validate:1.0</nc:capability>
    <nc:capability>urn:ietf:params:netconf:capability:url:1.0?protocol=http,ftp,file</nc:capability>
    <nc:capability>urn:ietf:params:xml:ns:netconf:base:1.0</nc:capability>
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</nc:capability>
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</nc:capability>
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</nc:capability>
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file</nc:capability>
    <nc:capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring</nc:capability>
    <nc:capability>http://xml.juniper.net/netconf/junos/1.0</nc:capability>
    <nc:capability>http://xml.juniper.net/dmi/system/1.0</nc:capability>
  </nc:capabilities>
  <nc:session-id>25758</nc:session-id>
</nc:hello>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:44f96beb-9b1d-42e4-aa82-78fe656760bd"><load-configuration format="text" action="replace"><configuration-text>vlans {
    vlan888 {
        description test-salt;
        vlan-id 888;
    }
}
</configuration-text></load-configuration></nc:rpc>]]>]]><nc:rpc-reply  xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:44f96beb-9b1d-42e4-aa82-78fe656760bd">
<load-configuration-results format="text" action="replace">

<nc:ok/>
</load-configuration-results>
</nc:rpc-reply>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9323a656-ffc6-4488-9acd-1eb5e6bff4b1"><get-configuration compare="rollback" rollback="0" format="text"/></nc:rpc>]]>]]>
<nc:rpc-reply  xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9323a656-ffc6-4488-9acd-1eb5e6bff4b1">
<configuration-information compare="rollback" rollback="0" format="text">
<configuration-output>
[edit vlans]
+   vlan888 {
+       description test-salt;
+       vlan-id 888;
+   }
</configuration-output>
</configuration-information>
</nc:rpc-reply>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:cec6936f-eb6a-4ed9-b30d-518e727421e8"><commit-configuration/></nc:rpc>]]>]]>
<nc:rpc-reply  xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:cec6936f-eb6a-4ed9-b30d-518e727421e8">
<commit-results>
<routing-engine junos:style="normal">
<name>fpc0</name>
<commit-check-success/>
<commit-success/>
<commit-revision-information>
<new-db-revision>fpc0-1636643668-148</new-db-revision>
<old-db-revision>fpc0-1636643324-147</old-db-revision>
</commit-revision-information>
</routing-engine>
</commit-results>
<nc:ok/>
</nc:rpc-reply>
]]>]]>
exit
<rpc>
    <close-session/>
</rpc>

So I can ignore that it is netconf problem

mkhachfeh commented 2 years ago

Another update:

I tested the configs using salt minion, not salt-sproxy, and it worked smoothly with no problem.

So seems to me it is a limitation in salt-sproxy only, not on related packages.