cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1263
Views
0
Helpful
2
Replies

broken xmlagent on nexus 3048 (7.0(3)I2(1))

john.molnar1
Level 1
Level 1

Originally posted here:  n3k xmlagent api failure enabling features | Network Management | Cisco Support Community | 5931 | 12692416

Duplicating in this forum for posterity.

----

I am seeing some very differerent (broken?) behavior on a nexus 3048 [ version 7.0(3)I2(1) ] compared to a nexus 5548 [ version 7.0(0)N1(1) ] when using the xmlagent api.   Specifically, enabling either 'lacp' and/or 'interface-vlan' on the 3048 fails while it succeeds on the 5548.  This is with two different flavors of XML, too.   Other features can be succesfully enabled on the 3048, though.

Both of these two XML documents successfully enable 'interface-vlan' and/or 'lacp' on the 5548, but fail on the 3048.

1.

<?xml version="1.0"?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="3">
<nxos:exec-command>
<nxos:cmd>conf t</nxos:cmd>
<nxos:cmd>feature interface-vlan</nxos:cmd>
</nxos:exec-command>
</nc:rpc>
]]>]]>

2.

<?xml version="1.0"?>
<nc:rpc message-id="18" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns="http://www.cisco.com/nxos:1.0:if_manager">
<nc:edit-config>
<nc:target>
<nc:running/>
</nc:target>
<nc:config>
<configure>
<__XML__MODE__exec_configure>
<feature>
<interface-vlan/>
</feature>
</__XML__MODE__exec_configure>
</configure>
</nc:config>
</nc:edit-config>
</nc:rpc>
]]>]]>


For the 5548 the xml reply is as expected (again, with *BOTH* of these xml documents) and the features are enabled as one would expect.

<?xml version="1.0" encoding="ISO-8859-1"?>
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="http://www.cisco.com/nxos:1.0:if_manager" message-id="18">
<nc:ok/>
</nc:rpc-reply>

For the 3048, however, *neither* of these two features can be enabled, while other features can be succesfully enabled.  This is true with both the 'xmlagent' and the 'netconf' ssh subsystems, and the error for both are identical.  For completeness, I'm am including the entire ssh conversation, including hello for the xmlagent subsystem.  The first command fails with the "err status [-500]", while the second one (only different is the 'vtp' feature instead) succeeds.

First, I have the features disabled, as shown through the CLI:

a3048(config)# show feature | egrep "interface-vlan|lacp|vtp"
interface-vlan 1 disabled
lacp 1 disabled
vtp 1 disabled

Now, through the XML api, attempt to enable them individually.  First I enable interface-vlan (fail), then lacp (fail), then I enable vtp just to show that it does work on some (most?) features.

%> ssh admin@172.16.11.130 -s xmlagent
Nexus 3000 Switch
Password:
<?xml version="1.0" encoding="ISO-8859-1"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:base:1.0</capability>
</capabilities>
<session-id>21933</session-id>
</hello>
]]>]]>
<?xml version="1.0"?>
<nc:hello xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<nc:capabilities>
<nc:capability>urn:ietf:params:xml:ns:netconf:base:1.0</nc:capability>
</nc:capabilities>
</nc:hello>]]>]]>

<?xml version="1.0"?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="3">
<nxos:exec-command>
<nxos:cmd>conf t</nxos:cmd>
<nxos:cmd>feature interface-vlan</nxos:cmd>
</nxos:exec-command>
</nc:rpc>
]]>]]>

<?xml version="1.0" encoding="ISO-8859-1"?>
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="3">
<nc:rpc-error>
<nc:error-type>application</nf:error-type>
<nc:error-tag>invalid-value</nf:error-tag>
<nc:error-severity>error</nf:error-severity>
<nc:error-message>command feature interface-vlan executed with err status [-500]
</nc:error-message>
<nc:error-info>
<nc:bad-element>&lt;cmd&gt;</nf:bad-element>
</nc:error-info>
</nc:rpc-error>
</nc:rpc-reply>
]]>]]>

<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="3">
<nxos:exec-command>
<nxos:cmd>conf t</nxos:cmd>
<nxos:cmd>feature lacp</nxos:cmd>
</nxos:exec-command>
</nf:rpc>
]]>]]>

<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="3">
<nf:rpc-error>
<nf:error-type>application</nf:error-type>
<nf:error-tag>invalid-value</nf:error-tag>
<nf:error-severity>error</nf:error-severity>
<nf:error-message>command feature lacp executed with err status [-500]
</nf:error-message>
<nf:error-info>
<nf:bad-element>&lt;cmd&gt;</nf:bad-element>
</nf:error-info>
</nf:rpc-error>
</nf:rpc-reply>
]]>]]>

