Multi-version OpenConfig compilation issue

19 views
Skip to first unread message

hir...@opennetworking.org

unread,
May 8, 2018, 4:29:08 PM5/8/18
to Dynamic configuration
In the ODTN project, we have to deal with multi-revision OpenConfig because each vendor supports different version OpenConfig.
OpenConfig(version early 2017) is already added to onos repository, and it can be compiled without error.
But when I tried to add another OpenConfig version to the same directory "models/openconfig", I got some errors:

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfi...@2016-12-22.yang at line: 302 at position: 6
YANG file error: Unable to find base grouping for given uses
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfi...@2016-12-22.yang at line: 302 at position: 6
YANG file error: Unable to find base grouping for given uses
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/opencon...@2017-07-14.yang at line: 120 at position: 8
YANG file error: Unable to find base grouping for given uses
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/opencon...@2017-07-14.yang at line: 120 at position: 8
YANG file error: Unable to find base grouping for given uses
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)


You can reproduce this issue with https://gerrit.onosproject.org/#/c/18282/
Please check it and let me know how to avoid this error.

Thanks,
Hiroki

hir...@opennetworking.org

unread,
May 8, 2018, 6:46:07 PM5/8/18
to Dynamic configuration
According to Yuta's comment on gerrit, I've added "revision-date" substatement to all "import" statement, 
then I've got this kind of error:

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-optical-amplifier in /home/ubuntu/onos/models/openconfig/src/main/yang/openconfig-optical-amp
lif...@2016-03-31.yang at line: 10 at position: 2
YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-optical-amplifier in /home/ubuntu/on
os/models/openconfig/src/main/yang/openconfig-opt...@2016-03-31.yang at line: 10 at position: 2             
YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.                                                                                                                   
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.ja
va:265)                                                                                                                
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedList
eningExecutorService.java:77)                                                                                          
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)


The revision of "openconfig-trans...@2016-03-31.yang" is
  revision "2016-03-31" {                                                                                             
    description                                                                                                       
      "Initial public release";                                                                                       
    reference "0.1.0";                                                                                                
  }   

and the import statement of "openconfig-opt...@2016-03-31.yang" is 
  import openconfig-transport-line-common {                                                                           
    prefix oc-line-com;                                                                                               
    revision-date "2016-03-31";                                                                                       
  } 

the revision and revision-date are the same, so I expect this would work fine, but it didn't work.

Could you let me know your thoughts?



On Tuesday, May 8, 2018 at 1:29:08 PM UTC-7, hir...@opennetworking.org wrote:
In the ODTN project, we have to deal with multi-revision OpenConfig because each vendor supports different version OpenConfig.
OpenConfig(version early 2017) is already added to onos repository, and it can be compiled without error.
But when I tried to add another OpenConfig version to the same directory "models/openconfig", I got some errors:

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfig-platform@2016-12-22.yang at line: 302 at position: 6
YANG file error: Unable to find base grouping for given uses
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfig-platform@2016-12-22.yang at line: 302 at position: 6
YANG file error: Unable to find base grouping for given uses
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig-vlan@2017-07-14.yang at line: 120 at position: 8
YANG file error: Unable to find base grouping for given uses
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig-vlan@2017-07-14.yang at line: 120 at position: 8

Yuta Higuchi

unread,
May 9, 2018, 1:38:12 AM5/9/18
to Hiroki Okui, Dynamic configuration
To add on to this issue, what is a bit weird is when you re-run

$ onos-buck build //models/openconfig:onos-models-openconfig

it fails at different location.

So there seems to be some kind of race condition, depending on how things get concurrently compiled?


