Fix the issue with DB2 install
DB2 installation fails because the hostname cannot be correctly resolved. This was caused by the change in: https://review.openstack.org/#/c/272711/. The change includes adding '127.0.0.1 <hostname>' to the /etc/hosts file before the actual installation and deleting this entry from /etc/hosts once the installation is complete. To make this complete, a change is added to the guest agent to update the db2 settings for hostname: https://review.openstack.org/#/c/291820/ Change-Id: Ia9dad59b9b40e7df66f3b1659e529eb32bf91f17 Closes-Bug: #1556159
This commit is contained in:
parent
fd2442a7f2
commit
23f614ce1e
|
@ -12,6 +12,10 @@ DB2_PKG_LOCATION="/db2"
|
|||
mkdir ${DB2_PKG_LOCATION}
|
||||
cd ${DB2_PKG_LOCATION}
|
||||
|
||||
# DB2 install requires the hostname to be resolved correctly
|
||||
host_name=`hostname`
|
||||
echo "127.0.0.1 ${host_name}" >> /etc/hosts
|
||||
|
||||
tar -xvzf /tmp/in_target.d/db2.tar.gz
|
||||
|
||||
# installing dependencies
|
||||
|
@ -41,3 +45,8 @@ su - db2inst1 -c "db2 update database manager configuration using svcename db2c_
|
|||
|
||||
# Start the actual TCP/IP communication.
|
||||
su - db2inst1 -c "db2set DB2COMM=tcpip"
|
||||
|
||||
# DB2 requires the hostname to be resolved correctly. Delete this entry from the
|
||||
# /etc/hosts since this is the hostname of the instance where the image is being
|
||||
# built. The correct hostname will be set in the guest agent.
|
||||
sed -i "/127.0.0.1[[:space:]]*${host_name}/d" /etc/hosts
|
||||
|
|
Loading…
Reference in New Issue