From f7da1969cc92f6892ef9d58c572140b36da8a338 Mon Sep 17 00:00:00 2001 From: Preston Doster Date: Fri, 2 Jun 2023 10:36:04 -0500 Subject: [PATCH 1/5] Basic support for Amazon Linux 2023 --- run-command/blackhole-stress.yml | 4 +++- run-command/cpu-stress.yml | 4 +++- run-command/diskspace-stress.yml | 6 ++++-- run-command/io-stress.yml | 4 +++- run-command/latency-stress-sources.yml | 8 +++++--- run-command/latency-stress.yml | 4 +++- run-command/memory-stress.yml | 4 +++- run-command/network-loss-stress-sources.yml | 4 +++- run-command/network-loss-stress.yml | 4 +++- 9 files changed, 30 insertions(+), 12 deletions(-) diff --git a/run-command/blackhole-stress.yml b/run-command/blackhole-stress.yml index 8bd167e..b4c7555 100644 --- a/run-command/blackhole-stress.yml +++ b/run-command/blackhole-stress.yml @@ -74,7 +74,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install iptables at + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then yum -y install iptables at else echo "There was a problem installing dependencies." diff --git a/run-command/cpu-stress.yml b/run-command/cpu-stress.yml index 865233f..39bcc71 100644 --- a/run-command/cpu-stress.yml +++ b/run-command/cpu-stress.yml @@ -65,7 +65,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install stress-ng + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then # Use amazon-linux-extras if available (Amazon Linux 2). Don't need it otherwise (Amazon Linux 1) which amazon-linux-extras 2>/dev/null 1>&2 && sudo amazon-linux-extras install testing sudo yum -y install stress-ng diff --git a/run-command/diskspace-stress.yml b/run-command/diskspace-stress.yml index 99fb135..2f4ecb5 100644 --- a/run-command/diskspace-stress.yml +++ b/run-command/diskspace-stress.yml @@ -65,7 +65,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install stress-ng + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then # Use amazon-linux-extras if available (Amazon Linux 2). Don't need it otherwise (Amazon Linux 1) which amazon-linux-extras 2>/dev/null 1>&2 && sudo amazon-linux-extras install testing sudo yum -y install stress-ng @@ -104,4 +106,4 @@ mainSteps: pgrep stress-ng && echo Another stress-ng command is running, exiting... && exit 1 echo Initiating Disk stress for {{ DurationSeconds }} seconds... stress-ng --fallocate {{ Workers }} --fallocate-bytes {{ Filesize }}g -t {{ DurationSeconds }}s - echo Finished Disk stress. \ No newline at end of file + echo Finished Disk stress. diff --git a/run-command/io-stress.yml b/run-command/io-stress.yml index 8884fe0..7ce5b62 100644 --- a/run-command/io-stress.yml +++ b/run-command/io-stress.yml @@ -65,7 +65,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install stress-ng + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then # Use amazon-linux-extras if available (Amazon Linux 2). Don't need it otherwise (Amazon Linux 1) which amazon-linux-extras 2>/dev/null 1>&2 && sudo amazon-linux-extras install testing sudo yum -y install stress-ng diff --git a/run-command/latency-stress-sources.yml b/run-command/latency-stress-sources.yml index 1783d34..46dc299 100644 --- a/run-command/latency-stress-sources.yml +++ b/run-command/latency-stress-sources.yml @@ -88,12 +88,14 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install iproute-tc jq at + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc jq at else echo "There was a problem installing dependencies." - exit 1 + #exit 1 fi elif cat /etc/issue | grep -i Ubuntu ; then sudo apt-get update -y @@ -104,7 +106,7 @@ mainSteps: fi else echo "Dependencies are not installed - Please set InstallDependencies to True." - exit 1 + #exit 1 fi - action: aws:runShellScript name: FaultInjection diff --git a/run-command/latency-stress.yml b/run-command/latency-stress.yml index a806c5c..d752537 100644 --- a/run-command/latency-stress.yml +++ b/run-command/latency-stress.yml @@ -66,7 +66,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install iproute-tc jq at + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc at else diff --git a/run-command/memory-stress.yml b/run-command/memory-stress.yml index 55b3314..4bf5b97 100644 --- a/run-command/memory-stress.yml +++ b/run-command/memory-stress.yml @@ -64,7 +64,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install stress-ng + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then # Use amazon-linux-extras if available (Amazon Linux 2). Don't need it otherwise (Amazon Linux 1) which amazon-linux-extras 2>/dev/null 1>&2 && sudo amazon-linux-extras install testing sudo yum -y install stress-ng diff --git a/run-command/network-loss-stress-sources.yml b/run-command/network-loss-stress-sources.yml index 0dc69d8..47dde20 100644 --- a/run-command/network-loss-stress-sources.yml +++ b/run-command/network-loss-stress-sources.yml @@ -82,7 +82,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install iproute-tc jq a + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc jq at else diff --git a/run-command/network-loss-stress.yml b/run-command/network-loss-stress.yml index b6929b4..037af3d 100644 --- a/run-command/network-loss-stress.yml +++ b/run-command/network-loss-stress.yml @@ -66,7 +66,9 @@ mainSteps: if [[ "{{ InstallDependencies }}" == True ]] ; then echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then - if cat /etc/system-release | grep -i 'Amazon Linux' ; then + if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then + sudo dnf -y install iproute-tc at + elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc at else From a94d4f7c0883d51d6b0ca182ec980697ec97aeaf Mon Sep 17 00:00:00 2001 From: Preston Doster Date: Fri, 2 Jun 2023 10:38:35 -0500 Subject: [PATCH 2/5] remove comment on exit --- run-command/latency-stress-sources.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-command/latency-stress-sources.yml b/run-command/latency-stress-sources.yml index 46dc299..6b07a4c 100644 --- a/run-command/latency-stress-sources.yml +++ b/run-command/latency-stress-sources.yml @@ -106,7 +106,7 @@ mainSteps: fi else echo "Dependencies are not installed - Please set InstallDependencies to True." - #exit 1 + exit 1 fi - action: aws:runShellScript name: FaultInjection From 59bd4512cb33bebdce656e11a4d2cc0be27de536 Mon Sep 17 00:00:00 2001 From: Preston Doster Date: Fri, 2 Jun 2023 10:40:06 -0500 Subject: [PATCH 3/5] removing one more exit comment --- run-command/latency-stress-sources.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-command/latency-stress-sources.yml b/run-command/latency-stress-sources.yml index 6b07a4c..ee9487a 100644 --- a/run-command/latency-stress-sources.yml +++ b/run-command/latency-stress-sources.yml @@ -95,7 +95,7 @@ mainSteps: sudo yum -y install tc jq at else echo "There was a problem installing dependencies." - #exit 1 + exit 1 fi elif cat /etc/issue | grep -i Ubuntu ; then sudo apt-get update -y From fc28eb1fdca57309acc010de4ba0edf7fc8ad3f4 Mon Sep 17 00:00:00 2001 From: Raphael Zamora Date: Tue, 13 Jun 2023 17:30:08 -0400 Subject: [PATCH 4/5] install bind-utils pkg for 'dig' --- run-command/latency-stress.yml | 1 + run-command/network-loss-stress-sources.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/run-command/latency-stress.yml b/run-command/latency-stress.yml index d752537..808d7d9 100644 --- a/run-command/latency-stress.yml +++ b/run-command/latency-stress.yml @@ -68,6 +68,7 @@ mainSteps: if [ -f "/etc/system-release" ] ; then if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then sudo dnf -y install iproute-tc jq at + sudo dnf -y install bind-utils elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc at diff --git a/run-command/network-loss-stress-sources.yml b/run-command/network-loss-stress-sources.yml index 47dde20..bdd7be2 100644 --- a/run-command/network-loss-stress-sources.yml +++ b/run-command/network-loss-stress-sources.yml @@ -84,6 +84,7 @@ mainSteps: if [ -f "/etc/system-release" ] ; then if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then sudo dnf -y install iproute-tc jq a + sudo dnf -y install bind-utils elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc jq at From dc3d3909b7ecf3eb491a525e7f67700174a3577b Mon Sep 17 00:00:00 2001 From: Raphael Zamora Date: Fri, 23 Jun 2023 13:24:33 -0400 Subject: [PATCH 5/5] install bind-utils pkg for 'dig' again --- run-command/latency-stress-sources.yml | 1 + run-command/network-loss-stress.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/run-command/latency-stress-sources.yml b/run-command/latency-stress-sources.yml index ee9487a..ab6a1a4 100644 --- a/run-command/latency-stress-sources.yml +++ b/run-command/latency-stress-sources.yml @@ -90,6 +90,7 @@ mainSteps: if [ -f "/etc/system-release" ] ; then if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then sudo dnf -y install iproute-tc jq at + sudo dnf -y install bind-utils elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc jq at diff --git a/run-command/network-loss-stress.yml b/run-command/network-loss-stress.yml index 037af3d..f6abc50 100644 --- a/run-command/network-loss-stress.yml +++ b/run-command/network-loss-stress.yml @@ -67,7 +67,8 @@ mainSteps: echo "Installing required dependencies" if [ -f "/etc/system-release" ] ; then if cat /etc/system-release | grep -i 'Amazon Linux release 2023' ; then - sudo dnf -y install iproute-tc at + sudo dnf -y install iproute-tc at + sudo dnf -y install bind-utils elif cat /etc/system-release | grep -i 'Amazon Linux' ; then sudo amazon-linux-extras install testing sudo yum -y install tc at