You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Hemanth Yamijala (JIRA)" <ji...@apache.org> on 2008/04/09 12:35:24 UTC

[jira] Commented: (HADOOP-3153) [HOD] Hod should deallocate cluster if there's a problem in writing information to the state file

    [ https://issues.apache.org/jira/browse/HADOOP-3153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587135#action_12587135 ] 

Hemanth Yamijala commented on HADOOP-3153:
------------------------------------------

Basic fix seem right.

Some comments:

- If the $HOME/.hod directory does not exist, (and so the clusters.state file does not exist), allocate is not working.
- I think we can make some small changes to the error messages. Currently, in the error scenario, for allocate we say:
Invalid Permissions on clusters' data file : /home/yhemanth/.hod/clusters.state. It has to be a readable file.
Instead, we can say:
Requested operation cannot be performed. Cannot read /home/yhemanth/.hod/clusters.state: Permission denied. 
This is somewhat similar to what Unix errors report.
Likewise, for deallocate, when you don't have write permissions, we say:
Invalid Permissions on clusters' data file : /home/yhemanth/.hod/clusters.state. It has to be a writable file. info and list operations might show old cluster data.
Instead, we can say:
Cannot update /home/yhemanth/.hod/clusters.state: Permission denied.\n Cluster is deallocated, but info and list operations might show incorrect information.
- In the except block of the last part of the allocate command, the deallocation is still not happening, right ? It should be, as per your comment ?

Minor points:
- For the checkStateFile, I think we can pass in some const strings instead of the hardcoded numbers. In fact, it would be great if we can reuse os.R_OK etc. Can we not OR os.R_OK and os.W_OK to accomodate mode 3 ?
- Likewise the error strings, if possible should be only at one place. That way, it will be easier to change.

Test cases:
- Move setupConf to a library type function.. maybe in a util class in the same module.
- One more test case I can think of is what happens if the cluster state directory does not have write and execute permissions. This is actually the scenario that we have fixed


> [HOD] Hod should deallocate cluster if there's a problem in writing information to the state file
> -------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-3153
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3153
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: contrib/hod
>    Affects Versions: 0.16.0
>            Reporter: Hemanth Yamijala
>            Assignee: Vinod Kumar Vavilapalli
>             Fix For: 0.17.0
>
>         Attachments: HADOOP-3153
>
>
> Consider a scenario where hod runs allocate successfully, but isn't able to save teh allocated information to the clusters.state file. In such a case, it gets an error and exits. But the cluster remains allocated, and unfortunately the user cannot deallocate the cluster now unless he knows the cluster directory.
> It is better if HOD can deallocate the cluster in such an error condition.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.