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
ceph: auto grow OSDs size on PVCs #8078
Conversation
0a12d91
to
b61fb7c
Compare
For ex: If you need to increase the size of OSD by 30% | ||
```console | ||
Enter the growth rate percentage of OSD: | ||
30 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the script take dynamic input instead of just using flags or arguments which allows someone to use it in an automatic situation? This means that Prometheus won't be able to take actions automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script takes the input only for the first time when we start it(to know the growth percentage or count ), and after it automatically triggers actions based on the Prometheus alert, in a time interval of 5 mins.
.\increase-size-of-osd.sh size | ||
``` | ||
|
||
After running the script it will ask for the `growth rate percentage`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of prompting for the arguments after starting the script, we should read the arguments to the script. For example:
./increase-size-of-osd.sh count --max 12 --growth-rate 3
OR
./increase-size-of-osd.sh size --max 2Ti --growth-rate 10%
tests/scripts/auto-grow-storage.sh
Outdated
i=0 | ||
alertmanagerroute=$(oc get route -n openshift-monitoring | grep alertmanager-main | awk '{ print $2 }') | ||
curl -sk -H "Authorization: Bearer $(oc sa get-token prometheus-k8s -n openshift-monitoring)" https://${alertmanagerroute}/api/v1/alerts | jq -r '.' >./tt.txt | ||
export total_alerts=$(cat ./tt.txt | jq '.data | length') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export total_alerts=$(cat ./tt.txt | jq '.data | length') | |
export total_alerts=$(jq '.data | length' < tt.txt ) |
cat
's sole purpose is to concatenate files :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
6793874
to
a4ef97c
Compare
0253088
to
ed1c35a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few doc suggestions...
60b4670
to
a195977
Compare
6653a9e
to
c2f3613
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When an OSD reaches OSD_NEARFULL state, we have to manually increase the PVC volume claim or manually increase the count of OSDs in the device set Added a script auto-grow-storage.sh which will i)automatically increase claim volume ii)automatically add number of OSDs Closes: rook#6101 Signed-off-by: parth-gr <paarora@redhat.com>
ceph: auto grow OSDs size on PVCs (backport #8078)
When an OSDs reach OSD_NEARFULL state, we have to manually either increase the volume claim for provisioning more storage or add more OSDs to the cluster to keep the cluster Healthy.
If you need to automatically increase the provisioned volume(scale OSDs vertically).
Added a script auto-grow-storage.sh which will automatically increase claim volume, depending on the percent growth rate mentioned.
If you need to automatically increase the number of OSDs(scale OSDs Horizontally).
Added a script auto-grow-storage.sh which will automatically increase the OSDs of a device set, depending on the Count you mentioned.
Closes: #6101
Signed-off-by: parth-gr paarora@redhat.com
Tested on different scenarios:
For scaling vertically:
i) When the increment size of PVC becomes more than the max size.
ii) When max Size is labeled with the different units (Mi,Gi,Ti).
For scaling Horizontally:
i) when the increment count becomes more than the disk limit.
Description of your changes:
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
make codegen
) has been run to update object specifications, if necessary.