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
1=== modified file 'packages/rpm/openvista-utils.spec'
2--- packages/rpm/openvista-utils.spec 2009-07-17 08:17:11 +0000
3+++ packages/rpm/openvista-utils.spec 2009-07-18 09:28:22 +0000
4@@ -1,6 +1,6 @@
5 Name: openvista-utils
6 Version: 0.8.4
7-Release: 1
8+Release: 2
9 Summary: Utilities for configuring and managing OpenVista
10 License: AGPL
11 Vendor: Medsphere Systems Corporation
12@@ -157,11 +157,14 @@
13 %attr(4550,root,openvista) /sbin/ovauth
14
15 %pre
16-/usr/sbin/useradd -G gtm openvista 2> /dev/null || :
17+/usr/sbin/groupadd openvista 2> /dev/null || :
18+/usr/sbin/useradd -g openvista -G gtm openvista 2> /dev/null || :
19
20 # update lock space in existing databases if upgrading
21 %triggerun -- openvista-utils <= 0.8.3-2
22+echo "Increasing lock space of existing databases to 400 pages..."
23 for instance in /opt/openvista/*; do
24+ # update global directory
25 if [ -L ${instance}/gtm ]; then
26 gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld gtmroutines=${instance}/gtm ${instance}/gtm/mumps -run ^GDE > /dev/null 2>&1 <<EOF
27 CHANGE -SEGMENT DEFAULT -LOCK_SPACE=400
28@@ -169,8 +172,19 @@
29 TEMPLATE -SEGMENT -LOCK_SPACE=400
30 EXIT
31 EOF
32- gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 DEFAULT
33- gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 SCRATCH
34+
35+ # update actual database files
36+ gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 '*' 2>&1 \
37+ | logger -p user.info
38+ retval=${PIPESTATUS[0]}
39+ if [ ${retval} -eq 0 ]; then
40+ echo "`basename ${instance}` database's lock space increased to 400 pages"
41+ elif [ ${retval} -eq 162 ]; then
42+ echo ""
43+ 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:"
44+ echo "gtm_dist=${instance}/gtm gtmgbldir=${instance}/globals/mumps.gld ${instance}/gtm/mupip set -region -lock_space=400 '*'"
45+ echo ""
46+ fi
47 fi
48 done
49

Subscribers

People subscribed via source and target branches