You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Andrew Onischuk <ao...@hortonworks.com> on 2015/12/22 12:04:30 UTC

Review Request 41640: Make Directory with create_parents=True, error messages more understanable

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41640/
-----------------------------------------------------------

Review request for Ambari and Dmitro Lisnichenko.


Bugs: AMBARI-14462
    https://issues.apache.org/jira/browse/AMBARI-14462


Repository: ambari


Description
-------

Example of message:

    
    
    Traceback (most recent call last):
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 67, in <module>
        PigClient().execute()
      File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 216, in execute
        method(env)
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 55, in install
        self.configure(env)
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 35, in configure
        pig()
      File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
        return fn(*args, **kwargs)
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig.py", line 33, in pig
        group = params.user_group
      File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 157, in __init__
        self.env.run()
      File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run
        self.run_action(resource, action)
      File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
        provider_action()
      File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 151, in action_create
        sudo.makedirs(path, self.resource.mode or 0755)
      File "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line 51, in makedirs
        os.makedirs(path, mode)
      File "/usr/lib64/python2.6/os.py", line 157, in makedirs
        mkdir(name, mode)
    OSError: [Errno 2] No such file or directory: '/usr/hdp/current/pig-client/conf'
    

The actual cause was because '/usr/hdp/current/pig-client' was a broken
symlink. Need to be more explicit about that.


Diffs
-----

  ambari-common/src/main/python/resource_management/core/sudo.py bb28d9f 

Diff: https://reviews.apache.org/r/41640/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk


Re: Review Request 41640: Make Directory with create_parents=True, error messages more understanable

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41640/#review111600
-----------------------------------------------------------

Ship it!


Ship It!

- Dmitro Lisnichenko


On Dec. 22, 2015, 1:08 p.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41640/
> -----------------------------------------------------------
> 
> (Updated Dec. 22, 2015, 1:08 p.m.)
> 
> 
> Review request for Ambari and Dmitro Lisnichenko.
> 
> 
> Bugs: AMBARI-14462
>     https://issues.apache.org/jira/browse/AMBARI-14462
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Example of message:
> 
>     
>     
>     Traceback (most recent call last):
>       File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 67, in <module>
>         PigClient().execute()
>       File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 216, in execute
>         method(env)
>       File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 55, in install
>         self.configure(env)
>       File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 35, in configure
>         pig()
>       File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
>         return fn(*args, **kwargs)
>       File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig.py", line 33, in pig
>         group = params.user_group
>       File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 157, in __init__
>         self.env.run()
>       File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run
>         self.run_action(resource, action)
>       File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
>         provider_action()
>       File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 151, in action_create
>         sudo.makedirs(path, self.resource.mode or 0755)
>       File "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line 51, in makedirs
>         os.makedirs(path, mode)
>       File "/usr/lib64/python2.6/os.py", line 157, in makedirs
>         mkdir(name, mode)
>     OSError: [Errno 2] No such file or directory: '/usr/hdp/current/pig-client/conf'
>     
> 
> The actual cause was because '/usr/hdp/current/pig-client' was a broken
> symlink. Need to be more explicit about that.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/core/sudo.py bb28d9f 
> 
> Diff: https://reviews.apache.org/r/41640/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>


Re: Review Request 41640: Make Directory with create_parents=True, error messages more understanable

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41640/
-----------------------------------------------------------

(Updated Dec. 22, 2015, 11:08 a.m.)


Review request for Ambari and Dmitro Lisnichenko.


Bugs: AMBARI-14462
    https://issues.apache.org/jira/browse/AMBARI-14462


Repository: ambari


Description
-------

Example of message:

    
    
    Traceback (most recent call last):
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 67, in <module>
        PigClient().execute()
      File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 216, in execute
        method(env)
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 55, in install
        self.configure(env)
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py", line 35, in configure
        pig()
      File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
        return fn(*args, **kwargs)
      File "/var/lib/ambari-agent/cache/common-services/PIG/0.12.0.2.0/package/scripts/pig.py", line 33, in pig
        group = params.user_group
      File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 157, in __init__
        self.env.run()
      File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run
        self.run_action(resource, action)
      File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
        provider_action()
      File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 151, in action_create
        sudo.makedirs(path, self.resource.mode or 0755)
      File "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line 51, in makedirs
        os.makedirs(path, mode)
      File "/usr/lib64/python2.6/os.py", line 157, in makedirs
        mkdir(name, mode)
    OSError: [Errno 2] No such file or directory: '/usr/hdp/current/pig-client/conf'
    

The actual cause was because '/usr/hdp/current/pig-client' was a broken
symlink. Need to be more explicit about that.


Diffs (updated)
-----

  ambari-common/src/main/python/resource_management/core/sudo.py bb28d9f 

Diff: https://reviews.apache.org/r/41640/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk