Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Update README.md and fix typo (#8)
Browse files Browse the repository at this point in the history
resolve #6 

* Add ec2:CreateTags to README.md
* Update logging

Co-authored-by: Ryan Golhar <ryan.golhar@bms.com>
  • Loading branch information
golharam and golharam authored Apr 29, 2020
1 parent b903d44 commit c733169
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ In the above, we assume that the `MyInstanceProfileWithProperPermissions` EC2 In
"ec2:ModifyInstanceAttribute",
"ec2:DescribeVolumeAttribute",
"ec2:CreateVolume",
"ec2:DeleteVolume"
"ec2:DeleteVolume",
"ec2:CreateTags"
],
"Resource": "*"
}
Expand Down
5 changes: 3 additions & 2 deletions bin/ebs-autoscale
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ add_space () {

exit_status=$?
if [ $exit_status -eq 0 ]; then
logthis "Adding device ${DEVICE} to logical volume ${MOUNTPOINT}"
if [ "${FILE_SYSTEM}" = "btrfs" ]; then
logthis "Adding device ${DEVICE} to logical volume ${MOUNTPOINT}"
btrfs device add ${DEVICE} ${MOUNTPOINT}
btrfs balance start -m ${MOUNTPOINT}
else
logthis "Adding device ${DEVICE} to logical volume /dev/mapper/${LVM_VG}-${LVM_LV}"
vgextend ${LVM_VG} ${DEVICE}
lvresize -l 100%VG /dev/mapper/${LVM_VG}-${LVM_LV}
resize2fs /dev/mapper/${LVM_VG}-${LVM_LV}
Expand Down Expand Up @@ -169,7 +170,7 @@ while true; do
LOG_COUNT=LOG_INTERVAL
fi
if [ "${LOG_COUNT}" -ge "${LOG_INTERVAL}" ]; then
logthis "Devices ${NUM_DEVICES} : Size ${TOTAL_SIZE} : Used ${USED} : Aailable ${AVAILABLE} : Used% ${PCT_UTILIZATION}% : Threshold ${THRESHOLD}%"
logthis "Devices ${NUM_DEVICES} : Size ${TOTAL_SIZE} : Used ${USED} : Available ${AVAILABLE} : Used% ${PCT_UTILIZATION}% : Threshold ${THRESHOLD}%"
LOG_COUNT=0
fi
THRESHOLD=$(calc_threshold)
Expand Down
2 changes: 1 addition & 1 deletion config/ebs-autoscale.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"log_file": "/var/log/ebs-autoscale.log",
"log_interval": 300
}
}
}

0 comments on commit c733169

Please sign in to comment.