Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault during creation GRE tunnel on IOS XE #632

Closed
ghost opened this issue Nov 16, 2017 · 6 comments
Closed

Segfault during creation GRE tunnel on IOS XE #632

ghost opened this issue Nov 16, 2017 · 6 comments
Labels

Comments

@ghost
Copy link

ghost commented Nov 16, 2017

From community

Expected Behavior

I trying to create tunnel on IOS XE, but if I try set tunnel source or destination - script interrupted with segmentation fault.

Your Script

crud = CRUDService()
 
 
native = xe_native.Native()
interface = native.Interface()
tunnel = interface.Tunnel()
tunnel.name = 521
tunnel.description = "test tunnel"
tunnel.vrf.forwarding="PostNscrub"
#tunnel.ip.address.primary.address= "192.168.201.202"
#tunnel.ip.address.primary.mask="255.255.255.254"
tunnel.ip.tcp.adjust_mss=1436
tunnel.tunnel.source="Lo103"
#tunnel.tunnel.destination="8.8.8.8"
interface.tunnel.append(tunnel)
crud.create(provider, interface)

Logs

Enable logging and post the logs below

2017-11-15 21:34:14,971 - ydk - DEBUG - Path found with rev: true. Path without rev: false
2017-11-15 21:34:14,972 - ydk - DEBUG - Debug: Module "Cisco-IOS-XE-features" already in context.
2017-11-15 21:34:14,973 - ydk - DEBUG - Debug: Module "Cisco-IOS-XE-features" successfully parsed.
2017-11-15 21:34:14,979 - ydk - DEBUG - Debug: Module "Cisco-IOS-XE-tunnel" successfully parsed.
2017-11-15 21:34:14,979 - ydk - DEBUG - Added new libyang module 'Cisco-IOS-XE-tunnel'
2017-11-15 21:34:14,979 - ydk - DEBUG - Populating new module schema 'Cisco-IOS-XE-tunnel'
2017-11-15 21:34:14,979 - ydk - DEBUG - Populating augmented schema node 'config-interface-tunnel-grouping'
2017-11-15 21:34:14,980 - ydk - DEBUG - Populating new schema node 'nhrp'
2017-11-15 21:34:14,980 - ydk - DEBUG - Populating augmented schema node 'config-interface-tunnel-grouping'
2017-11-15 21:34:14,981 - ydk - DEBUG - Populating new schema node 'nhrp'
2017-11-15 21:34:14,981 - ydk - DEBUG - Current path: /Cisco-IOS-XE-native:native/config-interface-grouping/interface/Tunnel
2017-11-15 21:34:14,982 - ydk - DEBUG - Top container path: Cisco-IOS-XE-native:native
2017-11-15 21:34:14,982 - ydk - DEBUG - Module 'Cisco-IOS-XE-tunnel' Revision ''
2017-11-15 21:34:14,982 - ydk - DEBUG - Cache hit Module 'Cisco-IOS-XE-tunnel' Revision ''
2017-11-15 21:34:14,982 - ydk - DEBUG - Getting child schema with path 'Cisco-IOS-XE-tunnel:tunnel' in Tunnel
2017-11-15 21:34:14,983 - ydk - DEBUG - Getting data nodes with path 'Cisco-IOS-XE-tunnel:tunnel'
2017-11-15 21:34:14,983 - ydk - DEBUG - Creating new data path 'Cisco-IOS-XE-tunnel:tunnel' with value '' in 'Tunnel'
2017-11-15 21:34:14,983 - ydk - DEBUG - Leaf count: 1
2017-11-15 21:34:14,984 - ydk - DEBUG - Creating child source of /Cisco-IOS-XE-native:native/interface/Tunnel[name='521']/Cisco-IOS-XE-tunnel:tunnel with value: 'Lo103', is_set: true

System Information

ydk 062

@ghost ghost added the bug label Nov 16, 2017
@psykokwak4
Copy link
Contributor

The 'config-interface-tunnel-grouping' looks wired

@ghost
Copy link
Author

ghost commented Jan 3, 2018

Segfault does not occur anymore, but still seeing below exception

2018-01-03 10:33:01,422 - ydk - ERROR - Couldn't fetch schema node source!
ERROR:ydk:Couldn't fetch schema node source!
---------------------------------------------------------------------------
YPYCoreError                              Traceback (most recent call last)
<ipython-input-6-21983dd16dd9> in <module>()
----> 1 crud.create(ncc,native)

~/p/lib/python3.6/site-packages/ydk/errors/error_handler.py in helper(self, provider, entity, *args, **kwargs)
    110             err_msg = "'{0}' and '{1}' cannot be None".format(pname, ename)
    111             raise _YPYServiceError(error_msg=err_msg)
--> 112         return func(self, provider, entity, *args, **kwargs)
    113     return helper

~/p/lib/python3.6/site-packages/ydk/services/crud_service.py in create(self, provider, entity)
     28     def create(self, provider, entity):
     29         with _handle_error():
---> 30             return self._crud.create(provider, entity)
     31 
     32     @_check_argument

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py in __exit__(self, type, value, traceback)
     97                 value = type()
     98             try:
---> 99                 self.gen.throw(type, value, traceback)
    100             except StopIteration as exc:
    101                 # Suppress StopIteration *unless* it's the same exception that

~/p/lib/python3.6/site-packages/ydk/errors/error_handler.py in handle_runtime_error()
     80     finally:
     81         if _exc:
---> 82             _raise(_exc)
     83 
     84 

~/p/lib/python3.6/site-packages/ydk/errors/error_handler.py in _raise(exc)
     52     """
     53     if sys.version_info >= (3,3):
---> 54         exec("raise exc from None")
     55     else:
     56         raise exc

~/p/lib/python3.6/site-packages/ydk/errors/error_handler.py in <module>()

YPYCoreError:  Couldn't fetch schema node source

@ygorelik
Copy link
Collaborator

ygorelik commented Feb 5, 2018

Getting different error with new libyang version:
test_632.zip

@ghost
Copy link
Author

ghost commented Feb 21, 2018

Unable to reproduce with the code from the ydk-gen master branch. The encode operation produces the xml as expected.

To install the latest code:

pip uninstall ydk -y
git clone https://github.com/ciscodevnet/ydk-gen.git
cd sdk/python/core
python setup.py sdist
pip install dist/ydk-*.tar.gz

This code will be part of next ydk release 0.7.1

@ghost ghost closed this as completed Feb 21, 2018
@jeanoballe
Copy link

Hello. I'am trying to set tunnel source or destination like IBMeR but the issue persist. The Libyang error shows "Schema node not found.. Path: Cisco-IOS-XE-tunnel:tunnel". The remote device is a "cisco ASR1001-X" (Cisco IOS XE Software, Version 16.09.04). I think I have the same problem that @ygorelik mentioned before.

YDK version/OS
pip3 list | grep ydk
ydk 0.8.4
ydk-models-cisco-ios-xe 16.9.3.post1
ydk-models-cisco-ios-xr 6.6.3
ydk-models-ietf 0.1.5.post2

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

File Test and Logs:
tunnel_interface_test.zip.zip

@ygorelik
Copy link
Collaborator

ygorelik commented May 25, 2020 via email

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants