Appdynamics / HA-toolkit

AppDynamics Controller High Availability Toolkit
https://docs.appdynamics.com/display/PRO42/Using+the+High+Availability+(HA)+Toolkit
Apache License 2.0
13 stars 11 forks source link

replicate.sh fragility in checking that init scripts are properly installed #96

Open scosol opened 6 years ago

scosol commented 6 years ago

replicate.sh does a check (via md5) to see if the scripts installed in /etc/init,d match the ones in the HA directory

do 
        NEWMD5=$(md5sum $APPD_ROOT/HA/$s.sh | cut -d " " -f 1)
        if [[ "$NEWMD5" != `$ssh $host md5sum /etc/init.d/$s|cut -d " " -f 1` ]] ; then
            ((errors++))
        fi
    done

When using custom init scripts (not using install-init.sh) this check fails. The fix is to copy the custom /etc/init.d scripts to the HA directory with their proper names

*NOTE this kind of functionality may be resolved through use of "install-init.sh" with the "-u" option, but the sequence and proper steps are not clear from looking at that code.

scosol commented 6 years ago

Further, when the "fix" was performed on the Primary but not the Secondary, the replicate -f failed non-destructively but the check logic failed to catch the problem on the Secondary. .... Performing the same "fix" on the Secondary allowed the replicate -f to complete.

rnav1234 commented 5 years ago

Yes this is expected and your work-around was likely the best way to deal with that issue. Note that v3.50 includes an update to also check /etc/{sysconfig,default}/app* for currency - previously ignored.