Description of problem: The volume - /var/lib/opendaylight/etc:/opt/opendaylight/etc is mounted into the docker container, which causes the default config files in /opt/opendaylight/etc in the container to be overridden with an empty directory. Although puppet-generated config files are copied by kolla at container runtime, the puppet-generated config files only include a subset of the deafult config files. Hence, the container constantly tries to restart because the ODL karaf process dies on start. Version-Release number of selected component (if applicable): How reproducible: Everytime Steps to Reproduce: 1. Deploy with ODL 2. 3. Actual results: Running command: '/opt/opendaylight/bin/karaf server' + exec /opt/opendaylight/bin/karaf server karaf: JAVA_HOME not set; results may vary null Error occurred shutting down framework: java.lang.NumberFormatException: null java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:542) at java.lang.Integer.parseInt(Integer.java:615) at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:214) at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:228) at org.apache.karaf.main.Main.main(Main.java:193) Expected results: Container starts and stays up.
A workaround for now is to remove the line from the docker/services/opendaylight_api.yaml file: https://github.com/openstack/tripleo-heat-templates/blob/master/docker/services/opendaylight-api.yaml#L141
Janki, why was this added in: https://review.openstack.org/#/c/489201/31/docker/services/opendaylight-api.yaml ?
It was added to set upgrade flag to false at https://review.openstack.org/#/c/489201/31/docker/services/opendaylight-api.yaml L169. (I am now thinking if that is the correct place). However, the mount should have copied files from container to host and not delete all the files from container. The reason why this is not happening is because etc/ is not created on host. Correct solution here would be to add '/var/lib/opendaylight/etc' under host_prep_tasks.
(In reply to Janki from comment #4) > It was added to set upgrade flag to false at > https://review.openstack.org/#/c/489201/31/docker/services/opendaylight-api. > yaml L169. (I am now thinking if that is the correct place). > > However, the mount should have copied files from container to host and not > delete all the files from container. The reason why this is not happening is > because etc/ is not created on host. Correct solution here would be to add > '/var/lib/opendaylight/etc' under host_prep_tasks. Adding etc/ on host via host_prep_tasks doesnot solve the problem too. Ideally, all files from container should be copied to host and vice versa when a volume is mounted. Need to find why this is not happening. Meanwhile, we can either not mount etc/ and find another way to change the ODL upgrade flag.
Checked with: puppet-opendaylight-8.1.0-0.20180321182556.45c4db7.el7ost.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:2086