-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Utkarsh Srivastava <[email protected]>
- Loading branch information
1 parent
2212055
commit 4421cb5
Showing
2 changed files
with
1 addition
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,41 +75,6 @@ if [ "${state}" == "active" ]; then | |
service rsyslog restart | ||
fi | ||
|
||
if [ $1 -gt 1 ]; then | ||
UPGRADE_SCRIPTS_DIR=/root/node_modules/noobaa-core/src/upgrade/upgrade_scripts | ||
NSFS_UPGRADE_SCRIPTS_DIR=/root/node_modules/noobaa-core/src/upgrade/nsfs_upgrade_scripts | ||
|
||
NOOBAA_RPM_BASE_PATH="$RPM_BUILD_ROOT/usr/local/noobaa-core" | ||
pushd $NOOBAA_RPM_BASE_PATH | ||
|
||
echo "Checking deployment type" | ||
echo "Looking for NSFS deployment" | ||
pgrep -f "cmd/nsfs" > /dev/null | ||
rc=$? | ||
if [ "${rc}" -eq 0 ]; then | ||
echo "Found NSFS deployment" | ||
/usr/local/noobaa-core/bin/node src/upgrade/upgrade_manager.js --nsfs true --upgrade_scripts_dir ${NSFS_UPGRADE_SCRIPTS_DIR} | ||
rccmd=$? | ||
else | ||
echo "Looking for non-NSFS deployment" | ||
pgrep -f "server/web_server" > /dev/null | ||
rc=$? | ||
if [ "${rc}" -eq 0 ]; then | ||
echo "Found non-NSFS deployment" | ||
/usr/local/noobaa-core/bin/node src/upgrade/upgrade_manager.js --upgrade_scripts_dir ${UPGRADE_SCRIPTS_DIR} | ||
rccmd=$? | ||
else | ||
echo "No deployments found, skipping upgrade" | ||
exit 0 | ||
fi | ||
fi | ||
|
||
if [ ${rccmd} -ne 0 ]; then | ||
echo "upgrade_manager failed with exit code ${rccmd}" | ||
exit ${rccmd} | ||
fi | ||
fi | ||
|
||
%changelog | ||
* %{releasedate} NooBaa Team <[email protected]> | ||
%{changelogdata} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters