Merge lp:~jontai/openvista-gtm-integration/bug400957 into lp:openvista-gtm-integration

Proposed by Jon Tai
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jontai/openvista-gtm-integration/bug400957
Merge into: lp:openvista-gtm-integration
Diff against target: None lines
To merge this branch: bzr merge lp:~jontai/openvista-gtm-integration/bug400957
Reviewer Review Type Date Requested Status
jeff.apple Approve
Review via email: mp+8986@code.launchpad.net
To post a comment you must log in.
Revision history for this message
jeff.apple (jeff-apple) wrote :

We check for a return status of 162 when updating the page lock size. Are there any other error codes that might be useful to catch? Maybe have a default there with a warning when other values are returned.

review: Approve
82. By Jon Tai

handle unknown errors

Revision history for this message
Jon Tai (jontai) wrote :

Added a default case to catch other status codes (not 0 and not 162). Merging...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'packages/rpm/openvista-utils.spec'
--- packages/rpm/openvista-utils.spec 2009-07-17 08:17:11 +0000
+++ packages/rpm/openvista-utils.spec 2009-07-18 09:28:22 +0000
@@ -1,6 +1,6 @@
1Name: openvista-utils1Name: openvista-utils
2Version: 0.8.42Version: 0.8.4
3Release: 13Release: 2
4Summary: Utilities for configuring and managing OpenVista4Summary: Utilities for configuring and managing OpenVista
5License: AGPL5License: AGPL
6Vendor: Medsphere Systems Corporation6Vendor: Medsphere Systems Corporation
@@ -157,11 +157,14 @@
157%attr(4550,root,openvista) /sbin/ovauth157%attr(4550,root,openvista) /sbin/ovauth
158158
159%pre159%pre
160/usr/sbin/useradd -G gtm openvista 2> /dev/null || :160/usr/sbin/groupadd openvista 2> /dev/null || :
161/usr/sbin/useradd -g openvista -G gtm openvista 2> /dev/null || :
161162
162# update lock space in existing databases if upgrading163# update lock space in existing databases if upgrading
163%triggerun -- openvista-utils <= 0.8.3-2164%triggerun -- openvista-utils <= 0.8.3-2
165echo "Increasing lock space of existing databases to 400 pages..."
164for instance in /opt/openvista/*; do166for instance in /opt/openvista/*; do
167 # update global directory
165 if [ -L ${instance}/gtm ]; then168 if [ -L ${instance}/gtm ]; then
166 gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld gtmroutines=${instance}/gtm ${instance}/gtm/mumps -run ^GDE > /dev/null 2>&1 <<EOF169 gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld gtmroutines=${instance}/gtm ${instance}/gtm/mumps -run ^GDE > /dev/null 2>&1 <<EOF
167CHANGE -SEGMENT DEFAULT -LOCK_SPACE=400170CHANGE -SEGMENT DEFAULT -LOCK_SPACE=400
@@ -169,8 +172,19 @@
169TEMPLATE -SEGMENT -LOCK_SPACE=400172TEMPLATE -SEGMENT -LOCK_SPACE=400
170EXIT173EXIT
171EOF174EOF
172 gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 DEFAULT175
173 gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 SCRATCH176 # update actual database files
177 gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 '*' 2>&1 \
178 | logger -p user.info
179 retval=${PIPESTATUS[0]}
180 if [ ${retval} -eq 0 ]; then
181 echo "`basename ${instance}` database's lock space increased to 400 pages"
182 elif [ ${retval} -eq 162 ]; then
183 echo ""
184 echo "Unable to increase `basename ${instance}` database's lock space to 400 pages; the database is currently in use. Stop all processes accessing the `basename ${instance}` database, then run:"
185 echo "gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 '*'"
186 echo ""
187 fi
174 fi188 fi
175done189done
176190

Subscribers

People subscribed via source and target branches