Remove hardcoded version in DB2 install path

Bug #1746351 reported by Gaëtan Trellu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Undecided
Gaëtan Trellu

Bug Description

The DB2 path needs to be changed to /opt/ibm/db2/current and not using a version number because we don't want to update the code every time than a new version is released.

The current PATH hardcoded in the code is V10.5 but the latest DB2 release is V11.1.

Result after change:

# openstack database instance show db2 -c id -c name -c datastore -c datastore_version -c status
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| datastore | db2 |
| datastore_version | 11.1 |
| id | 3a735569-db88-41ad-84b9-9a69843c117b |
| name | db2 |
| status | ACTIVE |
+-------------------+--------------------------------------+

ubuntu@db2:~$ ls -l /opt/ibm/db2/current/
total 148
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 acs
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 adm
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 adsm
drwxr-xr-x 3 bin bin 4096 Jun 11 2017 bin
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 bnd
-rw-r--r-- 1 root root 0 Jan 31 23:01 cat
drwxr-xr-x 4 bin bin 4096 Jan 31 23:01 cfg
drwxr-xr-x 4 bin bin 4096 Jun 11 2017 conv
drwxr-xr-x 7 bin bin 4096 Jun 11 2017 das
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 dasfcn
drwxr-xr-x 7 bin bin 4096 Jun 11 2017 db2tss
drwxr-xr-x 5 bin bin 4096 Jun 11 2017 desktop
drwxr-xr-x 3 bin bin 4096 Jun 11 2017 doc
drwxr-xr-x 8 bin bin 4096 Jun 11 2017 dsdriver
drwxr-xr-x 4 bin bin 4096 Jun 11 2017 function
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 gse
drwxr-xr-x 3 bin bin 4096 Jun 11 2017 gskit
drwxr-xr-x 5 bin bin 4096 Jun 11 2017 ha
drwxr-xr-x 3 bin bin 4096 Jun 11 2017 include
drwxr-xr-x 4 bin bin 4096 Jun 11 2017 infopop
drwxr-xr-x 4 bin bin 4096 Jan 31 23:01 install
drwxr-xr-x 4 bin bin 4096 Jun 11 2017 instance
drwxr-xr-x 3 bin bin 4096 Jan 31 23:01 java
drwxr-xr-x 5 bin bin 4096 Jun 11 2017 json
drwxr-xr-x 3 bin bin 4096 Jan 31 23:00 lib32
drwxr-xr-x 3 bin bin 12288 Jan 31 23:00 lib64
drwxr-xr-x 31 bin bin 4096 Jan 31 23:01 license
lrwxrwxrwx 1 root root 12 Jun 11 2017 logs -> install/logs
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 misc
drwxr-xr-x 3 bin bin 4096 Jun 11 2017 msg
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 pd
drwxr-xr-x 4 bin bin 4096 Jun 11 2017 rdf
drwxr-xr-x 2 bin bin 4096 Jun 11 2017 Readme
drwxr-xr-x 28 bin bin 4096 Jun 11 2017 samples
drwxr-xr-x 3 bin bin 4096 Jun 11 2017 security32
drwxr-xr-x 3 bin bin 4096 Jun 11 2017 security64
drwxr-xr-x 4 bin bin 4096 Jun 11 2017 tools

ubuntu@db2:~$ ls /opt/ibm/db2/current/
acs adsm bnd cfg das db2tss doc function gskit include install java lib32 license misc pd Readme security32 tools
adm bin cat conv dasfcn desktop dsdriver gse ha infopop instance json lib64 logs msg rdf samples security64

ubuntu@db2:~$ ls /home/
db2das1 db2fenc1 db2inst1 ubuntu user001

ubuntu@db2:~$ ps fauxw | grep trove-guest
ubuntu 1167 0.4 0.8 143876 67996 ? Ss 23:14 0:10 /usr/bin/python2 /usr/local/bin/trove-guestagent --config-dir=/etc/trove/conf.d

Tags: db2 trove
Changed in trove:
assignee: nobody → Gaëtan Trellu (goldyfruit)
description: updated
description: updated
tags: added: db2 trove
summary: - Improve DB2 11.1 support
+ Remove hardcoded version in DB2 install path
description: updated
description: updated
description: updated
Revision history for this message
Gaëtan Trellu (goldyfruit) wrote :
Changed in trove:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/539737
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=770e31107519b0b7a14431f355d3f55fb1161d4a
Submitter: Zuul
Branch: master

commit 770e31107519b0b7a14431f355d3f55fb1161d4a
Author: Gaetan Trellu <email address hidden>
Date: Wed Jan 31 19:05:01 2018 -0500

    Remove hardcoded version in DB2 install path

    The DB2 path needs to be changed to something
    basic and not using a version number because we
    don't want to update the code every time than a
    new DB2 version is released.

    Updated DB2 version from 10.5 to 11.1, version
    10.5 is no more available on IBM website.

    Closes-Bug: #1746351
    Change-Id: I4fd7c66c3cd5ff8d540e994ada979b59c7def35e

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

This issue was fixed in the openstack/trove 9.0.0.0rc1 release candidate.

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.