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):
Steps to Reproduce:
1. Deploy with ODL
Running command: '/opt/opendaylight/bin/karaf server'
+ exec /opt/opendaylight/bin/karaf server
karaf: JAVA_HOME not set; results may vary
Error occurred shutting down framework: java.lang.NumberFormatException: null
Container starts and stays up.
A workaround for now is to remove the line from the docker/services/opendaylight_api.yaml file:
Janki, why was this added in:
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
> 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.
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.