The default multinicb_postchange trigger in VCS 6.x release fails due to scripting error
book
Article ID: 100032601
calendar_today
Updated On:
Description
Error Message
Error logged in engine_A.log
2016/05/04 20:46:17 VCS INFO V-16-6-15003 (c3dwh1p1) hatrigger:Failed to execute /opt/VRTSvcs/bin/triggers//multinicb_postchange ipmp_group ce3 0 1 0
2016/05/04 20:46:17 VCS INFO V-16-6-15003 (c3dwh1p1) hatrigger:Failed to execute /opt/VRTSvcs/bin/triggers//multinicb_postchange ipmp_group ce0 0 1 0
Manually executing the trigger gives below error
# /opt/VRTSvcs/bin/triggers/multinicb_postchange ipmp_group e1000g2 0 1 0
Can't use string ("LOCK_FILE") as a symbol ref while "strict refs" in use at /opt/VRTSvcs/bin/triggers//multinicb_postchange line 65.
Cause
The multinicb_postchange fails due to scripting error.
Resolution
WORKAROUND:Updated the trigger script as below to use GLOB to pass the FILEHANDLE
Below are the differences between the incorrect script (multinicb_postchange) and the new modified script (multinicb_postchange.upd1).
-----------------------------------------------------------------------
# diff multinicb_postchange multinicb_postchange.upd1
65c65,66
< open($_[0], ">".$_[1]);
---
> *FILEHANDLE=$_[0];
> open(FILEHANDLE, ">".$_[1]);
72c73,74
< close($_[0]);
---
> *FILEHANDLE=$_[0];
> close(FILEHANDLE);
135c137
< AcquireLock("LOCK_FILE", $lock_file);
---
> AcquireLock(*LOCK_FILE, $lock_file);
155c157
< ReleaseLock("LOCK_FILE");
---
> ReleaseLock(*LOCK_FILE);
-----------------------------------------------------------------------------
After incorporating above changes the trigger works successfully.
# /opt/VRTSvcs/bin/triggers/multinicb_postchange ipmp_group e1000g2 0 1 0
#
VERITAS engineering will fix the trigger script issue in future release.
Issue/Introduction
The default multinicb_postchange trigger provided in VCS 6.x release fails due to scripting error.
The default scripts are in /opt/VRTSvcs/bin/sample_triggers. To use them the scripts needs to be copied to /opt/VRTSvcs/bin/triggers directory.
Was this article helpful?
thumb_up
Yes
thumb_down
No