On Tue, May 8, 2018 at 3:46 PM, <hir...@opennetworking.org> wrote:
According to Yuta's comment on gerrit, I've added "revision-date" substatement to all "import" statement, 
then I've got this kind of error:

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-optical-amplifier in /home/ubuntu/onos/models/openconfig/src/main/yang/openconfig-optical-amp
lif...@2016-03-31.yang at line: 10 at position: 2
YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-optical-amplifier in /home/ubuntu/on
os/models/openconfig/src/main/yang/openconfig-optical-amplifi...@2016-03-31.yang at line: 10 at position: 2             
YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.                                                                                                                   
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.ja
va:265)                                                                                                                
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedList
eningExecutorService.java:77)                                                                                          
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)


The revision of "openconfig-transport-line-comm...@2016-03-31.yang" is
  revision "2016-03-31" {                                                                                             
    description                                                                                                       
      "Initial public release";                                                                                       
    reference "0.1.0";                                                                                                
  }   

and the import statement of "openconfig-optical-amplifier@2016-03-31.yang" is 
Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig...@2017-07-14.yang at line: 120 at position: 8
YANG file error: Unable to find base grouping for given uses
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig...@2017-07-14.yang at line: 120 at position: 8
YANG file error: Unable to find base grouping for given uses
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)


You can reproduce this issue with https://gerrit.onosproject.org/#/c/18282/
Please check it and let me know how to avoid this error.

Thanks,
Hiroki

--
You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-dynconfig/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/8a81dab5-1274-41b7-9c96-d6e2806ef001%40onosproject.org.

Gaurav agrawal

unread,
May 10, 2018, 12:31:33 PM5/10/18
to Yuta Higuchi, Hiroki Okui, Dynamic configuration, Kalyankumar Asangi

Hi Yuta,

 

I see your patch in gerrit for the fix. Can you please elaborate on the issue your found, will help with the quick review.

 

Thanks and Regards,

Gaurav

 

From: Yuta Higuchi [mailto:y-hi...@opennetworking.org]
Sent: 2018
59 11:08
To: Hiroki Okui
Cc: Dynamic configuration
Subject: Re: [brigade-dynconfig] Re: Multi-version OpenConfig compilation issue

 

To add on to this issue, what is a bit weird is when you re-run

 

$ onos-buck build //models/openconfig:onos-models-openconfig

 

it fails at different location.

 

So there seems to be some kind of race condition, depending on how things get concurrently compiled?

 

On Tue, May 8, 2018 at 3:46 PM, <hir...@opennetworking.org> wrote:

According to Yuta's comment on gerrit, I've added "revision-date" substatement to all "import" statement, 

then I've got this kind of error:

 

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-optical-amplifier in /home/ubuntu/onos/models/openconfig/src/main/yang/openconfig-optical-amp
lif...@2016-03-31.yang at line: 10 at position: 2
YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-optical-amplifier in /home/ubuntu/on

os/models/openconfig/src/main/yang/openconfig-opt...@2016-03-31.yang at line: 10 at position: 2             


YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.                                                                                                                   
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.ja
va:265)                                                                                                                
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedList
eningExecutorService.java:77)                                                                                          
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

 

 

The revision of "openconfig-trans...@2016-03-31.yang" is

  revision "2016-03-31" {                                                                                             
    description                                                                                                       
      "Initial public release";                                                                                       
    reference "0.1.0";                                                                                                
  }   

 

and the import statement of "openconfig-opt...@2016-03-31.yang" is 

  import openconfig-transport-line-common {                                                                           
    prefix oc-line-com;                                                                                               
    revision-date "2016-03-31";                                                                                       
  } 

 

the revision and revision-date are the same, so I expect this would work fine, but it didn't work.

 

Could you let me know your thoughts?


On Tuesday, May 8, 2018 at 1:29:08 PM UTC-7, hir...@opennetworking.org wrote:

In the ODTN project, we have to deal with multi-revision OpenConfig because each vendor supports different version OpenConfig.

OpenConfig(version early 2017) is already added to onos repository, and it can be compiled without error.

