alexandrelimassantana opened a new pull request #1499: Remove unused "umount" 
method in NfsSecondaryStorageResource 
URL: https://github.com/apache/cloudstack/pull/1499
 
 
   Im in process of rewriting the unit test for this class' mount method. 
Before I can do that, the class needed some refactoring, not just because it 
was fuzzy but because it was impossible to use mocks the way it was coded. Most 
of this PR is about transforming big chunks of code into documented methods 
with two exceptions:
   
   1) I inverted the logic when checking for existing mounts within the same 
root location. Previously one would first create a directory if it didn't exist 
and then test if there was already mount there. Now it is first testing if 
there is a mount, if not, it creates the needed directory. (line 2376)
   
   2) A bug was found in the unmount method. The unmount wasn't issuing the 
command "umount" to unmount a resource but instead was trying the "mount" 
command again, resulting in mounted resources never being unmounted. (line 2347)
   
   **[UPDATE] Instead of refactoring the `umount` method, I noticed that it was 
not being used. Therefore, instead of fixing it, I decided to remove it.**
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to