aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cdf/src/cdf-prop-value/cdf-prop-value/src/main/java/cdf-prop-value.jarbin1593 -> 1593 bytes
-rw-r--r--cdf/src/cdf-prop-value/cdf-util/src/main/java/cdf-util.jarbin31099 -> 31099 bytes
-rw-r--r--postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install14
-rwxr-xr-xpostgresql-prep/src/common/postinst8
4 files changed, 13 insertions, 9 deletions
diff --git a/cdf/src/cdf-prop-value/cdf-prop-value/src/main/java/cdf-prop-value.jar b/cdf/src/cdf-prop-value/cdf-prop-value/src/main/java/cdf-prop-value.jar
index 1f9a1c9..b8475b5 100644
--- a/cdf/src/cdf-prop-value/cdf-prop-value/src/main/java/cdf-prop-value.jar
+++ b/cdf/src/cdf-prop-value/cdf-prop-value/src/main/java/cdf-prop-value.jar
Binary files differ
diff --git a/cdf/src/cdf-prop-value/cdf-util/src/main/java/cdf-util.jar b/cdf/src/cdf-prop-value/cdf-util/src/main/java/cdf-util.jar
index a5a86a6..88cdc2d 100644
--- a/cdf/src/cdf-prop-value/cdf-util/src/main/java/cdf-util.jar
+++ b/cdf/src/cdf-prop-value/cdf-util/src/main/java/cdf-util.jar
Binary files differ
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install b/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
index a20edc6..a6c2bbd 100644
--- a/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
@@ -55,24 +55,26 @@ ismaster=no
case $clustertype in
central )
CONFDIR=/var/config/DCAE/chef
- CONFCOUNT=$(ls $CONFDIR/*-postgres.conf 2>/dev/null | wc -l)
+ CONFDIR2=/tmp
+ CONFCOUNT=$(ls $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null | wc -l)
case "$CONFCOUNT" in
1 ) # OpenDCAE
umask 077
TMP=$(mktemp /tmp/tmp.pi1.XXXXXXXXXX)
trap 'rm -f $TMP' 0 1 2 3 15
- sed -e 's/ *: */="/' -e 's/ *$/"/' -e 's/=""/="/' -e 's/""$/"/' < $CONFDIR/*-postgres.conf > $TMP
+ cat $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null |
+ sed -e 's/ *: */="/' -e 's/[ ]*$/"/' -e 's/=""/="/' -e 's/""$/"/' > $TMP
. $TMP
- case `hostname` in
- $master ) ismaster=yes ;;
+ case "$master" in
+ `hostname` | `hostname -f` ) ismaster=yes ;;
*?* ) ismaster=no ;;
- '' ) die "master is not set in $CONF"
+ '' ) die "master is not set in $CONF" ;;
esac
PGNODES=$( ${INSTALL_ROOT}/opt/app/cdf/bin/getpropvalue -n pgnodes )
export MASTER=$( gen-repmgr-info -n "$PGNODES" -M "$master" )
[ -n "$MASTER" ] || die "Cannot determine master system. $CONF has '$master' (from env.yaml), which cannot be found in pgnodes."
;;
- 0 ) # not OpenDCAE
+ 0 ) # not OpenDCAE/ONAP
ismaster=yes
PGNODES=$( ${INSTALL_ROOT}/opt/app/cdf/bin/getpropvalue -n pgnodes )
export MASTER=$( gen-repmgr-info -n "$PGNODES" -m )
diff --git a/postgresql-prep/src/common/postinst b/postgresql-prep/src/common/postinst
index 6f0218e..1f8eb39 100755
--- a/postgresql-prep/src/common/postinst
+++ b/postgresql-prep/src/common/postinst
@@ -44,7 +44,8 @@ then INSTALL_ROOT=
fi
CONFDIR=/var/config/DCAE/chef
-CONFCOUNT=$(ls $CONFDIR/*-postgres.conf 2>/dev/null | wc -l)
+CONFDIR2=/tmp
+CONFCOUNT=$(ls $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null | wc -l)
case "$CONFCOUNT" in
1 )
# master: masternode
@@ -56,12 +57,13 @@ case "$CONFCOUNT" in
# PG_NODES : uiopmno1qwpstg00.research.example.com|asbczw1vepstg00.dcae.simpledemo.openecomp.org
# PG_JAVA_HOME : /opt/app/java/jdk/jdk170
# PG_CLUSTER : global
- cat $CONFDIR/*-postgres.conf | sed -e 's/ *: */="/' -e 's/[ ]*$/"/' -e 's/=""/="/' -e 's/""$/"/' > $TMP
+ cat $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null |
+ sed -e 's/ *: */="/' -e 's/[ ]*$/"/' -e 's/=""/="/' -e 's/""$/"/' > $TMP
. $TMP
;;
0 ) ;;
* )
- die "More than one postgres.conf was found: $(ls $CONFDIR/*-postgres.conf 2>&1)"
+ die "More than one postgres.conf was found: $(ls $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null)"
esac
[ -n "$PG_NODES" ] || die "PG_NODES is not set"