Hello. I have tested the proposed 4.3.2 release and the startup.properties file is still being generated in a non- deterministic order. They are grouped in their start level, but within that they are listed in a random order.
The issue we have been seeing relates to the jetty distribution which listed in the startup.properties file as part of our custom installation, given the unpredictable order has led to the web server restarting a number of times during the boot cycle, this in turn can prevent karaf from starting. It appears that the problem is in the builder class in the profile project. This does attempt to sort the bundles, but the startupEffective.getBundles() list is empty and as such the sort operation has no effect. Would it be possible to updated the resolve() method and the MapUtils class to use LinkedHashMaps when using the Collectors.toMap() stream operations. Thanks Paul ________________________________ From: Romain Manni-Bucau <rmannibu...@gmail.com> Sent: 05 May 2021 16:10 To: dev <dev@karaf.apache.org> Subject: Re: Non-Deterministic startup order Hi Paul, Did you use the last 4.3 release? Startup bundles shouldn't be randomized anymore. For features it is a bit more complicated since it is a tree so guess order can't really be assumed without side effects (whereas it can for a flat list of bundles). Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> Le mer. 5 mai 2021 à 17:07, Paul Stanley <pj.stan...@live.co.uk> a écrit : > Hi. > > When building and running karaf the boot order for the initial set of > startup bundles is being randomised, within their start levels. As result > we are seeing non-deterministic behaviour between development and release > builds of custom karaf platforms. > > Please can you change the karaf.features.core and the karaf.profile.core > to use LinkedHashMaps and Sets, to preserve the order of bundles as > discovered in the feature.xml files. > > Thanks > Paul > >