[
https://issues.apache.org/jira/browse/KARAF-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151640#comment-17151640
]
Amichai Rothman commented on KARAF-6776:
----------------------------------------
I suspect this may be a bug in fileinstall, introduced accidentally in 3.6.6 in
the fix for https://issues.apache.org/jira/browse/FELIX-6103
The change added a call to getConfigurationAdmin().getConfiguration (previously
only calling listConfigurations()), and as documented, that methods sets the
location to the calling bundle's location (fileinstall) for any bundle whose
location is null. In our case, first the karaf feature installer adds the
default config (as defined in the feature file) with a null location, then
fileinstall gets the config which causes the location to be set to
fileinstall's location, which later prevents the scheduler from receiving the
configuration (since it has a different location).
If this is indeed the bug, then this issue is not specific to scheduler and can
cause problems in other bundles not receiving the configuration from
fileinstall's etc folder under a similar scenario (and possibly others).
It would be great if someone who knows more about config/fileinstall/features
can confirm/reject this analysis. If correct, I can open a bug in fileinstall,
and depending on their responsiveness and release cycle, maybe karaf should
downgrade back to 3.6.4 for the time being.
> scheduler doesn't work in featuresBoot
> --------------------------------------
>
> Key: KARAF-6776
> URL: https://issues.apache.org/jira/browse/KARAF-6776
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.9
> Environment: Oracle JDK 1.8.0_202 64-bit on Ubuntu 18.04.
> Reporter: Amichai Rothman
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 4.2.10
>
>
> When the karaf scheduler feature is added to the featuresBoot configuration
> so that it will be installed automatically on startup, there is a race
> condition that causes it not to work around half of the time.
> Steps to recreate:
> # Extract stock apache-karaf-4.2.9.tar.gz.
> # Edit etc/org.apache.karaf.features.cfg, adding ",scheduler" to the end of
> the featuresBoot config option.
> # Start karaf. About half of the time you'll find that there are no
> scheduler shell commands available (that's the quickest check, see below for
> details). If it works ok, delete the karaf folder and repeat steps 1-3 again
> until you see the issue (in my case it happens about half of the time).
> I'm not sure what the problem is yet. The feature is installed successfully
> and the bundle status is Active, but it just doesn't work. The scheduler
> shell commands are unrecognized. There are no errors in the logs, but
> debug-level logs are missing the quartz initialization messages. If you add a
> test bundle that registers a scheduler job service (whiteboard), it doesn't
> get executed.
> I suspect the problem is related to config admin, maybe it gets initialized
> with an empty config and the updates from the default config file aren't
> applied properly or something like that... I'm not sure, it's more of a guess.
> I have not encountered this issue in 4.2.8 or any of the previous versions,
> the scheduler always just worked using the same configuration. It's a blocker
> for our upgrade :-/
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)