Java home directory does not include arch

Bug #1780811 reported by Doug Szumski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Undecided
Doug Szumski

Bug Description

During the build of the Elasticsearch image, the Dockerfile sets an env var specifying the Java home directory according to the required arch. The relevant code is:

```
{% if base_arch == 'x86_64' %}
ENV java_arch=amd64
{% elif base_arch == 'aarch64' %}
ENV java_arch=arm64
{% else %}
ENV java_arch={{ base_arch }}
{% endif %}

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-{{ java_arch }}/
```

This code sets the java_arch environment variable. Since this is not the java_arch Jinja variable, the JAVA_HOME env var does not contain the java_arch. For example:

```
INFO:kolla.common.utils.elasticsearch:Step 4/10 : ENV java_arch=amd64
INFO:kolla.common.utils.elasticsearch: ---> Running in 25baacf44c39
INFO:kolla.common.utils.elasticsearch:Removing intermediate container 25baacf44c39
INFO:kolla.common.utils.elasticsearch: ---> b821256b9708
INFO:kolla.common.utils.elasticsearch:Step 5/10 : ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-/
```

The expected behaviour is that the JAVA_HOME env var includes the arch.

Doug Szumski (dszumski)
Changed in kolla:
assignee: nobody → Doug Szumski (dszumski)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/581079

Changed in kolla:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/581079
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=e1e298dc9590af24c42361bf767ff8fcd51132ae
Submitter: Zuul
Branch: master

commit e1e298dc9590af24c42361bf767ff8fcd51132ae
Author: Doug Szumski <email address hidden>
Date: Mon Jul 9 17:16:38 2018 +0100

    Ensure JAVA_HOME env var contains architecture

    During the build of the Elasticsearch image, the Dockerfile sets an
    env var specifying the architecture that the image is built for. This
    change ensures that this env var is correctly used in the JAVA_HOME
    directory.

    Closes-Bug: 1780811

    Change-Id: I3eeacabafcc3855165519a739792f0570fdfd5d8

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 7.0.0.0b3

This issue was fixed in the openstack/kolla 7.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.