Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-718

Augments fail to resolve

    XMLWordPrintable

Details

    Description

      Attempting to use mdsal-8.0.10 with bgpcep ends up in compilation failure:

      [ERROR] Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:7.0.12:generate-sources (binding) on project bgp-openconfig-api: Execution binding of goal org.opendaylight.yangtools:yang-maven-plugin:7.0.12:generate-sources failed: Failed to find (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors as (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors in ContainerGenerator{argument=(http://openconfig.net/yang/bgp?revision=2015-10-09)bgp} -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:7.0.12:generate-sources (binding) on project bgp-openconfig-api: Execution binding of goal org.opendaylight.yangtools:yang-maven-plugin:7.0.12:generate-sources failed: Failed to find (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors as (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors in ContainerGenerator{argument=(http://openconfig.net/yang/bgp?revision=2015-10-09)bgp}
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution binding of goal org.opendaylight.yangtools:yang-maven-plugin:7.0.12:generate-sources failed: Failed to find (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors as (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors in ContainerGenerator{argument=(http://openconfig.net/yang/bgp?revision=2015-10-09)bgp}
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: com.google.common.base.VerifyException: Failed to find (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors as (urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions?revision=2018-03-29)neighbors in ContainerGenerator{argument=(http://openconfig.net/yang/bgp?revision=2015-10-09)bgp}
          at com.google.common.base.Verify.verify (Verify.java:124)
          at com.google.common.base.Verify.verifyNotNull (Verify.java:500)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveSchemaNode (AbstractCompositeGenerator.java:244)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveNext (AbstractCompositeGenerator.java:253)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveSchemaNode (AbstractCompositeGenerator.java:229)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveNext (AbstractCompositeGenerator.java:253)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveSchemaNode (AbstractCompositeGenerator.java:246)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveNext (AbstractCompositeGenerator.java:253)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveSchemaNode (AbstractCompositeGenerator.java:246)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveNext (AbstractCompositeGenerator.java:253)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveSchemaNode (AbstractCompositeGenerator.java:246)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveNext (AbstractCompositeGenerator.java:253)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveSchemaNode (AbstractCompositeGenerator.java:238)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.AbstractCompositeGenerator.resolveSchemaNode (AbstractCompositeGenerator.java:218)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.ModuleAugmentGenerator.linkAugmentationTarget (ModuleAugmentGenerator.java:29)
          at org.opendaylight.mdsal.binding.generator.impl.reactor.GeneratorReactor.execute (GeneratorReactor.java:132)
          at org.opendaylight.mdsal.binding.generator.impl.DefaultBindingGenerator.generateFor (DefaultBindingGenerator.java:68)
          at org.opendaylight.mdsal.binding.generator.impl.DefaultBindingGenerator.generateTypes (DefaultBindingGenerator.java:38)
          at org.opendaylight.mdsal.binding.java.api.generator.JavaFileGenerator.generateFiles (JavaFileGenerator.java:74)
          at org.opendaylight.yangtools.yang2sources.plugin.FileGeneratorTask.execute (FileGeneratorTask.java:66)
          at org.opendaylight.yangtools.yang2sources.plugin.FileGeneratorTask.execute (FileGeneratorTask.java:40)
          at org.opendaylight.yangtools.yang2sources.plugin.GeneratorTask.execute (GeneratorTask.java:36)
          at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.generateSources (YangToSourcesProcessor.java:335)
          at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.conditionalExecute (YangToSourcesProcessor.java:214)
          at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesMojo.execute (YangToSourcesMojo.java:139)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      

      The offending module seems to be bgp-ll-graceful-restart and we seem to be resolving this augment:

          augment "/netinst:network-instances/netinst:network-instance/netinst:protocols/netinst:protocol/" +
                  "bgp-op-ext:bgp/bgp-op-ext:neighbors/bgp-op-ext:neighbor/bgp-op-ext:afi-safis/" +
                  "bgp-op-ext:afi-safi/bgp-op-ext:graceful-restart/bgp-op-ext:config" {
                      description "Add per peer-group afi-safi long-lived graceful restart config";
                      uses afi-safi-ll-graceful-restart;
                  }
      

      Examining the target site, the problem seems to be that the 'uses/augment' sites are not linked into the original definition by the time we are called (at the very end of augment resolution). This is a regression caused by the fix to MDSAL-715, which handled exactly this case, but again was insufficient. The reworked code relies on augment linkage being done, which works for modules, but UsesAugmentGenerator just does not have that callback.

      Attachments

        Issue Links

          # Subject Branch Project Status CR V

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: