Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-message.sh add failover automation support #1

Closed
BradleyA opened this issue Mar 3, 2018 · 2 comments
Closed

create-message.sh add failover automation support #1

BradleyA opened this issue Mar 3, 2018 · 2 comments
Assignees
Labels
enhancement Increase or improve in quality, performance, business value, function, or user satisfaction.

Comments

@BradleyA
Copy link
Owner

BradleyA commented Mar 3, 2018

create-message.sh
Change the design to support running create-message.sh on any system in a cluster, not just the system in the cluster that has a scroll phat. Systems fail! To support an SRE environment of automation and failover

@BradleyA BradleyA added the enhancement Increase or improve in quality, performance, business value, function, or user satisfaction. label Mar 3, 2018
@BradleyA BradleyA self-assigned this Mar 3, 2018
@BradleyA
Copy link
Owner Author

BradleyA commented Mar 3, 2018

Need to think about incidents with this code that can be created and solved

#       Create missing host files from list in SYSTEM file
for NODE in $(cat ${DATA_DIR}${CLUSTER}/SYSTEMS) ; do
        touch ${DATA_DIR}${CLUSTER}/${NODE}
done
#
NODE_LIST=`find ${DATA_DIR}${CLUSTER} -type f ! -name SYSTEMS ! -name MESSAGE -print`
#       Check if ${NODE_LIST} is zero length
if [ -z "${NODE_LIST}" ] ; then
        echo -e "${NORMAL}${0} ${LINENO} [${BOLD}ERROR${NORMAL}]:      No file(s) found\n" 1>&2
        echo -e "\tCheck to make sure user has permission to create directory and files."
        exit 1
fi

@BradleyA
Copy link
Owner Author

BradleyA commented Mar 3, 2018

Need to:

  1. scp MESSAGE file to all remote hosts in cluster
  2. scp SYSTEMS file to all remote hosts in cluster

When a system fails which this script started on; it can restart on another system in the cluster and the MESSAGE and SYSTEMS file will be available. By copying the MESSAGE file to all systems in the cluster, any system which has a Scroll-pHAT can display the MESSAGE information. The information in MESSAGE file is sent to remote systems before it has been updated, incident #3. This means remote systems with Scroll-pHAT will display the previous MESSAGE information. Thus systems with Scroll-pHAT will display the previous MESSAGE information.

Later this script will be moved into a docker container which will handle the failover restart process ..., incident #4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Increase or improve in quality, performance, business value, function, or user satisfaction.
Projects
None yet
Development

No branches or pull requests

1 participant