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

Open
#96 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
shell
Domain
devops

Research direction

Start with replicate.sh and trace its md5 check against /etc/init.d scripts and the corresponding files in the HA directory. Then read install-init.sh, especially the -u option, to clarify the intended sequence for custom init scripts; done means custom scripts are checked successfully without false failures.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Shell
Stars
13
Forks
11
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Appdynamics/HA-toolkit

All issues in Appdynamics/HA-toolkit

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.