Skip to content

Commit

Permalink
Vs/update pg ident (#8743)
Browse files Browse the repository at this point in the history
* update pg ident

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* update pg ident

Signed-off-by: Vivek Shankar <vshankar@progress.com>

---------

Signed-off-by: Vivek Shankar <vshankar@progress.com>
  • Loading branch information
vivekshankar1 authored Jan 17, 2025
1 parent 6999cb4 commit b90a766
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion components/automate-backend-deployment/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ do_build() {
bundle install --path vendor/bundle
}


do_install() {
$(pkg_path_for core/bash)/bin/bash $PLAN_CONTEXT/../../../scripts/cert.sh
mkdir -p $pkg_prefix/workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export HAB_NONINTERACTIVE=true
export HAB_NOCOLORING=true
export HAB_LICENSE=accept-no-persist

PG_ORIGIN_NAME=$(echo "vivek-shankar/automate-ha-postgresql" | awk -F/ '{print $1}')
PG_ORIGIN_NAME=$(echo "${postgresql_pkg_ident}" | awk -F/ '{print $1}')
export PG_ORIGIN_NAME
PG_PKG_NAME=$(echo "vivek-shankar/automate-ha-postgresql" | awk -F/ '{print $2}')
PG_PKG_NAME=$(echo "${postgresql_pkg_ident}" | awk -F/ '{print $2}')
export PG_PKG_NAME

PGLEADERCHK_ORIGIN_NAME=$(echo "${pgleaderchk_pkg_ident}" | awk -F/ '{print $1}')
Expand Down Expand Up @@ -55,14 +55,14 @@ wait_for_aib_extraction
export LOGCMD='>>${tmp_path}/svc-load.log 2>&1'

if [ -e /hab/sup/default/specs/"$PG_PKG_NAME".spec ]; then
if ! grep -q "ident *= *\"vivek-shankar/automate-ha-postgresql\"" /hab/sup/default/specs/"$PG_PKG_NAME".spec; then
if ! grep -q "ident *= *\"${postgresql_pkg_ident}\"" /hab/sup/default/specs/"$PG_PKG_NAME".spec; then
# unload the old pkg_ident and then load in the new
hab svc unload "$PG_ORIGIN_NAME/$PG_PKG_NAME"
sleep 10
bash -c 'eval hab svc load vivek-shankar/automate-ha-postgresql ${postgresql_svc_load_args} "$LOGCMD"'
bash -c 'eval hab svc load ${postgresql_pkg_ident} ${postgresql_svc_load_args} "$LOGCMD"'
fi
else
bash -c 'eval hab svc load vivek-shankar/automate-ha-postgresql ${postgresql_svc_load_args} "$LOGCMD"'
bash -c 'eval hab svc load ${postgresql_pkg_ident} ${postgresql_svc_load_args} "$LOGCMD"'
fi

if [ -e /hab/sup/default/specs/"$PGLEADERCHK_PKG_NAME".spec ]; then
Expand Down

0 comments on commit b90a766

Please sign in to comment.