<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="3">
<nxos:exec-command>
<nxos:cmd>conf t</nxos:cmd>
<nxos:cmd>feature vtp</nxos:cmd>
</nxos:exec-command>
</nf:rpc>
]]>]]>

<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="3">
<nf:ok/>
</nf:rpc-reply>

And you can see, again through the CLI, that only the vtp was enabled, however both can be successfully enabled through that same CLI:

a3048(config)# show feature | egrep "interface-vlan|lacp|vtp"
interface-vlan 1 disabled
lacp 1 disabled
vtp 1 enabled
a3048(config)# feature lacp
a3048(config)# feature interface-vlan
a3048(config)# show feature | egrep "interface-vlan|lacp|vtp"
interface-vlan 1 enabled
lacp 1 enabled
vtp 1 enabled
a3048(config)#

The second XML document fails on the 3048 with what looks like an xml schema validation error instead of the "err status [-500]" even though it succeeds on the 5548:

<?xml version="1.0"?>
<nc:rpc message-id="18" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns="http://www.cisco.com/nxos:1.0:if_manager">
<nc:edit-config>
<nc:target>
<nc:running/>
</nc:target>
<nc:config>
<configure>
<__XML__MODE__exec_configure>
<feature>
<lacp/>
</feature>
</__XML__MODE__exec_configure>
</configure>
</nc:config>
</nc:edit-config>
</nc:rpc>]]>]]>

<?xml version="1.0" encoding="ISO-8859-1"?>
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="http://www.cisco.com/nxos:1.0:if_manager" message-id="18">
<nc:rpc-error>
<nc:error-type>application</nc:error-type>
<nc:error-tag>invalid-value</nc:error-tag>
<nc:error-severity>error</nc:error-severity>
<nc:error-message>Element '{http://www.cisco.com/nxos:1.0:if_manager}feature': This element is not expected. Expected is one of ( {http://www.cisco.com/nxos:1.0:if_manager}no, {http://www.cisco.com/nxos:1.0:if_manager}system, {http://www.cisco.com/nxos:1.0:if_manager}errdi</nc:error-message>
</nc:rpc-error>
</nc:rpc-reply>
]]>]]>

Since the original post, I have found several other xmlagent commands which result in either a 'failure' xml response, or (more concerning) a 'success' xml response but with no change to the actual config.  eg, the setting of a int description 'succeeds' but does not actually set the description as shown by a "show int ethernet 1/48 desc":

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"

  xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="f0db7fc5-00b9-49bb-a2fb-dcf19ddca401">

  <nxos:exec-command>

   <nxos:cmd>config t</nxos:cmd>

   <nxos:cmd>   interface Ethernet 1/48</nxos:cmd>

   <nxos:cmd>      description Lab Uplink</nxos:cmd>

   <nxos:cmd>      exit</nxos:cmd>

  </nxos:exec-command>

</nf:rpc>

]]>]]>

<?xml version="1.0" encoding="ISO-8859-1"?>

<nf:rpc-reply xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos="http://www.cisco.com/nxos:1.0" message-id="f0db7fc5-00b9-49bb-a2fb-dcf19ddca401">

  <nf:ok/>

</nf:rpc-reply>

]]>]]>

and from the CLI:

b3048(config)# show interface ethernet 1/48 description

-------------------------------------------------------------------------------

Port          Type   Speed   Description

-------------------------------------------------------------------------------

Eth1/48       eth    1000    --

b3048(config)# interface ethernet 1/48

b3048(config-if)# description Lab Uplink

b3048(config-if)# exit

b3048(config)# show interface ethernet 1/48 description

-------------------------------------------------------------------------------

Port          Type   Speed   Description

-------------------------------------------------------------------------------

Eth1/48       eth    1000    Lab Uplink

Am I missing something here?

thanks,

--john molnar

Lead Dev -- stratacloud.com

2 Replies 2

john.molnar1
Level 1
Level 1

I can confirm that most of these failures are not present on NS-OS v 6.0(2)U6(4).   I haven't tried everything, but it definitely looks like that the 3048 with the NX-OS 7.0(3)I2(1) release has some fairly major xmlagent/xml-api issues.

Hi John,

   Apologies for the delay in responding . Did you had chance to get in touch with the NX-API community.

Reference -Cisco DevNet: NX-API - Overview

Also in https://opennxos.cisco.com/public/api/nxapi-rest/

Iam not an expert related to nexus. Saw your post with TAC also.

Thanks and Regards,

Geevarghese