From mvasko at cesnet.cz Mon Aug 7 11:02:08 2017 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Mon, 07 Aug 2017 13:02:08 +0200 Subject: [sysrepo-devel] sysrepo upcoming release Message-ID: <7431-59884880-75-7bfc1c80@246359526> Hello everyone, we are planning to release a new sysrepo version 0.7.0 by the end of this week. Major changes include full NACM support (this was related to netopeer2-server a bit more than sysrepo) and XPath changes (enough was written about this here on mailing list). The reason we are letting you all know in advance is for you to be able to switch now to devel branches if you currently use master and try everything out before we make an official merge and release. So, please do so and let us know if you experience some problems using standard github issue tracker. Thanks! Regards, Michal From mvasko at cesnet.cz Tue Aug 15 09:21:24 2017 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Tue, 15 Aug 2017 11:21:24 +0200 Subject: [sysrepo-devel] =?utf-8?q?Sysrepo_version_0=2E7=2E0_released?= Message-ID: <78ce-5992bd00-ef-9323cd0@1451693> Hello everyone, we are glad to announce that Sysrepo 0.7.0 was released yesterday! While not many features were added, a lot of bugfixes were included so the stability and reliability should be significantly improved and hence also general usability. We strongly suggest for everyone still using Sysrepo 0.6.0 to move to the new version. Regards, Michal From JNadolski at advaoptical.com Tue Aug 22 11:59:17 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Tue, 22 Aug 2017 11:59:17 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo Message-ID: Hi All, I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... Skipping installation of data files for module 'ietf-inet-types'... Notifying sysrepo about the change... Install operation completed successfully. sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. Error: Unable to insert the module into the dependency graph. Reverting the install operation... Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. Install operation failed. Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? Thanks in advance, Jakub -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvasko at cesnet.cz Tue Aug 22 12:30:38 2017 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Tue, 22 Aug 2017 14:30:38 +0200 Subject: [sysrepo-devel] =?utf-8?b?Pz09P3V0Zi04P3E/ICBsb2FkaW5nIHR3byBk?= =?utf-8?q?ifferent_yang_file_versions_into_sysrepo?= In-Reply-To: Message-ID: <39a6-599c2400-a3-d750da0@148554205> Hi Jakub, do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. Regards, Michal On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > Hi All, > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Skipping installation of data files for module 'ietf-inet-types'... > Notifying sysrepo about the change... > Install operation completed successfully. > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > Error: Unable to insert the module into the dependency graph. > Reverting the install operation... > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > Install operation failed. > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > Thanks in advance, > Jakub > > From JNadolski at advaoptical.com Tue Aug 22 12:59:17 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Tue, 22 Aug 2017 12:59:17 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <39a6-599c2400-a3-d750da0@148554205> References: , <39a6-599c2400-a3-d750da0@148554205> Message-ID: Hi Michal, Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: Installing a new module from file 'mef-soam-pm.yang'... [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. Error: Unable to load the module by libyang. Install operation failed. The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? Thanks, Jakub ________________________________ From: Michal Va?ko Sent: Tuesday, August 22, 2017 2:30:38 PM To: Jakub Nadolski Cc: sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo Hi Jakub, do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. Regards, Michal On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > Hi All, > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Skipping installation of data files for module 'ietf-inet-types'... > Notifying sysrepo about the change... > Install operation completed successfully. > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > Error: Unable to insert the module into the dependency graph. > Reverting the install operation... > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > Install operation failed. > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > Thanks in advance, > Jakub > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvasko at cesnet.cz Tue Aug 22 13:14:52 2017 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Tue, 22 Aug 2017 15:14:52 +0200 Subject: [sysrepo-devel] =?utf-8?b?Pz09P3V0Zi04P3E/ICBsb2FkaW5nIHR3byBk?= =?utf-8?q?ifferent_yang_file_versions_into_sysrepo?= In-Reply-To: Message-ID: <46b5-599c2e80-8f-4264b680@158435751> Hello Jakub, could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. Regards, Michal On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > Hi Michal, > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > Installing a new module from file 'mef-soam-pm.yang'... > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > Error: Unable to load the module by libyang. > Install operation failed. > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > Thanks, > > Jakub > > > ________________________________ > From: Michal Va?ko > Sent: Tuesday, August 22, 2017 2:30:38 PM > To: Jakub Nadolski > Cc: sysrepo-devel at sysrepo.org > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hi Jakub, > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > Regards, > Michal > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > Hi All, > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Skipping installation of data files for module 'ietf-inet-types'... > > Notifying sysrepo about the change... > > Install operation completed successfully. > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > Error: Unable to insert the module into the dependency graph. > > Reverting the install operation... > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > Install operation failed. > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > Thanks in advance, > > Jakub > > > > > > > From JNadolski at advaoptical.com Tue Aug 22 13:19:01 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Tue, 22 Aug 2017 13:19:01 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <46b5-599c2e80-8f-4264b680@158435751> References: , <46b5-599c2e80-8f-4264b680@158435751> Message-ID: <36ac010d23344086baecc6e9a087694a@advaoptical.com> Hi Michal, This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf Thanks, Jakub ________________________________ From: Michal Va?ko Sent: Tuesday, August 22, 2017 3:14:52 PM To: Jakub Nadolski Cc: sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo Hello Jakub, could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. Regards, Michal On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > Hi Michal, > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > Installing a new module from file 'mef-soam-pm.yang'... > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > Error: Unable to load the module by libyang. > Install operation failed. > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > Thanks, > > Jakub > > > ________________________________ > From: Michal Va?ko > Sent: Tuesday, August 22, 2017 2:30:38 PM > To: Jakub Nadolski > Cc: sysrepo-devel at sysrepo.org > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hi Jakub, > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > Regards, > Michal > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > Hi All, > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Skipping installation of data files for module 'ietf-inet-types'... > > Notifying sysrepo about the change... > > Install operation completed successfully. > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > Error: Unable to insert the module into the dependency graph. > > Reverting the install operation... > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > Install operation failed. > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > Thanks in advance, > > Jakub > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Tue Aug 22 13:57:57 2017 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Tue, 22 Aug 2017 15:57:57 +0200 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <36ac010d23344086baecc6e9a087694a@advaoptical.com> References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> Message-ID: <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> Hi Jakub, the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. Regards, Radek Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): > > Hi Michal, > > > This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf > > > Thanks, > > Jakub > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > *From:* Michal Va?ko > *Sent:* Tuesday, August 22, 2017 3:14:52 PM > *To:* Jakub Nadolski > *Cc:* sysrepo-devel at sysrepo.org > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hello Jakub, > could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. > > Regards, > Michal > > On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > > > Hi Michal, > > > > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > > > > Installing a new module from file 'mef-soam-pm.yang'... > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > > Error: Unable to load the module by libyang. > > Install operation failed. > > > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > > > > Thanks, > > > > Jakub > > > > > > ________________________________ > > From: Michal Va?ko > > Sent: Tuesday, August 22, 2017 2:30:38 PM > > To: Jakub Nadolski > > Cc: sysrepo-devel at sysrepo.org > > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > Hi Jakub, > > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > > > Regards, > > Michal > > > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > > > Hi All, > > > > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > Skipping installation of data files for module 'ietf-inet-types'... > > > Notifying sysrepo about the change... > > > Install operation completed successfully. > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > > Error: Unable to insert the module into the dependency graph. > > > Reverting the install operation... > > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > > Install operation failed. > > > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > > > Thanks in advance, > > > Jakub > > > > > > > > > > > > > > > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From JNadolski at advaoptical.com Wed Aug 23 08:12:18 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Wed, 23 Aug 2017 08:12:18 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com>, <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> Message-ID: <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> Hi Radek, I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: sysrepoctl -i --yang=mef-cfm-dev.yang Installing a new module from file 'mef-cfm-dev.yang'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? Regards, Jakub ________________________________ From: Radek Krej?? Sent: Tuesday, August 22, 2017 3:57:57 PM To: Jakub Nadolski; Michal Va?ko Cc: sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo Hi Jakub, the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. Regards, Radek Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): > > Hi Michal, > > > This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf > > > Thanks, > > Jakub > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > *From:* Michal Va?ko > *Sent:* Tuesday, August 22, 2017 3:14:52 PM > *To:* Jakub Nadolski > *Cc:* sysrepo-devel at sysrepo.org > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hello Jakub, > could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. > > Regards, > Michal > > On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > > > Hi Michal, > > > > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > > > > Installing a new module from file 'mef-soam-pm.yang'... > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > > Error: Unable to load the module by libyang. > > Install operation failed. > > > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > > > > Thanks, > > > > Jakub > > > > > > ________________________________ > > From: Michal Va?ko > > Sent: Tuesday, August 22, 2017 2:30:38 PM > > To: Jakub Nadolski > > Cc: sysrepo-devel at sysrepo.org > > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > Hi Jakub, > > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > > > Regards, > > Michal > > > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > > > Hi All, > > > > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > Skipping installation of data files for module 'ietf-inet-types'... > > > Notifying sysrepo about the change... > > > Install operation completed successfully. > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > > Error: Unable to insert the module into the dependency graph. > > > Reverting the install operation... > > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > > Install operation failed. > > > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > > > Thanks in advance, > > > Jakub > > > > > > > > > > > > > > > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Wed Aug 23 08:24:40 2017 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Wed, 23 Aug 2017 10:24:40 +0200 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> Message-ID: <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. Radek Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): > > Hi Radek, > > > I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: > > > sysrepoctl -i --yang=mef-cfm-dev.yang > Installing a new module from file 'mef-cfm-dev.yang'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... > Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... > Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... > Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? > > > Regards, > > Jakub > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > *From:* Radek Krej?? > *Sent:* Tuesday, August 22, 2017 3:57:57 PM > *To:* Jakub Nadolski; Michal Va?ko > *Cc:* sysrepo-devel at sysrepo.org > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hi Jakub, > the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. > > Regards, > Radek > > > Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): > > > > Hi Michal, > > > > > > This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf > > > > > > Thanks, > > > > Jakub > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > *From:* Michal Va?ko > > *Sent:* Tuesday, August 22, 2017 3:14:52 PM > > *To:* Jakub Nadolski > > *Cc:* sysrepo-devel at sysrepo.org > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > Hello Jakub, > > could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. > > > > Regards, > > Michal > > > > On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > > > > > Hi Michal, > > > > > > > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > > > > > > > Installing a new module from file 'mef-soam-pm.yang'... > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > > > Error: Unable to load the module by libyang. > > > Install operation failed. > > > > > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > > > > > > > Thanks, > > > > > > Jakub > > > > > > > > > ________________________________ > > > From: Michal Va?ko > > > Sent: Tuesday, August 22, 2017 2:30:38 PM > > > To: Jakub Nadolski > > > Cc: sysrepo-devel at sysrepo.org > > > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > Hi Jakub, > > > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > > > > > Regards, > > > Michal > > > > > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > > > > > Hi All, > > > > > > > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > > Skipping installation of data files for module 'ietf-inet-types'... > > > > Notifying sysrepo about the change... > > > > Install operation completed successfully. > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > > > Error: Unable to insert the module into the dependency graph. > > > > Reverting the install operation... > > > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > > > Install operation failed. > > > > > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > > > > > Thanks in advance, > > > > Jakub > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > sysrepo-devel mailing list > > sysrepo-devel at sysrepo.org > > http://lists.sysrepo.org/listinfo/sysrepo-devel > > -- > Radek Krejci > mobile : +420 732 212 714 > office : +420 234 680 256 > e-mail : rkrejci at cesnet.cz > LinkedIn: http://www.linkedin.com/in/radekkrejci > > CESNET, Association of Legal Entities > Zikova 4 > 160 00 Praha 6 > Czech Republic > > -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From JNadolski at advaoptical.com Wed Aug 23 08:43:34 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Wed, 23 Aug 2017 08:43:34 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com>, <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> Message-ID: <65c1f956c7484de6a013f1ea8452213e@advaoptical.com> Radek, The same happens when parsing with yanglint, so looks like there's a problem in parsing, here's the output: yanglint mef-cfm-dev.yang -VVV Validating mef-cfm-dev.yang schema file. verb: Searching for "mef-cfm" in /_path_/yang-models. verb: Searching for "mef-cfm" in /_path_/yang-models. verb: Loading schema from "/_path_/yang-models/mef-cfm.yang" file. verb: Searching for "ietf-yang-types" in /_path_/yang-models. verb: Loading schema from "/_path_/yang-models/ietf-yang-types at 2010-09-24.yang" file. verb: Module "ietf-yang-types" successfully parsed. verb: Searching for "ietf-inet-types" in /_path_/yang-models. verb: Loading schema from "/_path_/yang-models/ietf-inet-types at 2010-09-24.yang" file. verb: Resolving derived type "union" failed, it will be attempted later. verb: Resolving type default "" failed, it will be attempted later. verb: Resolving derived type "union" failed, it will be attempted later. verb: Resolving type default "" failed, it will be attempted later. verb: Resolving derived type "union" failed, it will be attempted later. verb: Resolving type default "" failed, it will be attempted later. verb: Resolving "ietf-inet-types" unresolved schema nodes and their constraints... verb: All "ietf-inet-types" schema nodes and constraints resolved. verb: Module "ietf-inet-types" successfully parsed. verb: Module "mef-cfm" successfully parsed. verb: Searching for "mef-soam-fm" in /_path_/yang-models. verb: Searching for "mef-soam-fm" in /_path_/yang-models. verb: Loading schema from "/_path_/yang-models/mef-soam-fm.yang" file. verb: Resolving "mef-soam-fm" unresolved schema nodes and their constraints... warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/test-type". warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/target-address". warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/interval". warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/priority". warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/drop-eligible". warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/frame-size". warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-id-format". warn: Schema node "icc-based" not found (../meg-id-format = icc-based) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/icc-name-value". warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-level". warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/frame-size". warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/data-pattern". warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-included". warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-pattern". warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-type". warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/target-address". warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/interval". warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/priority". warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/drop-eligible". warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/frame-size". warn: Schema node "true" not found (../is-receiver = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-in". warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-out". verb: All "mef-soam-fm" schema nodes and constraints resolved. verb: Module "mef-soam-fm" successfully parsed. verb: Searching for "mef-soam-pm" in /_path_/yang-models. verb: Searching for "mef-soam-pm" in /_path_/yang-models. verb: Loading schema from "/_path_/yang-models/mef-soam-pm.yang" file. verb: Module "mef-soam-pm" successfully parsed. verb: Module "mef-cfm-dev" successfully parsed. Enabling all features in module ietf-yang-library. Enabling all features in module ietf-yang-types. Enabling all features in module ietf-inet-types. Enabling all features in module mef-cfm. Enabling all features in module mef-soam-fm. Enabling all features in module mef-soam-pm. Enabling all features in module mef-cfm-dev. And here it hangs. Thanks, Jakub ________________________________ From: Radek Krej?? Sent: Wednesday, August 23, 2017 10:24:40 AM To: Jakub Nadolski; Michal Va?ko Cc: sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. Radek Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): > > Hi Radek, > > > I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: > > > sysrepoctl -i --yang=mef-cfm-dev.yang > Installing a new module from file 'mef-cfm-dev.yang'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... > Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... > Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... > Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? > > > Regards, > > Jakub > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > *From:* Radek Krej?? > *Sent:* Tuesday, August 22, 2017 3:57:57 PM > *To:* Jakub Nadolski; Michal Va?ko > *Cc:* sysrepo-devel at sysrepo.org > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hi Jakub, > the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. > > Regards, > Radek > > > Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): > > > > Hi Michal, > > > > > > This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf > > > > > > Thanks, > > > > Jakub > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > *From:* Michal Va?ko > > *Sent:* Tuesday, August 22, 2017 3:14:52 PM > > *To:* Jakub Nadolski > > *Cc:* sysrepo-devel at sysrepo.org > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > Hello Jakub, > > could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. > > > > Regards, > > Michal > > > > On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > > > > > Hi Michal, > > > > > > > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > > > > > > > Installing a new module from file 'mef-soam-pm.yang'... > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > > > Error: Unable to load the module by libyang. > > > Install operation failed. > > > > > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > > > > > > > Thanks, > > > > > > Jakub > > > > > > > > > ________________________________ > > > From: Michal Va?ko > > > Sent: Tuesday, August 22, 2017 2:30:38 PM > > > To: Jakub Nadolski > > > Cc: sysrepo-devel at sysrepo.org > > > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > Hi Jakub, > > > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > > > > > Regards, > > > Michal > > > > > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > > > > > Hi All, > > > > > > > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > > Skipping installation of data files for module 'ietf-inet-types'... > > > > Notifying sysrepo about the change... > > > > Install operation completed successfully. > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > > > Error: Unable to insert the module into the dependency graph. > > > > Reverting the install operation... > > > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > > > Install operation failed. > > > > > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > > > > > Thanks in advance, > > > > Jakub > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > sysrepo-devel mailing list > > sysrepo-devel at sysrepo.org > > http://lists.sysrepo.org/listinfo/sysrepo-devel > > -- > Radek Krejci > mobile : +420 732 212 714 > office : +420 234 680 256 > e-mail : rkrejci at cesnet.cz > LinkedIn: http://www.linkedin.com/in/radekkrejci > > CESNET, Association of Legal Entities > Zikova 4 > 160 00 Praha 6 > Czech Republic > > -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Wed Aug 23 08:49:14 2017 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Wed, 23 Aug 2017 10:49:14 +0200 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <65c1f956c7484de6a013f1ea8452213e@advaoptical.com> References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> <65c1f956c7484de6a013f1ea8452213e@advaoptical.com> Message-ID: <34fe3c2c-dcb6-0f41-65d7-79b24888070e@cesnet.cz> Hi Jakub, on your own (or without permission to provide the modules), you can connect to it with gdb and provide at least the stack traceback where it hangs. But preferably, please, provide us all the modules (in zip or tar) to allow us to debug it. Regards, Radek Dne 23.8.2017 v 10:43 Jakub Nadolski napsal(a): > > Radek, > > > The same happens when parsing with yanglint, so looks like there's a problem in parsing, here's the output: > > > yanglint mef-cfm-dev.yang -VVV > > Validating mef-cfm-dev.yang schema file. > verb: Searching for "mef-cfm" in /_path_/yang-models. > verb: Searching for "mef-cfm" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/mef-cfm.yang" file. > verb: Searching for "ietf-yang-types" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/ietf-yang-types at 2010-09-24.yang" file. > verb: Module "ietf-yang-types" successfully parsed. > verb: Searching for "ietf-inet-types" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/ietf-inet-types at 2010-09-24.yang" file. > verb: Resolving derived type "union" failed, it will be attempted later. > verb: Resolving type default "" failed, it will be attempted later. > verb: Resolving derived type "union" failed, it will be attempted later. > verb: Resolving type default "" failed, it will be attempted later. > verb: Resolving derived type "union" failed, it will be attempted later. > verb: Resolving type default "" failed, it will be attempted later. > verb: Resolving "ietf-inet-types" unresolved schema nodes and their constraints... > verb: All "ietf-inet-types" schema nodes and constraints resolved. > verb: Module "ietf-inet-types" successfully parsed. > verb: Module "mef-cfm" successfully parsed. > verb: Searching for "mef-soam-fm" in /_path_/yang-models. > verb: Searching for "mef-soam-fm" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/mef-soam-fm.yang" file. > verb: Resolving "mef-soam-fm" unresolved schema nodes and their constraints... > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/test-type". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/target-address". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/interval". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/priority". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/drop-eligible". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/frame-size". > warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-id-format". > warn: Schema node "icc-based" not found (../meg-id-format = icc-based) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/icc-name-value". > warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-level". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/frame-size". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/data-pattern". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-included". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-pattern". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-type". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/target-address". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/interval". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/priority". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/drop-eligible". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/frame-size". > warn: Schema node "true" not found (../is-receiver = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-in". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-out". > verb: All "mef-soam-fm" schema nodes and constraints resolved. > verb: Module "mef-soam-fm" successfully parsed. > verb: Searching for "mef-soam-pm" in /_path_/yang-models. > verb: Searching for "mef-soam-pm" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/mef-soam-pm.yang" file. > verb: Module "mef-soam-pm" successfully parsed. > verb: Module "mef-cfm-dev" successfully parsed. > Enabling all features in module ietf-yang-library. > Enabling all features in module ietf-yang-types. > Enabling all features in module ietf-inet-types. > Enabling all features in module mef-cfm. > Enabling all features in module mef-soam-fm. > Enabling all features in module mef-soam-pm. > Enabling all features in module mef-cfm-dev. > > And here it hangs. > > > Thanks, > > Jakub > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > *From:* Radek Krej?? > *Sent:* Wednesday, August 23, 2017 10:24:40 AM > *To:* Jakub Nadolski; Michal Va?ko > *Cc:* sysrepo-devel at sysrepo.org > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. > > Radek > > > Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): > > > > Hi Radek, > > > > > > I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: > > > > > > sysrepoctl -i --yang=mef-cfm-dev.yang > > Installing a new module from file 'mef-cfm-dev.yang'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... > > Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... > > Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... > > Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > > > Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? > > > > > > Regards, > > > > Jakub > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > *From:* Radek Krej?? > > *Sent:* Tuesday, August 22, 2017 3:57:57 PM > > *To:* Jakub Nadolski; Michal Va?ko > > *Cc:* sysrepo-devel at sysrepo.org > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > Hi Jakub, > > the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. > > > > Regards, > > Radek > > > > > > Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): > > > > > > Hi Michal, > > > > > > > > > This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf > > > > > > > > > Thanks, > > > > > > Jakub > > > > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > > *From:* Michal Va?ko > > > *Sent:* Tuesday, August 22, 2017 3:14:52 PM > > > *To:* Jakub Nadolski > > > *Cc:* sysrepo-devel at sysrepo.org > > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > Hello Jakub, > > > could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. > > > > > > Regards, > > > Michal > > > > > > On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > > > > > > > Hi Michal, > > > > > > > > > > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > > > > > > > > > > Installing a new module from file 'mef-soam-pm.yang'... > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > > > > Error: Unable to load the module by libyang. > > > > Install operation failed. > > > > > > > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > > > > > > > > > > Thanks, > > > > > > > > Jakub > > > > > > > > > > > > ________________________________ > > > > From: Michal Va?ko > > > > Sent: Tuesday, August 22, 2017 2:30:38 PM > > > > To: Jakub Nadolski > > > > Cc: sysrepo-devel at sysrepo.org > > > > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > > > Hi Jakub, > > > > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > > > > > > > Regards, > > > > Michal > > > > > > > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > > > > > > > Hi All, > > > > > > > > > > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > > > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > > > Skipping installation of data files for module 'ietf-inet-types'... > > > > > Notifying sysrepo about the change... > > > > > Install operation completed successfully. > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > > > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > > > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > > > > Error: Unable to insert the module into the dependency graph. > > > > > Reverting the install operation... > > > > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > > > > Install operation failed. > > > > > > > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > > > > > > > Thanks in advance, > > > > > Jakub > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > sysrepo-devel mailing list > > > sysrepo-devel at sysrepo.org > > > http://lists.sysrepo.org/listinfo/sysrepo-devel > > > > -- > > Radek Krejci > > mobile : +420 732 212 714 > > office : +420 234 680 256 > > e-mail : rkrejci at cesnet.cz > > LinkedIn: http://www.linkedin.com/in/radekkrejci > > > > CESNET, Association of Legal Entities > > Zikova 4 > > 160 00 Praha 6 > > Czech Republic > > > > > From JNadolski at advaoptical.com Wed Aug 23 09:07:22 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Wed, 23 Aug 2017 09:07:22 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <34fe3c2c-dcb6-0f41-65d7-79b24888070e@cesnet.cz> References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> <65c1f956c7484de6a013f1ea8452213e@advaoptical.com>, <34fe3c2c-dcb6-0f41-65d7-79b24888070e@cesnet.cz> Message-ID: <704370d403ae493c96fd400501ddc8c7@advaoptical.com> Radek, I will provide modules after I double-check I can do that, until then, here's the backtrace: (gdb) bt #0 0x00007f99c0db79ba in lys_node_addchild (parent=0x1c307f0, module=0x1c12f90, child=0x1c30e10) at /_path_/libyang/src/tree_schema.c:859 #1 0x00007f99c0dc1d51 in lys_switch_deviation (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4108 #2 0x00007f99c0dc2443 in remove_dev (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4251 #3 0x00007f99c0dc289d in lys_sub_module_remove_devs_augs (module=0x1bbae70) at /_path_/libyang/src/tree_schema.c:4325 #4 0x00007f99c0d3dad9 in ly_ctx_destroy (ctx=0x1bb3010, private_destructor=0x0) at /_path_/libyang/src/context.c:339 #5 0x0000000000405d66 in main_ni (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main_ni.c:974 #6 0x0000000000402fac in main (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main.c:41 Thanks a lot, I really appreciate what you do:) Regards, Jakub ________________________________ From: Radek Krej?? Sent: Wednesday, August 23, 2017 10:49:14 AM To: Jakub Nadolski; Michal Va?ko Cc: sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo Hi Jakub, on your own (or without permission to provide the modules), you can connect to it with gdb and provide at least the stack traceback where it hangs. But preferably, please, provide us all the modules (in zip or tar) to allow us to debug it. Regards, Radek Dne 23.8.2017 v 10:43 Jakub Nadolski napsal(a): > > Radek, > > > The same happens when parsing with yanglint, so looks like there's a problem in parsing, here's the output: > > > yanglint mef-cfm-dev.yang -VVV > > Validating mef-cfm-dev.yang schema file. > verb: Searching for "mef-cfm" in /_path_/yang-models. > verb: Searching for "mef-cfm" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/mef-cfm.yang" file. > verb: Searching for "ietf-yang-types" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/ietf-yang-types at 2010-09-24.yang" file. > verb: Module "ietf-yang-types" successfully parsed. > verb: Searching for "ietf-inet-types" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/ietf-inet-types at 2010-09-24.yang" file. > verb: Resolving derived type "union" failed, it will be attempted later. > verb: Resolving type default "" failed, it will be attempted later. > verb: Resolving derived type "union" failed, it will be attempted later. > verb: Resolving type default "" failed, it will be attempted later. > verb: Resolving derived type "union" failed, it will be attempted later. > verb: Resolving type default "" failed, it will be attempted later. > verb: Resolving "ietf-inet-types" unresolved schema nodes and their constraints... > verb: All "ietf-inet-types" schema nodes and constraints resolved. > verb: Module "ietf-inet-types" successfully parsed. > verb: Module "mef-cfm" successfully parsed. > verb: Searching for "mef-soam-fm" in /_path_/yang-models. > verb: Searching for "mef-soam-fm" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/mef-soam-fm.yang" file. > verb: Resolving "mef-soam-fm" unresolved schema nodes and their constraints... > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/test-type". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/target-address". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/interval". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/priority". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/drop-eligible". > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/frame-size". > warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-id-format". > warn: Schema node "icc-based" not found (../meg-id-format = icc-based) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/icc-name-value". > warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-level". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/frame-size". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/data-pattern". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-included". > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-pattern". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-type". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/target-address". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/interval". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/priority". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/drop-eligible". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/frame-size". > warn: Schema node "true" not found (../is-receiver = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-in". > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-out". > verb: All "mef-soam-fm" schema nodes and constraints resolved. > verb: Module "mef-soam-fm" successfully parsed. > verb: Searching for "mef-soam-pm" in /_path_/yang-models. > verb: Searching for "mef-soam-pm" in /_path_/yang-models. > verb: Loading schema from "/_path_/yang-models/mef-soam-pm.yang" file. > verb: Module "mef-soam-pm" successfully parsed. > verb: Module "mef-cfm-dev" successfully parsed. > Enabling all features in module ietf-yang-library. > Enabling all features in module ietf-yang-types. > Enabling all features in module ietf-inet-types. > Enabling all features in module mef-cfm. > Enabling all features in module mef-soam-fm. > Enabling all features in module mef-soam-pm. > Enabling all features in module mef-cfm-dev. > > And here it hangs. > > > Thanks, > > Jakub > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > *From:* Radek Krej?? > *Sent:* Wednesday, August 23, 2017 10:24:40 AM > *To:* Jakub Nadolski; Michal Va?ko > *Cc:* sysrepo-devel at sysrepo.org > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. > > Radek > > > Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): > > > > Hi Radek, > > > > > > I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: > > > > > > sysrepoctl -i --yang=mef-cfm-dev.yang > > Installing a new module from file 'mef-cfm-dev.yang'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... > > Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... > > Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... > > Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > > > Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? > > > > > > Regards, > > > > Jakub > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > *From:* Radek Krej?? > > *Sent:* Tuesday, August 22, 2017 3:57:57 PM > > *To:* Jakub Nadolski; Michal Va?ko > > *Cc:* sysrepo-devel at sysrepo.org > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > Hi Jakub, > > the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. > > > > Regards, > > Radek > > > > > > Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): > > > > > > Hi Michal, > > > > > > > > > This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf > > > > > > > > > Thanks, > > > > > > Jakub > > > > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > > *From:* Michal Va?ko > > > *Sent:* Tuesday, August 22, 2017 3:14:52 PM > > > *To:* Jakub Nadolski > > > *Cc:* sysrepo-devel at sysrepo.org > > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > Hello Jakub, > > > could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. > > > > > > Regards, > > > Michal > > > > > > On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > > > > > > > Hi Michal, > > > > > > > > > > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > > > > > > > > > > Installing a new module from file 'mef-soam-pm.yang'... > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > > > > Error: Unable to load the module by libyang. > > > > Install operation failed. > > > > > > > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > > > > > > > > > > Thanks, > > > > > > > > Jakub > > > > > > > > > > > > ________________________________ > > > > From: Michal Va?ko > > > > Sent: Tuesday, August 22, 2017 2:30:38 PM > > > > To: Jakub Nadolski > > > > Cc: sysrepo-devel at sysrepo.org > > > > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > > > Hi Jakub, > > > > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > > > > > > > Regards, > > > > Michal > > > > > > > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > > > > > > > Hi All, > > > > > > > > > > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > > > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > > > Skipping installation of data files for module 'ietf-inet-types'... > > > > > Notifying sysrepo about the change... > > > > > Install operation completed successfully. > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > > > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > > > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > > > > Error: Unable to insert the module into the dependency graph. > > > > > Reverting the install operation... > > > > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > > > > Install operation failed. > > > > > > > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > > > > > > > Thanks in advance, > > > > > Jakub > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > sysrepo-devel mailing list > > > sysrepo-devel at sysrepo.org > > > http://lists.sysrepo.org/listinfo/sysrepo-devel > > > > -- > > Radek Krejci > > mobile : +420 732 212 714 > > office : +420 234 680 256 > > e-mail : rkrejci at cesnet.cz > > LinkedIn: http://www.linkedin.com/in/radekkrejci > > > > CESNET, Association of Legal Entities > > Zikova 4 > > 160 00 Praha 6 > > Czech Republic > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Wed Aug 23 09:14:08 2017 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Wed, 23 Aug 2017 11:14:08 +0200 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: <704370d403ae493c96fd400501ddc8c7@advaoptical.com> References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> <65c1f956c7484de6a013f1ea8452213e@advaoptical.com> <34fe3c2c-dcb6-0f41-65d7-79b24888070e@cesnet.cz> <704370d403ae493c96fd400501ddc8c7@advaoptical.com> Message-ID: ok, I'll wait - from the backtrace it seems that there is something wrong with applying deviations, unfortunately I'm probably not able to solve the issue without the modules (I probably do not need all, just those causing the issue :)). You can try to run yanglint under valgrind if it see some issue there. Radek Dne 23.8.2017 v 11:07 Jakub Nadolski napsal(a): > > Radek, > > > I will provide modules after I double-check I can do that, until then, here's the backtrace: > > > (gdb) bt > #0 0x00007f99c0db79ba in lys_node_addchild (parent=0x1c307f0, module=0x1c12f90, child=0x1c30e10) at /_path_/libyang/src/tree_schema.c:859 > #1 0x00007f99c0dc1d51 in lys_switch_deviation (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4108 > #2 0x00007f99c0dc2443 in remove_dev (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4251 > #3 0x00007f99c0dc289d in lys_sub_module_remove_devs_augs (module=0x1bbae70) at /_path_/libyang/src/tree_schema.c:4325 > #4 0x00007f99c0d3dad9 in ly_ctx_destroy (ctx=0x1bb3010, private_destructor=0x0) at /_path_/libyang/src/context.c:339 > #5 0x0000000000405d66 in main_ni (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main_ni.c:974 > #6 0x0000000000402fac in main (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main.c:41 > > Thanks a lot, I really appreciate what you do:) > > > Regards, > > Jakub > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > *From:* Radek Krej?? > *Sent:* Wednesday, August 23, 2017 10:49:14 AM > *To:* Jakub Nadolski; Michal Va?ko > *Cc:* sysrepo-devel at sysrepo.org > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > Hi Jakub, > on your own (or without permission to provide the modules), you can connect to it with gdb and provide at least the stack traceback where it hangs. But preferably, please, provide us all the modules (in zip or tar) to allow us to debug it. > > Regards, > Radek > > Dne 23.8.2017 v 10:43 Jakub Nadolski napsal(a): > > > > Radek, > > > > > > The same happens when parsing with yanglint, so looks like there's a problem in parsing, here's the output: > > > > > > yanglint mef-cfm-dev.yang -VVV > > > > Validating mef-cfm-dev.yang schema file. > > verb: Searching for "mef-cfm" in /_path_/yang-models. > > verb: Searching for "mef-cfm" in /_path_/yang-models. > > verb: Loading schema from "/_path_/yang-models/mef-cfm.yang" file. > > verb: Searching for "ietf-yang-types" in /_path_/yang-models. > > verb: Loading schema from "/_path_/yang-models/ietf-yang-types at 2010-09-24.yang" file. > > verb: Module "ietf-yang-types" successfully parsed. > > verb: Searching for "ietf-inet-types" in /_path_/yang-models. > > verb: Loading schema from "/_path_/yang-models/ietf-inet-types at 2010-09-24.yang" file. > > verb: Resolving derived type "union" failed, it will be attempted later. > > verb: Resolving type default "" failed, it will be attempted later. > > verb: Resolving derived type "union" failed, it will be attempted later. > > verb: Resolving type default "" failed, it will be attempted later. > > verb: Resolving derived type "union" failed, it will be attempted later. > > verb: Resolving type default "" failed, it will be attempted later. > > verb: Resolving "ietf-inet-types" unresolved schema nodes and their constraints... > > verb: All "ietf-inet-types" schema nodes and constraints resolved. > > verb: Module "ietf-inet-types" successfully parsed. > > verb: Module "mef-cfm" successfully parsed. > > verb: Searching for "mef-soam-fm" in /_path_/yang-models. > > verb: Searching for "mef-soam-fm" in /_path_/yang-models. > > verb: Loading schema from "/_path_/yang-models/mef-soam-fm.yang" file. > > verb: Resolving "mef-soam-fm" unresolved schema nodes and their constraints... > > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/test-type". > > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/target-address". > > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/interval". > > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/priority". > > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/drop-eligible". > > warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/frame-size". > > warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-id-format". > > warn: Schema node "icc-based" not found (../meg-id-format = icc-based) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/icc-name-value". > > warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-level". > > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/frame-size". > > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/data-pattern". > > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-included". > > warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-pattern". > > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-type". > > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/target-address". > > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/interval". > > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/priority". > > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/drop-eligible". > > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/frame-size". > > warn: Schema node "true" not found (../is-receiver = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-in". > > warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-out". > > verb: All "mef-soam-fm" schema nodes and constraints resolved. > > verb: Module "mef-soam-fm" successfully parsed. > > verb: Searching for "mef-soam-pm" in /_path_/yang-models. > > verb: Searching for "mef-soam-pm" in /_path_/yang-models. > > verb: Loading schema from "/_path_/yang-models/mef-soam-pm.yang" file. > > verb: Module "mef-soam-pm" successfully parsed. > > verb: Module "mef-cfm-dev" successfully parsed. > > Enabling all features in module ietf-yang-library. > > Enabling all features in module ietf-yang-types. > > Enabling all features in module ietf-inet-types. > > Enabling all features in module mef-cfm. > > Enabling all features in module mef-soam-fm. > > Enabling all features in module mef-soam-pm. > > Enabling all features in module mef-cfm-dev. > > > > And here it hangs. > > > > > > Thanks, > > > > Jakub > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > *From:* Radek Krej?? > > *Sent:* Wednesday, August 23, 2017 10:24:40 AM > > *To:* Jakub Nadolski; Michal Va?ko > > *Cc:* sysrepo-devel at sysrepo.org > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. > > > > Radek > > > > > > Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): > > > > > > Hi Radek, > > > > > > > > > I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: > > > > > > > > > sysrepoctl -i --yang=mef-cfm-dev.yang > > > Installing a new module from file 'mef-cfm-dev.yang'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... > > > Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... > > > Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > > Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... > > > Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... > > > Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > > Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... > > > > > > Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? > > > > > > > > > Regards, > > > > > > Jakub > > > > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > > *From:* Radek Krej?? > > > *Sent:* Tuesday, August 22, 2017 3:57:57 PM > > > *To:* Jakub Nadolski; Michal Va?ko > > > *Cc:* sysrepo-devel at sysrepo.org > > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > Hi Jakub, > > > the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. > > > > > > Regards, > > > Radek > > > > > > > > > Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): > > > > > > > > Hi Michal, > > > > > > > > > > > > This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf > > > > > > > > > > > > Thanks, > > > > > > > > Jakub > > > > > > > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > > > *From:* Michal Va?ko > > > > *Sent:* Tuesday, August 22, 2017 3:14:52 PM > > > > *To:* Jakub Nadolski > > > > *Cc:* sysrepo-devel at sysrepo.org > > > > *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > > > Hello Jakub, > > > > could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. > > > > > > > > Regards, > > > > Michal > > > > > > > > On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: > > > > > > > > > Hi Michal, > > > > > > > > > > > > > > > Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: > > > > > > > > > > > > > > > Installing a new module from file 'mef-soam-pm.yang'... > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. > > > > > [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. > > > > > Error: Unable to load the module by libyang. > > > > > Install operation failed. > > > > > > > > > > The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > Jakub > > > > > > > > > > > > > > > ________________________________ > > > > > From: Michal Va?ko > > > > > Sent: Tuesday, August 22, 2017 2:30:38 PM > > > > > To: Jakub Nadolski > > > > > Cc: sysrepo-devel at sysrepo.org > > > > > Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo > > > > > > > > > > Hi Jakub, > > > > > do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. > > > > > > > > > > Regards, > > > > > Michal > > > > > > > > > > On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: > > > > > > > > > > > Hi All, > > > > > > > > > > > > > > > > > > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: > > > > > > > > > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang > > > > > > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... > > > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... > > > > > > Skipping installation of data files for module 'ietf-inet-types'... > > > > > > Notifying sysrepo about the change... > > > > > > Install operation completed successfully. > > > > > > > > > > > > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang > > > > > > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... > > > > > > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... > > > > > > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. > > > > > > Error: Unable to insert the module into the dependency graph. > > > > > > Reverting the install operation... > > > > > > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. > > > > > > Install operation failed. > > > > > > > > > > > > Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? > > > > > > > > > > > > Thanks in advance, > > > > > > Jakub > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > sysrepo-devel mailing list > > > > sysrepo-devel at sysrepo.org > > > > http://lists.sysrepo.org/listinfo/sysrepo-devel > > > > > > -- > > > Radek Krejci > > > mobile : +420 732 212 714 > > > office : +420 234 680 256 > > > e-mail : rkrejci at cesnet.cz > > > LinkedIn: http://www.linkedin.com/in/radekkrejci > > > > > > CESNET, Association of Legal Entities > > > Zikova 4 > > > 160 00 Praha 6 > > > Czech Republic > > > > > > > > > > From rkrejci at cesnet.cz Thu Aug 24 15:27:39 2017 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Thu, 24 Aug 2017 17:27:39 +0200 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> <65c1f956c7484de6a013f1ea8452213e@advaoptical.com> <34fe3c2c-dcb6-0f41-65d7-79b24888070e@cesnet.cz> <704370d403ae493c96fd400501ddc8c7@advaoptical.com> Message-ID: (we had discussion with Jakub off the list, now going back to the list) Hi, the issues should be solved in libyang 0.13.48 (current master and devel), please update and let me know if it solved all the issues - I'm now able to parse the most of the provided schemas, the rest is caused by bugs in schemas. Regards, Radek Dne 23.8.2017 v 11:14 Radek Krej?? napsal(a): > ok, I'll wait - from the backtrace it seems that there is something wrong with applying deviations, unfortunately I'm probably not able to solve the issue without the modules (I probably do not need all, just those causing the issue :)). You can try to run yanglint under valgrind if it see some issue there. > > Radek > > > Dne 23.8.2017 v 11:07 Jakub Nadolski napsal(a): >> Radek, >> >> >> I will provide modules after I double-check I can do that, until then, here's the backtrace: >> >> >> (gdb) bt >> #0 0x00007f99c0db79ba in lys_node_addchild (parent=0x1c307f0, module=0x1c12f90, child=0x1c30e10) at /_path_/libyang/src/tree_schema.c:859 >> #1 0x00007f99c0dc1d51 in lys_switch_deviation (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4108 >> #2 0x00007f99c0dc2443 in remove_dev (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4251 >> #3 0x00007f99c0dc289d in lys_sub_module_remove_devs_augs (module=0x1bbae70) at /_path_/libyang/src/tree_schema.c:4325 >> #4 0x00007f99c0d3dad9 in ly_ctx_destroy (ctx=0x1bb3010, private_destructor=0x0) at /_path_/libyang/src/context.c:339 >> #5 0x0000000000405d66 in main_ni (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main_ni.c:974 >> #6 0x0000000000402fac in main (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main.c:41 >> >> Thanks a lot, I really appreciate what you do:) >> >> >> Regards, >> >> Jakub >> >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >> *From:* Radek Krej?? >> *Sent:* Wednesday, August 23, 2017 10:49:14 AM >> *To:* Jakub Nadolski; Michal Va?ko >> *Cc:* sysrepo-devel at sysrepo.org >> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >> >> Hi Jakub, >> on your own (or without permission to provide the modules), you can connect to it with gdb and provide at least the stack traceback where it hangs. But preferably, please, provide us all the modules (in zip or tar) to allow us to debug it. >> >> Regards, >> Radek >> >> Dne 23.8.2017 v 10:43 Jakub Nadolski napsal(a): >>> Radek, >>> >>> >>> The same happens when parsing with yanglint, so looks like there's a problem in parsing, here's the output: >>> >>> >>> yanglint mef-cfm-dev.yang -VVV >>> >>> Validating mef-cfm-dev.yang schema file. >>> verb: Searching for "mef-cfm" in /_path_/yang-models. >>> verb: Searching for "mef-cfm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-cfm.yang" file. >>> verb: Searching for "ietf-yang-types" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/ietf-yang-types at 2010-09-24.yang" file. >>> verb: Module "ietf-yang-types" successfully parsed. >>> verb: Searching for "ietf-inet-types" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/ietf-inet-types at 2010-09-24.yang" file. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving "ietf-inet-types" unresolved schema nodes and their constraints... >>> verb: All "ietf-inet-types" schema nodes and constraints resolved. >>> verb: Module "ietf-inet-types" successfully parsed. >>> verb: Module "mef-cfm" successfully parsed. >>> verb: Searching for "mef-soam-fm" in /_path_/yang-models. >>> verb: Searching for "mef-soam-fm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-soam-fm.yang" file. >>> verb: Resolving "mef-soam-fm" unresolved schema nodes and their constraints... >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/test-type". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/target-address". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/interval". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/priority". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/drop-eligible". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/frame-size". >>> warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-id-format". >>> warn: Schema node "icc-based" not found (../meg-id-format = icc-based) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/icc-name-value". >>> warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-level". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/frame-size". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/data-pattern". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-included". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-pattern". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-type". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/target-address". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/interval". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/priority". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/drop-eligible". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/frame-size". >>> warn: Schema node "true" not found (../is-receiver = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-in". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-out". >>> verb: All "mef-soam-fm" schema nodes and constraints resolved. >>> verb: Module "mef-soam-fm" successfully parsed. >>> verb: Searching for "mef-soam-pm" in /_path_/yang-models. >>> verb: Searching for "mef-soam-pm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-soam-pm.yang" file. >>> verb: Module "mef-soam-pm" successfully parsed. >>> verb: Module "mef-cfm-dev" successfully parsed. >>> Enabling all features in module ietf-yang-library. >>> Enabling all features in module ietf-yang-types. >>> Enabling all features in module ietf-inet-types. >>> Enabling all features in module mef-cfm. >>> Enabling all features in module mef-soam-fm. >>> Enabling all features in module mef-soam-pm. >>> Enabling all features in module mef-cfm-dev. >>> >>> And here it hangs. >>> >>> >>> Thanks, >>> >>> Jakub >>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>> *From:* Radek Krej?? >>> *Sent:* Wednesday, August 23, 2017 10:24:40 AM >>> *To:* Jakub Nadolski; Michal Va?ko >>> *Cc:* sysrepo-devel at sysrepo.org >>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>> >>> Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. >>> >>> Radek >>> >>> >>> Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): >>>> Hi Radek, >>>> >>>> >>>> I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: >>>> >>>> >>>> sysrepoctl -i --yang=mef-cfm-dev.yang >>>> Installing a new module from file 'mef-cfm-dev.yang'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> >>>> Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? >>>> >>>> >>>> Regards, >>>> >>>> Jakub >>>> >>>> >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>>> *From:* Radek Krej?? >>>> *Sent:* Tuesday, August 22, 2017 3:57:57 PM >>>> *To:* Jakub Nadolski; Michal Va?ko >>>> *Cc:* sysrepo-devel at sysrepo.org >>>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>> >>>> Hi Jakub, >>>> the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. >>>> >>>> Regards, >>>> Radek >>>> >>>> >>>> Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): >>>>> Hi Michal, >>>>> >>>>> >>>>> This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Jakub >>>>> >>>>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>>>> *From:* Michal Va?ko >>>>> *Sent:* Tuesday, August 22, 2017 3:14:52 PM >>>>> *To:* Jakub Nadolski >>>>> *Cc:* sysrepo-devel at sysrepo.org >>>>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>>> >>>>> Hello Jakub, >>>>> could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. >>>>> >>>>> Regards, >>>>> Michal >>>>> >>>>> On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: >>>>> >>>>>> Hi Michal, >>>>>> >>>>>> >>>>>> Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: >>>>>> >>>>>> >>>>>> Installing a new module from file 'mef-soam-pm.yang'... >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. >>>>>> Error: Unable to load the module by libyang. >>>>>> Install operation failed. >>>>>> >>>>>> The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Jakub >>>>>> >>>>>> >>>>>> ________________________________ >>>>>> From: Michal Va?ko >>>>>> Sent: Tuesday, August 22, 2017 2:30:38 PM >>>>>> To: Jakub Nadolski >>>>>> Cc: sysrepo-devel at sysrepo.org >>>>>> Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>>>> >>>>>> Hi Jakub, >>>>>> do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. >>>>>> >>>>>> Regards, >>>>>> Michal >>>>>> >>>>>> On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> >>>>>>> I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: >>>>>>> >>>>>>> >>>>>>> sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang >>>>>>> Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... >>>>>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>>>>> Skipping installation of data files for module 'ietf-inet-types'... >>>>>>> Notifying sysrepo about the change... >>>>>>> Install operation completed successfully. >>>>>>> >>>>>>> sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang >>>>>>> Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... >>>>>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... >>>>>>> [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. >>>>>>> Error: Unable to insert the module into the dependency graph. >>>>>>> Reverting the install operation... >>>>>>> Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. >>>>>>> Install operation failed. >>>>>>> >>>>>>> Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? >>>>>>> >>>>>>> Thanks in advance, >>>>>>> Jakub >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> sysrepo-devel mailing list >>>>> sysrepo-devel at sysrepo.org >>>>> http://lists.sysrepo.org/listinfo/sysrepo-devel >>>> -- >>>> Radek Krejci >>>> mobile : +420 732 212 714 >>>> office : +420 234 680 256 >>>> e-mail : rkrejci at cesnet.cz >>>> LinkedIn: http://www.linkedin.com/in/radekkrejci >>>> >>>> CESNET, Association of Legal Entities >>>> Zikova 4 >>>> 160 00 Praha 6 >>>> Czech Republic >>>> >>>> >> > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel From JNadolski at advaoptical.com Thu Aug 24 15:44:11 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Thu, 24 Aug 2017 15:44:11 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> <65c1f956c7484de6a013f1ea8452213e@advaoptical.com> <34fe3c2c-dcb6-0f41-65d7-79b24888070e@cesnet.cz> <704370d403ae493c96fd400501ddc8c7@advaoptical.com> , Message-ID: Radek, Excellent - I will test new versions tomorrow and let you know. Thanks for the help. Regards, Jakub ________________________________ From: Radek Krej?? Sent: Thursday, August 24, 2017 5:27:39 PM To: Jakub Nadolski; Michal Va?ko Cc: sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo (we had discussion with Jakub off the list, now going back to the list) Hi, the issues should be solved in libyang 0.13.48 (current master and devel), please update and let me know if it solved all the issues - I'm now able to parse the most of the provided schemas, the rest is caused by bugs in schemas. Regards, Radek Dne 23.8.2017 v 11:14 Radek Krej?? napsal(a): > ok, I'll wait - from the backtrace it seems that there is something wrong with applying deviations, unfortunately I'm probably not able to solve the issue without the modules (I probably do not need all, just those causing the issue :)). You can try to run yanglint under valgrind if it see some issue there. > > Radek > > > Dne 23.8.2017 v 11:07 Jakub Nadolski napsal(a): >> Radek, >> >> >> I will provide modules after I double-check I can do that, until then, here's the backtrace: >> >> >> (gdb) bt >> #0 0x00007f99c0db79ba in lys_node_addchild (parent=0x1c307f0, module=0x1c12f90, child=0x1c30e10) at /_path_/libyang/src/tree_schema.c:859 >> #1 0x00007f99c0dc1d51 in lys_switch_deviation (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4108 >> #2 0x00007f99c0dc2443 in remove_dev (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4251 >> #3 0x00007f99c0dc289d in lys_sub_module_remove_devs_augs (module=0x1bbae70) at /_path_/libyang/src/tree_schema.c:4325 >> #4 0x00007f99c0d3dad9 in ly_ctx_destroy (ctx=0x1bb3010, private_destructor=0x0) at /_path_/libyang/src/context.c:339 >> #5 0x0000000000405d66 in main_ni (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main_ni.c:974 >> #6 0x0000000000402fac in main (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main.c:41 >> >> Thanks a lot, I really appreciate what you do:) >> >> >> Regards, >> >> Jakub >> >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >> *From:* Radek Krej?? >> *Sent:* Wednesday, August 23, 2017 10:49:14 AM >> *To:* Jakub Nadolski; Michal Va?ko >> *Cc:* sysrepo-devel at sysrepo.org >> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >> >> Hi Jakub, >> on your own (or without permission to provide the modules), you can connect to it with gdb and provide at least the stack traceback where it hangs. But preferably, please, provide us all the modules (in zip or tar) to allow us to debug it. >> >> Regards, >> Radek >> >> Dne 23.8.2017 v 10:43 Jakub Nadolski napsal(a): >>> Radek, >>> >>> >>> The same happens when parsing with yanglint, so looks like there's a problem in parsing, here's the output: >>> >>> >>> yanglint mef-cfm-dev.yang -VVV >>> >>> Validating mef-cfm-dev.yang schema file. >>> verb: Searching for "mef-cfm" in /_path_/yang-models. >>> verb: Searching for "mef-cfm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-cfm.yang" file. >>> verb: Searching for "ietf-yang-types" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/ietf-yang-types at 2010-09-24.yang" file. >>> verb: Module "ietf-yang-types" successfully parsed. >>> verb: Searching for "ietf-inet-types" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/ietf-inet-types at 2010-09-24.yang" file. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving "ietf-inet-types" unresolved schema nodes and their constraints... >>> verb: All "ietf-inet-types" schema nodes and constraints resolved. >>> verb: Module "ietf-inet-types" successfully parsed. >>> verb: Module "mef-cfm" successfully parsed. >>> verb: Searching for "mef-soam-fm" in /_path_/yang-models. >>> verb: Searching for "mef-soam-fm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-soam-fm.yang" file. >>> verb: Resolving "mef-soam-fm" unresolved schema nodes and their constraints... >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/test-type". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/target-address". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/interval". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/priority". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/drop-eligible". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/frame-size". >>> warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-id-format". >>> warn: Schema node "icc-based" not found (../meg-id-format = icc-based) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/icc-name-value". >>> warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-level". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/frame-size". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/data-pattern". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-included". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-pattern". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-type". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/target-address". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/interval". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/priority". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/drop-eligible". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/frame-size". >>> warn: Schema node "true" not found (../is-receiver = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-in". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-out". >>> verb: All "mef-soam-fm" schema nodes and constraints resolved. >>> verb: Module "mef-soam-fm" successfully parsed. >>> verb: Searching for "mef-soam-pm" in /_path_/yang-models. >>> verb: Searching for "mef-soam-pm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-soam-pm.yang" file. >>> verb: Module "mef-soam-pm" successfully parsed. >>> verb: Module "mef-cfm-dev" successfully parsed. >>> Enabling all features in module ietf-yang-library. >>> Enabling all features in module ietf-yang-types. >>> Enabling all features in module ietf-inet-types. >>> Enabling all features in module mef-cfm. >>> Enabling all features in module mef-soam-fm. >>> Enabling all features in module mef-soam-pm. >>> Enabling all features in module mef-cfm-dev. >>> >>> And here it hangs. >>> >>> >>> Thanks, >>> >>> Jakub >>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>> *From:* Radek Krej?? >>> *Sent:* Wednesday, August 23, 2017 10:24:40 AM >>> *To:* Jakub Nadolski; Michal Va?ko >>> *Cc:* sysrepo-devel at sysrepo.org >>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>> >>> Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. >>> >>> Radek >>> >>> >>> Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): >>>> Hi Radek, >>>> >>>> >>>> I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: >>>> >>>> >>>> sysrepoctl -i --yang=mef-cfm-dev.yang >>>> Installing a new module from file 'mef-cfm-dev.yang'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> >>>> Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? >>>> >>>> >>>> Regards, >>>> >>>> Jakub >>>> >>>> >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>>> *From:* Radek Krej?? >>>> *Sent:* Tuesday, August 22, 2017 3:57:57 PM >>>> *To:* Jakub Nadolski; Michal Va?ko >>>> *Cc:* sysrepo-devel at sysrepo.org >>>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>> >>>> Hi Jakub, >>>> the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. >>>> >>>> Regards, >>>> Radek >>>> >>>> >>>> Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): >>>>> Hi Michal, >>>>> >>>>> >>>>> This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Jakub >>>>> >>>>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>>>> *From:* Michal Va?ko >>>>> *Sent:* Tuesday, August 22, 2017 3:14:52 PM >>>>> *To:* Jakub Nadolski >>>>> *Cc:* sysrepo-devel at sysrepo.org >>>>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>>> >>>>> Hello Jakub, >>>>> could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. >>>>> >>>>> Regards, >>>>> Michal >>>>> >>>>> On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: >>>>> >>>>>> Hi Michal, >>>>>> >>>>>> >>>>>> Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: >>>>>> >>>>>> >>>>>> Installing a new module from file 'mef-soam-pm.yang'... >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. >>>>>> Error: Unable to load the module by libyang. >>>>>> Install operation failed. >>>>>> >>>>>> The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Jakub >>>>>> >>>>>> >>>>>> ________________________________ >>>>>> From: Michal Va?ko >>>>>> Sent: Tuesday, August 22, 2017 2:30:38 PM >>>>>> To: Jakub Nadolski >>>>>> Cc: sysrepo-devel at sysrepo.org >>>>>> Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>>>> >>>>>> Hi Jakub, >>>>>> do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. >>>>>> >>>>>> Regards, >>>>>> Michal >>>>>> >>>>>> On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> >>>>>>> I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: >>>>>>> >>>>>>> >>>>>>> sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang >>>>>>> Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... >>>>>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>>>>> Skipping installation of data files for module 'ietf-inet-types'... >>>>>>> Notifying sysrepo about the change... >>>>>>> Install operation completed successfully. >>>>>>> >>>>>>> sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang >>>>>>> Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... >>>>>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... >>>>>>> [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. >>>>>>> Error: Unable to insert the module into the dependency graph. >>>>>>> Reverting the install operation... >>>>>>> Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. >>>>>>> Install operation failed. >>>>>>> >>>>>>> Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? >>>>>>> >>>>>>> Thanks in advance, >>>>>>> Jakub >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> sysrepo-devel mailing list >>>>> sysrepo-devel at sysrepo.org >>>>> http://lists.sysrepo.org/listinfo/sysrepo-devel >>>> -- >>>> Radek Krejci >>>> mobile : +420 732 212 714 >>>> office : +420 234 680 256 >>>> e-mail : rkrejci at cesnet.cz >>>> LinkedIn: http://www.linkedin.com/in/radekkrejci >>>> >>>> CESNET, Association of Legal Entities >>>> Zikova 4 >>>> 160 00 Praha 6 >>>> Czech Republic >>>> >>>> >> > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From JNadolski at advaoptical.com Fri Aug 25 10:42:15 2017 From: JNadolski at advaoptical.com (Jakub Nadolski) Date: Fri, 25 Aug 2017 10:42:15 +0000 Subject: [sysrepo-devel] loading two different yang file versions into sysrepo In-Reply-To: References: <46b5-599c2e80-8f-4264b680@158435751> <36ac010d23344086baecc6e9a087694a@advaoptical.com> <174cc58b-56a2-41a8-51d4-cb38214f3cc2@cesnet.cz> <74e2f36f260c4fee87c24441179cd0d8@advaoptical.com> <261fe3fd-6453-e466-2d6e-0984ae24a3eb@cesnet.cz> <65c1f956c7484de6a013f1ea8452213e@advaoptical.com> <34fe3c2c-dcb6-0f41-65d7-79b24888070e@cesnet.cz> <704370d403ae493c96fd400501ddc8c7@advaoptical.com> , Message-ID: Radek, I can load all my modules using libyang 0.13.49, thanks again for being so helpful. Regards, Jakub ________________________________ From: Radek Krej?? Sent: Thursday, August 24, 2017 5:27:39 PM To: Jakub Nadolski; Michal Va?ko Cc: sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo (we had discussion with Jakub off the list, now going back to the list) Hi, the issues should be solved in libyang 0.13.48 (current master and devel), please update and let me know if it solved all the issues - I'm now able to parse the most of the provided schemas, the rest is caused by bugs in schemas. Regards, Radek Dne 23.8.2017 v 11:14 Radek Krej?? napsal(a): > ok, I'll wait - from the backtrace it seems that there is something wrong with applying deviations, unfortunately I'm probably not able to solve the issue without the modules (I probably do not need all, just those causing the issue :)). You can try to run yanglint under valgrind if it see some issue there. > > Radek > > > Dne 23.8.2017 v 11:07 Jakub Nadolski napsal(a): >> Radek, >> >> >> I will provide modules after I double-check I can do that, until then, here's the backtrace: >> >> >> (gdb) bt >> #0 0x00007f99c0db79ba in lys_node_addchild (parent=0x1c307f0, module=0x1c12f90, child=0x1c30e10) at /_path_/libyang/src/tree_schema.c:859 >> #1 0x00007f99c0dc1d51 in lys_switch_deviation (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4108 >> #2 0x00007f99c0dc2443 in remove_dev (dev=0x1c02ab8, module=0x1bbae70, unres=0x1bc0390) at /_path_/libyang/src/tree_schema.c:4251 >> #3 0x00007f99c0dc289d in lys_sub_module_remove_devs_augs (module=0x1bbae70) at /_path_/libyang/src/tree_schema.c:4325 >> #4 0x00007f99c0d3dad9 in ly_ctx_destroy (ctx=0x1bb3010, private_destructor=0x0) at /_path_/libyang/src/context.c:339 >> #5 0x0000000000405d66 in main_ni (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main_ni.c:974 >> #6 0x0000000000402fac in main (argc=3, argv=0x7ffcd8da7668) at /_path_/libyang/tools/lint/main.c:41 >> >> Thanks a lot, I really appreciate what you do:) >> >> >> Regards, >> >> Jakub >> >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >> *From:* Radek Krej?? >> *Sent:* Wednesday, August 23, 2017 10:49:14 AM >> *To:* Jakub Nadolski; Michal Va?ko >> *Cc:* sysrepo-devel at sysrepo.org >> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >> >> Hi Jakub, >> on your own (or without permission to provide the modules), you can connect to it with gdb and provide at least the stack traceback where it hangs. But preferably, please, provide us all the modules (in zip or tar) to allow us to debug it. >> >> Regards, >> Radek >> >> Dne 23.8.2017 v 10:43 Jakub Nadolski napsal(a): >>> Radek, >>> >>> >>> The same happens when parsing with yanglint, so looks like there's a problem in parsing, here's the output: >>> >>> >>> yanglint mef-cfm-dev.yang -VVV >>> >>> Validating mef-cfm-dev.yang schema file. >>> verb: Searching for "mef-cfm" in /_path_/yang-models. >>> verb: Searching for "mef-cfm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-cfm.yang" file. >>> verb: Searching for "ietf-yang-types" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/ietf-yang-types at 2010-09-24.yang" file. >>> verb: Module "ietf-yang-types" successfully parsed. >>> verb: Searching for "ietf-inet-types" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/ietf-inet-types at 2010-09-24.yang" file. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving derived type "union" failed, it will be attempted later. >>> verb: Resolving type default "" failed, it will be attempted later. >>> verb: Resolving "ietf-inet-types" unresolved schema nodes and their constraints... >>> verb: All "ietf-inet-types" schema nodes and constraints resolved. >>> verb: Module "ietf-inet-types" successfully parsed. >>> verb: Module "mef-cfm" successfully parsed. >>> verb: Searching for "mef-soam-fm" in /_path_/yang-models. >>> verb: Searching for "mef-soam-fm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-soam-fm.yang" file. >>> verb: Resolving "mef-soam-fm" unresolved schema nodes and their constraints... >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/test-type". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/target-address". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/interval". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/priority". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/drop-eligible". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/create-test-signal/input/frame-size". >>> warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-id-format". >>> warn: Schema node "icc-based" not found (../meg-id-format = icc-based) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/icc-name-value". >>> warn: Schema node "true" not found (../y1731-compliant= true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/meg-level". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/frame-size". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/data-pattern". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-included". >>> warn: Schema node "data-tlv" not found (not(../data-tlv) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/mef-cfm:loopback/test-tlv-pattern". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-type". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/target-address". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/interval". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/priority". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/drop-eligible". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/frame-size". >>> warn: Schema node "true" not found (../is-receiver = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-in". >>> warn: Schema node "true" not found (../is-generator = true) with context node "/mef-cfm:maintenance-domain/mef-cfm:maintenance-association/mef-cfm:maintenance-association-end-point/test-signal/test-signal-stats-out". >>> verb: All "mef-soam-fm" schema nodes and constraints resolved. >>> verb: Module "mef-soam-fm" successfully parsed. >>> verb: Searching for "mef-soam-pm" in /_path_/yang-models. >>> verb: Searching for "mef-soam-pm" in /_path_/yang-models. >>> verb: Loading schema from "/_path_/yang-models/mef-soam-pm.yang" file. >>> verb: Module "mef-soam-pm" successfully parsed. >>> verb: Module "mef-cfm-dev" successfully parsed. >>> Enabling all features in module ietf-yang-library. >>> Enabling all features in module ietf-yang-types. >>> Enabling all features in module ietf-inet-types. >>> Enabling all features in module mef-cfm. >>> Enabling all features in module mef-soam-fm. >>> Enabling all features in module mef-soam-pm. >>> Enabling all features in module mef-cfm-dev. >>> >>> And here it hangs. >>> >>> >>> Thanks, >>> >>> Jakub >>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>> *From:* Radek Krej?? >>> *Sent:* Wednesday, August 23, 2017 10:24:40 AM >>> *To:* Jakub Nadolski; Michal Va?ko >>> *Cc:* sysrepo-devel at sysrepo.org >>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>> >>> Hi, please try to parse them with yanglint (tool installed with libyang), there are also options to increase verbosity. At least we will see if the problem is in parsing the schemas or in something specific to sysrepoctl. >>> >>> Radek >>> >>> >>> Dne 23.8.2017 v 10:12 Jakub Nadolski napsal(a): >>>> Hi Radek, >>>> >>>> >>>> I just tested with libyang 0.13.47 and it works well, I am able to load almost all of my modules, thanks a lot for the quick help. I still have some problems with the modules where deviations are defined, but these are private company modules and I need to be sure before making them public. The behavior is strange, because there's no error, but sysrepoctl doesn't return, just hangs: >>>> >>>> >>>> sysrepoctl -i --yang=mef-cfm-dev.yang >>>> Installing a new module from file 'mef-cfm-dev.yang'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm-dev at 2017-07-26.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-fm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-fm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-soam-fm' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-soam-fm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm-dev' imports 'mef-soam-pm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-soam-pm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-soam-pm' imports 'mef-cfm'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/mef-cfm at 2012-04-16.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-cfm' imports 'ietf-inet-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>> Resolving dependency: 'mef-soam-pm' imports 'ietf-yang-types'... >>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-yang-types at 2010-09-24.yang'... >>>> >>>> Nothing happens here until I cancel this command. Are there some logs when I can check what happens and why it hangs? >>>> >>>> >>>> Regards, >>>> >>>> Jakub >>>> >>>> >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>>> *From:* Radek Krej?? >>>> *Sent:* Tuesday, August 22, 2017 3:57:57 PM >>>> *To:* Jakub Nadolski; Michal Va?ko >>>> *Cc:* sysrepo-devel at sysrepo.org >>>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>> >>>> Hi Jakub, >>>> the value " " for bits does not strictly follow the bits representation description from RFC, but in this case the parser should probably handle that in silence on its own (as it does even for other types). So, please, update libyang to 0.13.47 version, which should fix this issue. >>>> >>>> Regards, >>>> Radek >>>> >>>> >>>> Dne 22.8.2017 v 15:19 Jakub Nadolski napsal(a): >>>>> Hi Michal, >>>>> >>>>> >>>>> This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Jakub >>>>> >>>>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>>>> *From:* Michal Va?ko >>>>> *Sent:* Tuesday, August 22, 2017 3:14:52 PM >>>>> *To:* Jakub Nadolski >>>>> *Cc:* sysrepo-devel at sysrepo.org >>>>> *Subject:* Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>>> >>>>> Hello Jakub, >>>>> could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid. >>>>> >>>>> Regards, >>>>> Michal >>>>> >>>>> On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski wrote: >>>>> >>>>>> Hi Michal, >>>>>> >>>>>> >>>>>> Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang: >>>>>> >>>>>> >>>>>> Installing a new module from file 'mef-soam-pm.yang'... >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element. >>>>>> [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed. >>>>>> Error: Unable to load the module by libyang. >>>>>> Install operation failed. >>>>>> >>>>>> The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue? >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Jakub >>>>>> >>>>>> >>>>>> ________________________________ >>>>>> From: Michal Va?ko >>>>>> Sent: Tuesday, August 22, 2017 2:30:38 PM >>>>>> To: Jakub Nadolski >>>>>> Cc: sysrepo-devel at sysrepo.org >>>>>> Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo >>>>>> >>>>>> Hi Jakub, >>>>>> do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo. >>>>>> >>>>>> Regards, >>>>>> Michal >>>>>> >>>>>> On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski wrote: >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> >>>>>>> I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error: >>>>>>> >>>>>>> >>>>>>> sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang >>>>>>> Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'... >>>>>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'... >>>>>>> Skipping installation of data files for module 'ietf-inet-types'... >>>>>>> Notifying sysrepo about the change... >>>>>>> Install operation completed successfully. >>>>>>> >>>>>>> sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang >>>>>>> Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'... >>>>>>> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'... >>>>>>> [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'. >>>>>>> Error: Unable to insert the module into the dependency graph. >>>>>>> Reverting the install operation... >>>>>>> Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'. >>>>>>> Install operation failed. >>>>>>> >>>>>>> Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem? >>>>>>> >>>>>>> Thanks in advance, >>>>>>> Jakub >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> sysrepo-devel mailing list >>>>> sysrepo-devel at sysrepo.org >>>>> http://lists.sysrepo.org/listinfo/sysrepo-devel >>>> -- >>>> Radek Krejci >>>> mobile : +420 732 212 714 >>>> office : +420 234 680 256 >>>> e-mail : rkrejci at cesnet.cz >>>> LinkedIn: http://www.linkedin.com/in/radekkrejci >>>> >>>> CESNET, Association of Legal Entities >>>> Zikova 4 >>>> 160 00 Praha 6 >>>> Czech Republic >>>> >>>> >> > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: