Paul Spencer created KARAF-7849:
-----------------------------------
Summary: Features in XML will not be listed by feature:list if all
features are configured with the "install" attribute
Key: KARAF-7849
URL: https://issues.apache.org/jira/browse/KARAF-7849
Project: Karaf
Issue Type: Bug
Components: karaf
Affects Versions: 4.4.6
Environment: Karaf version: 4.4.6
Java Virtual Machine: OpenJDK 64-Bit Server VM version 11.0.2+9
Operating system: Mac OS X version 10.16
Architecture: x86_64
Reporter: Paul Spencer
The following behavior does not meet my expectations
- Behavior of install-mixed-1.0.0.xml does not match documentation in section
"4.10.13 - Provisioning Deployer",
[https://karaf.apache.org/manual/latest/#_deployer]. Specifically the
documentation
states the only features with install="auto" will be installed. In the case
of install-mixed-1.0.0, the auto feature was not installed.
- None of the features in install-manual-1.0.0.xml appear in feature:list
- The configuration element for all features with install="auto" or no install
attribute created entries even though the feature is listed as uninstalled.
The use case is a feature.xml that can be used to manually install client or
server bundles, but none by default.
***
* tail:log output
***
10:50:13.609 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy]
Installing bundle install-manual / 1.0.0
10:50:13.615 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy]
Installing bundle install-none / 1.0.0
10:50:13.619 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy]
Installing bundle install-auto / 1.0.0
10:50:13.624 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy]
Installing bundle install-mixed / 1.0.0
10:50:13.651 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy]
Started bundle:
feature:file:/Users/paul/Documents/apache-karaf-4.4.6/deploy/install-mixed-1.0.0.xml
10:50:13.657 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy]
Started bundle:
feature:file:/Users/paul/Documents/apache-karaf-4.4.6/deploy/install-none-1.0.0.xml
10:50:13.660 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy]
Started bundle:
feature:file:/Users/paul/Documents/apache-karaf-4.4.6/deploy/install-auto-1.0.0.xml
10:50:13.692 INFO [activator-1-thread-1] Registering commands for bundle
org.apache.karaf.shell.ssh/4.4.6
10:50:13.704 INFO [activator-1-thread-1] No detected/configured
IoServiceFactoryFactory; using Nio2ServiceFactoryFactory
10:50:13.835 INFO [features-3-thread-1] No deployment change.
10:50:13.843 INFO [features-3-thread-1] Done.
10:50:13.947 INFO [features-3-thread-1] No deployment change.
10:50:13.953 INFO [features-3-thread-1] Done.
10:50:14.058 INFO [features-3-thread-1] No deployment change.
10:50:14.064 INFO [features-3-thread-1] Done.
10:50:22.650 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/etc]
Updating configuration \{case~install-none} from
/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-none.cfg
10:50:22.652 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/etc]
Updating configuration \{case~install-mixed} from
/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-mixed.cfg
10:50:22.654 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/etc]
Updating configuration \{case~install-auto} from
/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-auto.cfg
10:51:21.253 INFO [CM Configuration Updater (Update:
pid=org.ops4j.pax.logging)] Sending Event Admin notification (configuration
successful) to org/ops4j/pax/logging/Configuration
^C~
karaf@root()>
feature:list | grep case | sort
case-install-auto-bar │ 1.0.0 │ x │ Started │
install-auto-1.0.0 │
case-install-auto-foo │ 1.0.0 │ x │ Started │
install-auto-1.0.0 │
case-install-mixed-auto │ 1.0.0 │ │ Uninstalled │
install-mixed-1.0.0 │
case-install-mixed-manual │ 1.0.0 │ │ Uninstalled │
install-mixed-1.0.0 │
case-install-mixed-none │ 1.0.0 │ │ Uninstalled │
install-mixed-1.0.0 │
case-install-none-bar │ 1.0.0 │ │ Uninstalled │
install-none-1.0.0 │
case-install-none-foo │ 1.0.0 │ │ Uninstalled │
install-none-1.0.0 │
karaf@root()> list
START LEVEL 100 , List Threshold: 50
ID │ State │ Lvl │ Version │ Name
───┼────────┼─────┼─────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
33 │ Active │ 80 │ 4.4.6 │ Apache Karaf :: OSGi Services :: Event
53 │ Active │ 80 │ 1.0.0 │ install-manual
54 │ Active │ 80 │ 1.0.0 │ install-none
55 │ Active │ 80 │ 1.0.0 │ install-auto
56 │ Active │ 80 │ 1.0.0 │ install-mixed
karaf@root()>
***
* install-auto-1.0.0.xml
***
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="[http://karaf.apache.org/xmlns/features/v1.6.0]"
name="install-auto-1.0.0">
<feature name="case-install-auto-foo" version="1.0.0" install="auto">
<config name="case-install-auto" append="true">
fooAutoInstalled = 1.0.0
</config>
</feature>
<feature name="case-install-auto-bar" version="1.0.0" install="auto">
<config name="case-install-auto" append="true">
barAutoInstalled = 1.0.0
</config>
</feature>
</features>
***
* install-manual-1.0.0.xml
***
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="[http://karaf.apache.org/xmlns/features/v1.6.0]"
name="install-manual-1.0.0">
<feature name="case-install-manual-foo" version="1.0.0" install="manual">
<config name="case-install-manual" append="true">
fooManualInstalled = 1.0.0
</config>
</feature>
<feature name="case-install-manual-bar" version="1.0.0" install="manual">
<config name="case-install-manual" append="true">
barManualInstalled = 1.0.0
</config>
</feature>
</features>
***
* install-mixed-1.0.0.xml
***
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="[http://karaf.apache.org/xmlns/features/v1.6.0]"
name="install-mixed-1.0.0">
<feature name="case-install-mixed-auto" version="1.0.0" install="auto">
<config name="case-install-mixed" append="true">
fooAutoInstalled = 1.0.0
</config>
</feature>
<feature name="case-install-mixed-manual" version="1.0.0" install="manual">
<config name="case-install-mixed" append="true">
barManualInstalled = 1.0.0
</config>
</feature>
<feature name="case-install-mixed-none" version="1.0.0">
<config name="case-install-mixed" append="true">
foobarNoneInstalled = 1.0.0
</config>
</feature>
</features>
***
* install-none-1.0.0.xml
***
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="[http://karaf.apache.org/xmlns/features/v1.6.0]"
name="install-none-1.0.0">
<feature name="case-install-none-foo" version="1.0.0">
<config name="case-install-none" append="true">
fooNoneInstalled = 1.0.0
</config>
</feature>
<feature name="case-install-none-bar" version="1.0.0">
<config name="case-install-none" append="true">
barNoneInstalled = 1.0.0
</config>
</feature>
</features>
***
* case-install-auto.cfg
***
barAutoInstalled = 1.0.0
org.apache.karaf.features.configKey = case-install-auto
felix.fileinstall.filename =
file:/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-auto.cfg
fooAutoInstalled = 1.0.0
***
* case-install-mixed.cfg
***
fooAutoInstalled = 1.0.0
org.apache.karaf.features.configKey = case-install-mixed
felix.fileinstall.filename =
file:/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-mixed.cfg
foobarNoneInstalled = 1.0.0
***
* case-install-none.cfg
***
barNoneInstalled = 1.0.0
org.apache.karaf.features.configKey = case-install-none
felix.fileinstall.filename =
file:/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-none.cfg
fooNoneInstalled = 1.0.0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)