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

[mgmt-framework]: unable to parse schema file sonic-acl-deviation.yin #4059

Closed
nazariig opened this issue Jan 24, 2020 · 6 comments · Fixed by #4144
Closed

[mgmt-framework]: unable to parse schema file sonic-acl-deviation.yin #4059

nazariig opened this issue Jan 24, 2020 · 6 comments · Fixed by #4144
Assignees
Labels

Comments

@nazariig
Copy link
Collaborator

Description

mgmt-framework pollutes syslog with the following error messages:

Jan 19 09:11:51.319994 sonic INFO mgmt-framework#supervisord: rest-server libyang[1]: Failed to open libyang extensions plugins directory "/usr/lib/x86_64-linux-gnu/libyang/extensions" (No such file or directory). 
Jan 19 09:11:51.320207 sonic INFO mgmt-framework#supervisord: rest-server libyang[1]: Failed to open libyang user types plugins directory "/usr/lib/x86_64-linux-gnu/libyang/user_types" (No such file or directory). 
Jan 19 09:11:51.320825 sonic INFO mgmt-framework#supervisord: rest-server libyang[0]: Invalid keyword "type" as a child to "annotation". (path: /) 
Jan 19 09:11:51.320992 sonic INFO mgmt-framework#supervisord: rest-server libyang[0]: Module "yang" parsing failed. 
Jan 19 09:11:51.321168 sonic INFO mgmt-framework#supervisord: rest-server libyang[0]: Invalid arguments (lys_parse_path()). 
Jan 19 09:11:51.321258 sonic INFO mgmt-framework#supervisord: rest-server ERROR: logging before flag.Parse: F0119 09:11:51.320612    2024 util.go:167] Unable to parse schema file sonic-acl-deviation.yin 
Jan 19 09:11:51.321314 sonic INFO mgmt-framework#supervisord: rest-server goroutine 1 [running, locked to thread]: 
Jan 19 09:11:51.321367 sonic INFO mgmt-framework#supervisord: rest-server github.com/golang/glog.stacks(0xc00000e000, 0x0, 0x0, 0x0) 
Jan 19 09:11:51.321437 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/gopkgs/src/github.com/golang/glog/glog.go:769 +0xf6 
Jan 19 09:11:51.321500 sonic INFO mgmt-framework#supervisord: rest-server github.com/golang/glog.(*loggingT).output(0x1d0b980, 0x3, 0xc0001b8160, 0x19fcde4, 0x7, 0xa7, 0x0) 
Jan 19 09:11:51.321563 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/gopkgs/src/github.com/golang/glog/glog.go:720 +0x406 
Jan 19 09:11:51.321649 sonic INFO mgmt-framework#supervisord: rest-server github.com/golang/glog.(*loggingT).printf(0x1d0b980, 0x3, 0xc0001b42c0, 0x33, 0x0, 0x0, 0x0) 
Jan 19 09:11:51.321649 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/gopkgs/src/github.com/golang/glog/glog.go:655 +0x207 
Jan 19 09:11:51.321676 sonic INFO mgmt-framework#supervisord: rest-server github.com/golang/glog.Fatalf(0xc0001b42c0, 0x33, 0x0, 0x0, 0x0) 
Jan 19 09:11:51.321705 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/gopkgs/src/github.com/golang/glog/glog.go:1148 +0x67 
Jan 19 09:11:51.321788 sonic INFO mgmt-framework#supervisord: rest-server cvl/internal/util.CVL_LEVEL_LOG(0x303, 0xc0001b42c0, 0x33, 0x0, 0x0, 0x0) 
Jan 19 09:11:51.321788 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/cvl/internal/util/util.go:167 +0x14d 
Jan 19 09:11:51.321788 sonic INFO mgmt-framework#supervisord: rest-server cvl.CVL_LOG(0x111c803, 0xc0001b42c0, 0x33, 0x0, 0x0, 0x0) 
Jan 19 09:11:51.321884 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/cvl/cvl.go:154 +0x5c 
Jan 19 09:11:51.321884 sonic INFO mgmt-framework#supervisord: rest-server cvl.Initialize(0x0) 
Jan 19 09:11:51.321970 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/cvl/cvl_api.go:139 +0x9fa 
Jan 19 09:11:51.321970 sonic INFO mgmt-framework#supervisord: rest-server cvl.init.0() 
Jan 19 09:11:51.321970 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/cvl/cvl.go:187 +0x436 
Jan 19 09:11:51.617508 sonic INFO ansible-command: Invoked with creates=None executable=None _uses_shell=False strip_empty_ends=True _raw_params=pgrep -f logrotate removes=None argv=None warn=True chdir=None stdin_add_newline=True stdin=None 
Jan 19 09:11:52.768789 sonic INFO ansible-extract_log: Invoked with start_string=start-LogAnalyzer-acl.2020-01-19-09:11:45 directory=/var/log target_filename=/tmp/syslog file_prefix=syslog 

Steps to reproduce the issue:

  1. Install SONiC.HEAD.13-a29a2a49 [201911]
  2. Deploy t1-lag topo

Describe the results you received:
mgmt-framework pollutes syslog with the error messages and makes a lot of tests fail

Describe the results you expected:
no error message are expected while operating in idle mode

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@xinliu-seattle
Copy link
Contributor

@ben to help to find the right contact for mgmt.-frame.

@dutta-partha
Copy link
Contributor

dutta-partha commented Feb 7, 2020

This is due to the problem that path settings for libyang extension plugin is outdated with new libyang repo changes. Please assign this defect to me.

@liat-grozovik
Copy link
Collaborator

When should he expect a fix?

@lguohan
Copy link
Collaborator

lguohan commented Feb 12, 2020

@dutta-partha , do we have an eta for the fix?

@lguohan
Copy link
Collaborator

lguohan commented Feb 12, 2020

btw, is this the same problem? this is the latest master image.

admin@vlab-01:~$ show version

SONiC Software Version: SONiC.HEAD.243-51fa5e46
Distribution: Debian 9.12
Kernel: 4.9.0-9-2-amd64
Build commit: 51fa5e46
Build date: Tue Feb 11 11:53:09 UTC 2020
Built by: johnar@jenkins-worker-12
root@sonic:/# supervisorctl status
rest-server                      FATAL     Exited too quickly (process log may have details)
rsyslogd                         RUNNING   pid 35, uptime 0:58:45
start.sh                         EXITED    Feb 12 03:11 PM

@dutta-partha
Copy link
Contributor

dutta-partha commented Feb 13, 2020

@lguohan I believe this should be the same problem. REST server will throw FATAL error if it can't parse the schema files as libyang could not load extension and user-type plugins.

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

Successfully merging a pull request may close this issue.

5 participants