But when I tried to add another OpenConfig version to the same directory "models/openconfig", I got some errors:

 

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:

Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfi...@2016-12-22.yang at line: 302 at position: 6

YANG file error: Unable to find base grouping for given uses

org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfi...@2016-12-22.yang at line: 302 at position: 6

YANG file error: Unable to find base grouping for given uses

        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)

        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)

        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)

        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)

        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)

        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)

        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)

        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)

        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:

Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/opencon...@2017-07-14.yang at line: 120 at position: 8

YANG file error: Unable to find base grouping for given uses

org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/opencon...@2017-07-14.yang at line: 120 at position: 8

YANG file error: Unable to find base grouping for given uses

        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)

        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)

        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)

        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)

        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)

        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)

        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)

        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)

        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

 

 

You can reproduce this issue with https://gerrit.onosproject.org/#/c/18282/

Please check it and let me know how to avoid this error.

 

Thanks,

Hiroki

 

--
You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.

To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dyncon...@onosproject.org.
To post to this group, send email to brigade-...@onosproject.org.

 

--

You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.

To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dyncon...@onosproject.org.
To post to this group, send email to brigade-...@onosproject.org.

Yuta Higuchi

unread,
May 10, 2018, 1:17:02 PM5/10/18
to Gaurav agrawal, Hiroki Okui, Dynamic configuration, Kalyankumar Asangi
I think there's two problems.

Original problem we had was that when there are multiple revision of yangs,  yang compiler seems to fail, 
and where it fails seems to be random.
# This was observed, when we had to deal with two different generation of OpenConfig

as a workaround, I've came up with the following
so that yang compilation stage will only see 1 revision at same time.
But now I started seeing 2nd problem.

2nd problem seems to be that, when there are multiple dependency to yang (schema), 
there was a code, which copies the yang/resources/YangMetaData.ser to output directory, 
but that relative path is always fixed, it will overwrite the previous one making,
making required dependency unvisible, failing compilation.

The yang tools patch is trying to address this 2nd issue.

I hope that make it clear.



On Thu, May 10, 2018 at 9:31 AM, Gaurav agrawal <gaurav....@huawei.com> wrote:

Hi Yuta,

 

I see your patch in gerrit for the fix. Can you please elaborate on the issue your found, will help with the quick review.

 

Thanks and Regards,

Gaurav

 

From: Yuta Higuchi [mailto:y-higuchi@opennetworking.org]
Sent: 2018
59 11:08
To: Hiroki Okui
Cc: Dynamic configuration
Subject: Re: [brigade-dynconfig] Re: Multi-version OpenConfig compilation issue

To add on to this issue, what is a bit weird is when you re-run

 

$ onos-buck build //models/openconfig:onos-models-openconfig

 

it fails at different location.

 

So there seems to be some kind of race condition, depending on how things get concurrently compiled?

 

On Tue, May 8, 2018 at 3:46 PM, <hir...@opennetworking.org> wrote:

According to Yuta's comment on gerrit, I've added "revision-date" substatement to all "import" statement, 

then I've got this kind of error:

 

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:
Error in file: openconfig-optical-amplifier in /home/ubuntu/onos/models/openconfig/src/main/yang/openconfig-optical-amp
lif...@2016-03-31.yang at line: 10 at position: 2
YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.
org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-optical-amplifier in /home/ubuntu/on

os/models/openconfig/src/main/yang/openconfig-optical-ampl...@2016-03-31.yang at line: 10 at position: 2             


YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.                                                                                                                   
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.ja
va:265)                                                                                                                
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedList
eningExecutorService.java:77)                                                                                          
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

 

 

The revision of "openconfig-transport-line-com...@2016-03-31.yang" is

  revision "2016-03-31" {                                                                                             
    description                                                                                                       
      "Initial public release";                                                                                       
    reference "0.1.0";                                                                                                
  }   

 

