How to modify VCS HostMonitor AgentClass / ScriptClass to a different Scheduler (FSS,TS)
book
Article ID: 100015911
calendar_today
Updated On:
Cause
To summarise, there no way to persistently change the HostMonitor class as in the above example. However, the HostMonitor agent can be changed at runtime and changes will be there for the lifetime of VCS. Once restarted, changes will be lost.
Resolution
The sysup trigger within VCS, if enabled, provides an opportunity to update the HostMonitor type. The trigger will be invoked when the first node in the cluster goes up. The sample sysup trigger is shipped in the /opt/VRTSvcs/bin/sample_triggers/VRTSvcs/ directory. Update it and move it to the /opt/VRTSvcs/bin/triggers/ directory.
The example below demonstrates this:
# cd /opt/VRTSvcs/bin/sample_triggers/VRTSvcs
# cp -p sysup ../../triggers/
# cd ../../triggers/
# vi sysup
----
# put your code here...
VCSAG_LOG_MSG ("W", "Updating HostMonitor Agent !", 15028);
system("/opt/VRTSvcs/bin/haconf -makerw");
system("/opt/VRTSvcs/bin/hatype -modify HostMonitor AgentClass FSS");
system("/opt/VRTSvcs/bin/haconf -dump -makero");
----
# hatype -value HostMonitor AgentClass
TS
# hastop –all
# hastart
Confirm the trigger doesn't error:
# view /var/VRTSvcs/log/engine_A.log
----
2015/07/14 02:43:16 VCS WARNING V-16-6-15028 (sprnt20002c-13) sysup:Updating HostMonitor Agent !
2015/07/14 02:43:16 VCS INFO V-16-1-50135 User root fired command: haconf -makerw from localhost
2015/07/14 02:43:16 VCS INFO V-16-1-50135 User root fired command: hatype -modify HostMonitor AgentClass FSS from localhost
2015/07/14 02:43:16 VCS INFO V-16-1-50135 User root fired command: haconf -dump-makero from localhost
2015/07/14 02:43:16 VCS INFO V-16-6-15002 (sprnt20002c-13) hatrigger:hatrigger executed /opt/VRTSvcs/bin/triggers/sysup sprnt20002c-13 RUNNING successfully
----
# hatype -value HostMonitor AgentClass
FSS
Issue/Introduction
An attempt was made to persistently change the HostMonitor agent:
# hatype -display HostMonitor | grep AgentClass
HostMonitor AgentClass TS
# haconf -makerw
# hatype -modify HostMonitor AgentClass FSS
# haconf –dump –makero
# hatype -display HostMonitor | grep AgentClass
HostMonitor AgentClass FSS
However, once VCS had been restarted, the attribute change had been lost:
# hastop -all
# hastart
# hatype -display HostMonitor | grep AgentClass
HostMonitor AgentClass TS
Was this article helpful?
thumb_up
Yes
thumb_down
No