I think this is karaf 4 side effect, try to either list all your features in 
the config boot file or execute all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs 
odl-clustering-test-app odl-netconf-topology

otherwise bundles may be restarted when you do successive installs. This 
behavior cannot be changed AFAIK.

BR/Luis


> On Oct 12, 2017, at 11:58 AM, [email protected] wrote:
> 
> Hi,
> I need your help. I am porting our project to Nitrogen and have serious 
> problems with Karaf 4 features. There is something that I don’t understand 
> there.
> On clean Karaf, I first install ODL feature odl-mdsal-apidocs:
>  
>                 >feature:install odl-mdsal-apidocs
>  
> >list | grep -i -v active
> START LEVEL 100 , List Threshold: 50
> ID | State    | Lvl | Version                             | Name
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 31 | Resolved |  80 | 4.0.9                               | Apache Karaf :: 
> Diagnostic :: Boot
> 183 | Resolved |  80 | 0.7.0                               | 
> config-persister-directory-xml-adapter, Hosts: 185
> 184 | Resolved |  80 | 0.7.0                               | 
> config-persister-file-xml-adapter, Hosts: 185
>  
>  
> No problems. Then I want to install a third party bundle 
> org.apache.mina/mina-core/2.0.9 . If I install it as a bundle, I still don’t 
> see any problem.
>  
> >bundle:install –s mvn:org.apache.mina/mina-core/2.0.9
>  
> >list | grep -i -v active
> START LEVEL 100 , List Threshold: 50
> ID | State    | Lvl | Version                             | Name
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 31 | Resolved |  80 | 4.0.9                               | Apache Karaf :: 
> Diagnostic :: Boot
> 183 | Resolved |  80 | 0.7.0                               | 
> config-persister-directory-xml-adapter, Hosts: 185
> 184 | Resolved |  80 | 0.7.0                               | 
> config-persister-file-xml-adapter, Hosts: 185
>  
>  
> However, if I wrap it in  a feature, I get absolutely different behavior.
>  
>  
> >feature:install -v my-feature
> Adding features: my-feature/[5.0.1.SNAPSHOT, 5.0.1.SNAPSHOT]
> Changes to perform:
>   Region: root
>     Bundles to install:
>       mvn:org.apache.mina/mina-core/2.0.9
> Installing bundles:
>   mvn:org.apache.mina/mina-core/2.0.9
> Stopping bundles:
>   org.opendaylight.netconf.sal-rest-docgen/1.6.0
>   org.opendaylight.netconf.sal-rest-connector/1.6.0
>   org.opendaylight.aaa.shiro-act/0.6.0
>   org.opendaylight.aaa.shiro/0.6.0
>   org.opendaylight.aaa.idmlight/0.6.0
>   org.opendaylight.aaa.cert/0.6.0
>   org.opendaylight.aaa.encrypt-service/0.6.0
>   org.apache.sshd.core/0.14.0
>   org.apache.karaf.shell.ssh/4.0.9
> Refreshing bundles:
>     org.apache.karaf.shell.ssh/4.0.9 (Wired to org.apache.sshd.core/0.14.0 
> which is being refreshed)
>     org.apache.sshd.core/0.14.0 (Should be wired to: 
> org.apache.mina.core/2.0.9 (through [org.apache.sshd.core/0.14.0] 
> osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=org.apache.mina.core.buffer)(version>=2.0.0)(!(version>=3.0.0)))";
>  resolution:=optional))
>     org.opendaylight.aaa.cert/0.6.0 (Wired to 
> org.opendaylight.aaa.encrypt-service/0.6.0 which is being refreshed)
>     org.opendaylight.aaa.encrypt-service/0.6.0 (Wired to 
> org.apache.sshd.core/0.14.0 which is being refreshed)
>     org.opendaylight.aaa.idmlight/0.6.0 (Wired to 
> org.opendaylight.aaa.shiro/0.6.0 which is being refreshed)
>     org.opendaylight.aaa.shiro/0.6.0 (Wired to 
> org.opendaylight.aaa.cert/0.6.0 which is being refreshed)
>     org.opendaylight.aaa.shiro-act/0.6.0 (Wired to 
> org.opendaylight.aaa.shiro/0.6.0 which is being refreshed)
>     org.opendaylight.netconf.sal-rest-connector/1.6.0 (Wired to 
> org.opendaylight.aaa.shiro/0.6.0 which is being refreshed)
>     org.opendaylight.netconf.sal-rest-docgen/1.6.0 (Wired to 
> org.opendaylight.aaa.shiro/0.6.0 which is being refreshed)
> Starting bundles:
>   org.apache.mina.core/2.0.9
> Done.
>  
> >list | grep -i -v active
> START LEVEL 100 , List Threshold: 50
> ID | State       | Lvl | Version                             | Name
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 31 | Resolved    |  80 | 4.0.9                               | Apache Karaf 
> :: Diagnostic :: Boot
> 167 | GracePeriod |  80 | 0.6.0                               | ODL :: aaa :: 
> aaa-cert
> 168 | Failure     |  80 | 0.6.0                               | ODL :: aaa :: 
> aaa-encrypt-service
> 172 | GracePeriod |  80 | 0.6.0                               | 
> org.opendaylight.aaa.aaa-shiro
> 183 | Resolved    |  80 | 0.7.0                               | 
> config-persister-directory-xml-adapter, Hosts: 185
> 184 | Resolved    |  80 | 0.7.0                               | 
> config-persister-file-xml-adapter, Hosts: 185
> 262 | GracePeriod |  80 | 1.6.0                               | MD SAL 
> Restconf Connector
>  
> The “mina” bundle itself is not very important. The same behavior I observed 
> with some other bundles. I don’t understand why Karaf restarts already 
> installed bundles simply because I added one more. Why is it important that 
> the bundle is wrapped in a feature? Can I disable such behavior?
>  
> Thanks,
> Yevgeny
>  
> _______________________________________________
> Discuss mailing list
> [email protected] <mailto:[email protected]>
> https://lists.opendaylight.org/mailman/listinfo/discuss 
> <https://lists.opendaylight.org/mailman/listinfo/discuss>
_______________________________________________
Discuss mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/discuss

Reply via email to