py-junos-eznc icon indicating copy to clipboard operation
py-junos-eznc copied to clipboard

NSSU upgrade fails on EX4300

Open jgeromero opened this issue 3 years ago • 1 comments

Hello,

We are trying to use junos-eznc 2.6.6 to upgrade a fleet of EX4300s but we are encountering the following traceback:

Traceback (most recent call last): File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/nornir/core/task.py", line 99, in start r = self.task(self, **self.params) File "/opt/devnet/legacy_upgrades/upgrade_legacy.py", line 285, in junos_upgrade ok, msg = sw.install( File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/utils/sw.py", line 986, in install return self.pkgaddNSSU(remote_package, dev_timeout=timeout, **kwargs) File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/utils/sw.py", line 261, in pkgaddNSSU rsp = self.rpc.request_package_nonstop_upgrade( File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/rpcmeta.py", line 364, in _exec_rpc return self._junos.execute(rpc, **dec_args) File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/decorators.py", line 76, in wrapper return function(*args, **kwargs) File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/decorators.py", line 23, in wrapper result = function(*args, **kwargs) File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/device.py", line 834, in execute rpc_rsp_e = self._rpc_reply( File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/decorators.py", line 117, in wrapper rsp = function(self, *args, **kwargs) File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/jnpr/junos/device.py", line 1457, in _rpc_reply return self._conn.rpc(rpc_cmd_e, filter_xml)._NCElement__doc File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/ncclient/manager.py", line 246, in execute return cls(self._session, File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/ncclient/operations/third_party/juniper/rpc.py", line 52, in request return self._request(rpc) File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/ncclient/operations/rpc.py", line 365, in _request self._reply.parse() File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/ncclient/operations/rpc.py", line 161, in parse root = self._root = to_ele(self._raw, huge_tree=self.huge_tree) # The element File "/home/user/.cache/pypoetry/virtualenvs/upgrade-legacy-gUjTTpEG-py3.9/lib/python3.9/site-packages/ncclient/xml.py", line 129, in to_ele return x if etree.iselement(x) else etree.fromstring(x.encode('UTF-8'), parser=_get_parser(huge_tree)) File "src/lxml/etree.pyx", line 3254, in lxml.etree.fromstring File "src/lxml/parser.pxi", line 1913, in lxml.etree._parseMemoryDocument File "src/lxml/parser.pxi", line 1800, in lxml.etree._parseDoc File "src/lxml/parser.pxi", line 1141, in lxml.etree._BaseParser._parseDoc File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError File "", line 123 lxml.etree.XMLSyntaxError: PCDATA invalid Char value 12, line 123, column 296

The target version we are attempting the upgrade for is 21.4R3-S2.4 any clues as why this is happening?

jgeromero avatar Feb 12 '23 00:02 jgeromero

This error usually occurs when there is an invalid character as per the XML specification. Can you please provide the reproduction script that you are trying to run.

apurvaraghu avatar Apr 09 '24 21:04 apurvaraghu

Hi @jgeromero , Closing this issue for now, please feel free to re-open if the issue still persists.

Thanks Chidanand

chidanandpujar avatar Jun 17 '25 09:06 chidanandpujar