diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2017-05-15 03:16:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-05-15 03:16:16 +0000 |
commit | 7c0f3ce19a502317e15f381b15e06930a1952dbc (patch) | |
tree | d09a32691ec014f5571ab6fa2acaf9a949d31348 /pgaas/src/stage | |
parent | 7d41ad61e2a3b17505123d1aa7b56fb14d3f143d (diff) | |
parent | 844a29c7570aa10775b34fe28dcc022de65fed4c (diff) |
Merge "[DCAE-20] fix problem with config change"
Diffstat (limited to 'pgaas/src/stage')
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/check_cluster | 6 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/isrw | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/list_masters | 6 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop | 14 | ||||
-rw-r--r-- | pgaas/src/stage/opt/app/pgaas/bin/repmgrc | 14 | ||||
-rw-r--r-- | pgaas/src/stage/opt/app/pgaas/bin/repmgrdc | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/runpsql | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/runpsqll | 14 | ||||
-rw-r--r-- | pgaas/src/stage/opt/app/pgaas/bin/startpsql | 14 | ||||
-rwxr-xr-x | pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw | 14 |
14 files changed, 113 insertions, 67 deletions
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/check_cluster b/pgaas/src/stage/opt/app/pgaas/bin/check_cluster index c55d973..dbed877 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/check_cluster +++ b/pgaas/src/stage/opt/app/pgaas/bin/check_cluster @@ -32,7 +32,11 @@ CDF=/opt/app/cdf if [ -d /opt/app/postgresql-9.5.2 ] then PGDIR=/opt/app/postgresql-9.5.2 -else PGDIR=/usr/lib/postgresql/9.5 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi if [ -d /opt/app/postgresql-config-9.5.2/ ] then CFGDIR=/opt/app/postgresql-config-9.5.2/ diff --git a/pgaas/src/stage/opt/app/pgaas/bin/isrw b/pgaas/src/stage/opt/app/pgaas/bin/isrw index 817030d..d9e925e 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/isrw +++ b/pgaas/src/stage/opt/app/pgaas/bin/isrw @@ -13,14 +13,16 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi -export PATH=$PATH:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin:$PATH +export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin:$PATH if [ -f /var/run/postgresql/inmaintenance ] then diff --git a/pgaas/src/stage/opt/app/pgaas/bin/list_masters b/pgaas/src/stage/opt/app/pgaas/bin/list_masters index 9e22cd1..33ed79f 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/list_masters +++ b/pgaas/src/stage/opt/app/pgaas/bin/list_masters @@ -19,7 +19,11 @@ CDF=/opt/app/cdf if [ -d /opt/app/postgresql-9.5.2 ] then PGDIR=/opt/app/postgresql-9.5.2 -else PGDIR=/usr/lib/postgresql/9.5 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi if [ -d /opt/app/postgresql-config-9.5.2/ ] then CFGDIR=/opt/app/postgresql-config-9.5.2/ diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote index b7d011c..c976afa 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote +++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote @@ -13,11 +13,15 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi +export PATH=$PATH:$PGDIR/bin + pg_ctl promote -D /dbroot/pgdata/main/ diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart index db00739..e1ad0eb 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart +++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart @@ -13,13 +13,17 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi +export PATH=$PATH:$PGDIR/bin + if [ -f /opt/app/postgresql-config/main/postgresql.conf ] then CONF=/opt/app/postgresql-config/main/postgresql.conf elif [ -f /opt/app/postgresql-config-9.5.2/main/postgresql.conf ] diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start index 8cb831c..d8841c8 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start +++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start @@ -13,13 +13,17 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi +export PATH=$PATH:$PGDIR/bin + if [ -f /opt/app/postgresql-config/main/postgresql.conf ] then CONF=/opt/app/postgresql-config/main/postgresql.conf elif [ -f /opt/app/postgresql-config-9.5.2/main/postgresql.conf ] diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status index 416a00e..3383835 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status +++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status @@ -13,11 +13,15 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi +export PATH=$PATH:$PGDIR/bin + pg_ctl status -D /dbroot/pgdata/main/ diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop index 0d9a23c..4f255a8 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop +++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop @@ -13,11 +13,15 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi +export PATH=$PATH:$PGDIR/bin + pg_ctl stop -D /dbroot/pgdata/main/ diff --git a/pgaas/src/stage/opt/app/pgaas/bin/repmgrc b/pgaas/src/stage/opt/app/pgaas/bin/repmgrc index 57240cf..7b1b586 100644 --- a/pgaas/src/stage/opt/app/pgaas/bin/repmgrc +++ b/pgaas/src/stage/opt/app/pgaas/bin/repmgrc @@ -12,13 +12,17 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi +export PATH=$PATH:$PGDIR/bin + if [ -f /opt/app/postgresql-config/main/repmgr.conf ] then CONF=/opt/app/postgresql-config/main/repmgr.conf elif [ -f /opt/app/postgresql-config-9.5.2/main/repmgr.conf ] diff --git a/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc b/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc index cfbaa22..4faed6b 100644 --- a/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc +++ b/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc @@ -12,13 +12,17 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi +export PATH=$PATH:$PGDIR/bin + if [ -f /opt/app/postgresql-config/main/repmgr.conf ] then CONF=/opt/app/postgresql-config/main/repmgr.conf elif [ -f /opt/app/postgresql-config-9.5.2/main/repmgr.conf ] diff --git a/pgaas/src/stage/opt/app/pgaas/bin/runpsql b/pgaas/src/stage/opt/app/pgaas/bin/runpsql index be7f705..fcb1196 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/runpsql +++ b/pgaas/src/stage/opt/app/pgaas/bin/runpsql @@ -13,14 +13,16 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi -export PATH=$PATH:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin +export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin [ -z "$PGUSER" ] && PGUSER=postgres [ -z "$PGHOST" ] && PGHOST=`hostname -f` diff --git a/pgaas/src/stage/opt/app/pgaas/bin/runpsqll b/pgaas/src/stage/opt/app/pgaas/bin/runpsqll index 749ae5d..864fbf8 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/runpsqll +++ b/pgaas/src/stage/opt/app/pgaas/bin/runpsqll @@ -13,14 +13,16 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi -export PATH=$PATH:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin +export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin [ -z "$PGUSER" ] && PGUSER=postgres [ -z "$PGHOST" ] && PGHOST=`hostname -f` diff --git a/pgaas/src/stage/opt/app/pgaas/bin/startpsql b/pgaas/src/stage/opt/app/pgaas/bin/startpsql index 5368fc8..9e5c5b4 100644 --- a/pgaas/src/stage/opt/app/pgaas/bin/startpsql +++ b/pgaas/src/stage/opt/app/pgaas/bin/startpsql @@ -13,14 +13,16 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi -export PATH=$PATH:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin +export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin [ -z "$PGUSER" ] && PGUSER=postgres [ -z "$PGHOST" ] && PGHOST=`hostname -f` diff --git a/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw b/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw index 082c094..7b51b30 100755 --- a/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw +++ b/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw @@ -13,14 +13,16 @@ # permissions and limitations under the License. -if [ -d /usr/lib/postgresql/9.5/bin ] -then PATH=$PATH:/usr/lib/postgresql/9.5/bin -elif [ -d /opt/app/postgresql-9.5.2/bin ] -then PATH=$PATH:/opt/app/postgresql-9.5.2/bin -else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1 +if [ -d /opt/app/postgresql-9.5.2 ] +then PGDIR=/opt/app/postgresql-9.5.2 +elif [ -d /usr/lib/postgresql/9.6 ] +then PGDIR=/usr/lib/postgresql/9.6 +elif [ -d /usr/lib/postgresql/9.5 ] +then PGDIR=/usr/lib/postgresql/9.5 +else echo PostgreSQL bin directory not found 1>&2; exit 1 fi -export PATH=$PATH:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin +export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin for i in 1 2 3 4 5 6 do |