and the import statement of "openconfig-optical-amplifier@2016-03-31.yang" is 

  import openconfig-transport-line-common {                                                                           
    prefix oc-line-com;                                                                                               
    revision-date "2016-03-31";                                                                                       
  } 

 

the revision and revision-date are the same, so I expect this would work fine, but it didn't work.

 

Could you let me know your thoughts?


On Tuesday, May 8, 2018 at 1:29:08 PM UTC-7, hir...@opennetworking.org wrote:

In the ODTN project, we have to deal with multi-revision OpenConfig because each vendor supports different version OpenConfig.

OpenConfig(version early 2017) is already added to onos repository, and it can be compiled without error.

But when I tried to add another OpenConfig version to the same directory "models/openconfig", I got some errors:

 

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:

Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfig-platform@2016-12-22.yang at line: 302 at position: 6

YANG file error: Unable to find base grouping for given uses

org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-platform in /home/ubuntu/onos/models/openconfig/src/main/yang/platform/openconfig-platform@2016-12-22.yang at line: 302 at position: 6

YANG file error: Unable to find base grouping for given uses

        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)

        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)

        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)

        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)

        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)

        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)

        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)

        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)

        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

BUILD FAILED: //models/openconfig:onos-models-openconfig-yang#srcs failed on step yang-compile with an exception:

Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig-vlan@2017-07-14.yang at line: 120 at position: 8

YANG file error: Unable to find base grouping for given uses

org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig-vlan@2017-07-14.yang at line: 120 at position: 8

YANG file error: Unable to find base grouping for given uses

        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.java:265)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)

        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)

        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)

        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)

        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)

        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)

        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)

        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:77)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)

        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)

        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)

        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

 

 

You can reproduce this issue with https://gerrit.onosproject.org/#/c/18282/

Please check it and let me know how to avoid this error.

 

Thanks,

Hiroki

 

--
You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.

To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.

--
You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.

Yuta Higuchi

unread,
May 10, 2018, 1:26:01 PM5/10/18
to Gaurav agrawal, Hiroki Okui, Dynamic configuration, Kalyankumar Asangi
Just in case, Yang tool patch that I'm talking about in previous email is:
 https://gerrit.onosproject.org/18332

os/models/openconfig/src/main/yang/openconfig-optical-amplifi...@2016-03-31.yang at line: 10 at position: 2             


YANG file error : Imported module openconfig-transport-line-common with revision Thu Mar 31 00:00:00 UTC 2016 is not fo
und.                                                                                                                   
        at org.onosproject.yang.compiler.tool.YangCompilerManager.resolveDependenciesUsingLinker(YangCompilerManager.ja
va:265)                                                                                                                
        at org.onosproject.yang.compiler.tool.YangCompilerManager.processYangFiles(YangCompilerManager.java:167)
        at org.onosproject.yang.compiler.tool.YangCompilerManager.compileYangFiles(YangCompilerManager.java:97)
        at org.onosproject.yang.compiler.plugin.buck.YangGenerator.execute(YangGenerator.java:98)
        at org.onosproject.yang.compiler.plugin.buck.YangStep.execute(YangStep.java:73)
        at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:62)
        at com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:1240)
        at com.facebook.buck.rules.CachingBuildEngine.lambda$null$0(CachingBuildEngine.java:320)
        at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedList
eningExecutorService.java:77)                                                                                          
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442)
        at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433)
        at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408)
        at com.google.common.util.concurrent.Futures$2$1.run(Futures.java:1177)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

 

 

The revision of "openconfig-transport-line-comm...@2016-03-31.yang" is

Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig...@2017-07-14.yang at line: 120 at position: 8

YANG file error: Unable to find base grouping for given uses

org.onosproject.yang.compiler.api.YangCompilerException: Error in file: openconfig-vlan in /home/ubuntu/onos/models/openconfig/src/main/yang/vlan/openconfig...@2017-07-14.yang at line: 120 at position: 8

Reply all
Reply to author
Forward
0 new messages