set_gtm_env appends duplicate entries to $PATH
Bug #519404 reported by
Jon Tai
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenVista/GT.M Integration |
Fix Released
|
High
|
Unassigned |
Bug Description
We currently just blindly append the instance's GT.M directory to the $PATH. This is sloppy at best, but because we're appending to the end, it could be wrong in some cases, e.g., when another instance's GT.M directory is already in the $PATH.
We should strip out existing GT.M directories from the $PATH before appending ours.
Related branches
lp:~jontai/openvista-gtm-integration/bug519404
- jeff.apple: Approve
-
Diff: 13 lines (+3/-0)1 file modifiedscripts/usr/lib/openvista/functions (+3/-0)
Changed in openvista-gtm-integration: | |
milestone: | none → 0.8.8 |
importance: | Undecided → High |
Changed in openvista-gtm-integration: | |
status: | New → Fix Committed |
Changed in openvista-gtm-integration: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Here's a specific failure scenario for this bug. Let's say you have two OpenVista instances, A and B. A was created with GT.M V5.3-004A, but B was created with GT.M V.4-000. Both have running processes (TaskMan, RPC broker etc.). During the nightly backup, the /etc/cron. daily/openvista calls set_gtm_env and appends the /opt/openvista/ A/gtm to the $PATH, then runs ovbackup to back up A. ovbackup appends /opt/openvista/ A/gtm to the $PATH again before calling mupip. Since the two entries are the same, it's not a problem (although it's redundant).
Once A is backed up, /etc/cron. daily/openvista calls ovbackup to back up B. ovbackup appends /opt/openvista/ B/gtm to the $PATH before calling mupip, but /opt/openvista/ A/gtm comes first in the $PATH, so the mupip from GT.M V5.3-004A is used instead of the mupip from GT.M V5.4-000. The backup fails with a %GTM-E-VERMISMATCH error.