DescriptionAshmitha Ambastha
2019-05-03 11:49:31 UTC
Description of problem:
Before performing an upgrade, the upgrade playbook must check whether the bricks are 90% full or not.
Upgrade playbook must ensure that the bricks are not more than 90% full using the following command:
# df -kh | grep -v ^Filesystem | awk '{if($5>"90%") print $0}'
If the bricks are more than 90% full, the upgrade must not be performed and the upgrade playbook should fail with appropriate errors.
Version-Release number of selected component (if applicable): OCS 3.11 and openshift-ansible 3.11.110 and above.
How reproducible: always.
Steps to Reproduce:
1. Deploy a cluster to be upgraded.
2. Run IOs on the cluster before performing an upgrade using the upgrade playbook.
3. Run the upgrade playbook,
# ansible-playbook -i <inv_file> /usr/share/ansible/openshift-ansible/playbooks/openshift-glusterfs/upgrade.yml
4. the playbook should check and ensure that the bricks are not more than 90% full before performing an upgrade to the cluster.
Actual results: The upgrade playbook does not check the brick capacity before performing an upgrade and if the bricks are more than 90% full, the upgrade playbook does not fail.
Expected results: The upgrade playbook should check the brick capacity before performing an upgrade and if the bricks are more than 90% full, the upgrade playbook must fail.
Talur, is the command listed in comment #1 sufficient for this purpose?
Comment 4Raghavendra Talur
2019-05-04 14:01:24 UTC
I modified the command a little to only check heketi devices. Also, as mentioned in the offline chat, we don't need to be as conservative and have bumped the number to 96 percent.
df -kh | grep -v ^Filesystem | grep "/var/lib/heketi" | awk '{if($5>"96%") print $0}'