Feature #4536

im/monitor_ds.sh to work only on valid directories

Added by Anton Todorov over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:06/09/2016
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Drivers - Monitor
Target version:-
Resolution:fixed Pull request:100

Description

Hi,

I've made small patch to check is when im/monitor_ds.sh is walking the datastores is it working on directory.

It is not critical. but I managed to create such situation so it is nice to have verification that we are working on directory.

https://github.com/OpenNebula/one/pull/100

     dir=$DATASTORE_LOCATION/$ds

+    test -d "$dir" || continue
+
     USED_MB=$(df -B1M -P $dir 2>/dev/null | tail -n 1 | awk '{print $3}')

Kind Regards,
Anton Todorov

ps. Just reviewed the text and I think there should be quotes on `dir` assignment like dir="$DATASTORE_LOCATION/$ds"

History

#1 Updated by Anton Todorov over 4 years ago

Hi,

As the pull request is already merged this issue could be closed.

https://github.com/OpenNebula/one/commit/dd493d92ad0c93d5e807dfff383a6a631a7b2f04

Kind Regards,
Anton Todorov

#2 Updated by Ruben S. Montero over 4 years ago

  • Status changed from Pending to Closed
  • Resolution set to fixed

THANKS!!!!!!

Also available in: Atom PDF