Re: why stack_root does not exist

2018-03-25 Thread Dai Xiang
On Fri, Mar 23, 2018 at 01:39:13PM +, Jonathan Hurley wrote:
> The only scripts which should use /usr/hdp as a hard coded value are those 
> which belong specifically to the HDP stack. Otherwise it's a bug and needs to 
> be corrected.

You can use `git grep "/usr/hdp"` to search, i am sure that many
scripts do not belong only to the HDP stack:

$ git grep "/usr/hdp" | cut -d ':' -f1 | sort -u

ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py
ambari-agent/src/main/python/ambari_agent/HostInfo.py
ambari-agent/src/test/python/ambari_agent/TestHostCheckReportFileHandler.py
ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FixLzoCodecPath.java
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FixOozieAdminUsers.java



> 
> > On Mar 22, 2018, at 9:34 PM, xiang@sky-data.cn wrote:
> > 
> > But i find some python script use "/usr/hdp" as hard code, is there a plan 
> > to
> > make it synchronize with stack_root val?
> > 
> > - Original Message -
> > From: "Di Li" <osji...@gmail.com>
> > To: dev@ambari.apache.org
> > Sent: Thursday, March 22, 2018 9:19:33 PM
> > Subject: Re: why stack_root does not exist
> > 
> > It doesn't create that directory, as ambari does not know what could be
> > used. The service RPMs create directories upon installation and Ambari
> > reads its content. That's about it.
> > 
> > On Wed, Mar 21, 2018 at 10:11 PM, <xiang@sky-data.cn> wrote:
> > 
> >> HI!
> >> 
> >> I define a new stack called DX and change the stack_root to {DX: /usr/dx}
> >> in the cluster_env.xml, the old is {HDP: /usr/hdp}.
> >> 
> >> But when i start install, i find below error:
> >> 
> >> WARNING 2018-03-22 10:05:49,709 base_alert.py:138 -
> >> [Alert][ambari_agent_disk_usage] Unable to execute alert. [Errno 2] No
> >> such file or directory: '/usr/dx'
> >> 
> >> Does it mean ambari can not auto mkdir this one?
> >> 
> >> If i miss something important, please tell me.
> >> 
> >> Best Wishes
> >> 
> > 
> 

-- 
Best Regards
Dai Xiang


Re: why stack_root does not exist

2018-03-23 Thread Jonathan Hurley
The only scripts which should use /usr/hdp as a hard coded value are those 
which belong specifically to the HDP stack. Otherwise it's a bug and needs to 
be corrected.

> On Mar 22, 2018, at 9:34 PM, xiang@sky-data.cn wrote:
> 
> But i find some python script use "/usr/hdp" as hard code, is there a plan to
> make it synchronize with stack_root val?
> 
> - Original Message -
> From: "Di Li" <osji...@gmail.com>
> To: dev@ambari.apache.org
> Sent: Thursday, March 22, 2018 9:19:33 PM
> Subject: Re: why stack_root does not exist
> 
> It doesn't create that directory, as ambari does not know what could be
> used. The service RPMs create directories upon installation and Ambari
> reads its content. That's about it.
> 
> On Wed, Mar 21, 2018 at 10:11 PM, <xiang@sky-data.cn> wrote:
> 
>> HI!
>> 
>> I define a new stack called DX and change the stack_root to {DX: /usr/dx}
>> in the cluster_env.xml, the old is {HDP: /usr/hdp}.
>> 
>> But when i start install, i find below error:
>> 
>> WARNING 2018-03-22 10:05:49,709 base_alert.py:138 -
>> [Alert][ambari_agent_disk_usage] Unable to execute alert. [Errno 2] No
>> such file or directory: '/usr/dx'
>> 
>> Does it mean ambari can not auto mkdir this one?
>> 
>> If i miss something important, please tell me.
>> 
>> Best Wishes
>> 
> 



Re: why stack_root does not exist

2018-03-22 Thread xiang . dai
But i find some python script use "/usr/hdp" as hard code, is there a plan to
make it synchronize with stack_root val?

- Original Message -
From: "Di Li" <osji...@gmail.com>
To: dev@ambari.apache.org
Sent: Thursday, March 22, 2018 9:19:33 PM
Subject: Re: why stack_root does not exist

It doesn't create that directory, as ambari does not know what could be
used. The service RPMs create directories upon installation and Ambari
reads its content. That's about it.

On Wed, Mar 21, 2018 at 10:11 PM, <xiang@sky-data.cn> wrote:

> HI!
>
> I define a new stack called DX and change the stack_root to {DX: /usr/dx}
> in the cluster_env.xml, the old is {HDP: /usr/hdp}.
>
> But when i start install, i find below error:
>
> WARNING 2018-03-22 10:05:49,709 base_alert.py:138 -
> [Alert][ambari_agent_disk_usage] Unable to execute alert. [Errno 2] No
> such file or directory: '/usr/dx'
>
> Does it mean ambari can not auto mkdir this one?
>
> If i miss something important, please tell me.
>
> Best Wishes
>


Re: why stack_root does not exist

2018-03-22 Thread Di Li
It doesn't create that directory, as ambari does not know what could be
used. The service RPMs create directories upon installation and Ambari
reads its content. That's about it.

On Wed, Mar 21, 2018 at 10:11 PM,  wrote:

> HI!
>
> I define a new stack called DX and change the stack_root to {DX: /usr/dx}
> in the cluster_env.xml, the old is {HDP: /usr/hdp}.
>
> But when i start install, i find below error:
>
> WARNING 2018-03-22 10:05:49,709 base_alert.py:138 -
> [Alert][ambari_agent_disk_usage] Unable to execute alert. [Errno 2] No
> such file or directory: '/usr/dx'
>
> Does it mean ambari can not auto mkdir this one?
>
> If i miss something important, please tell me.
>
> Best Wishes
>


why stack_root does not exist

2018-03-21 Thread xiang . dai
HI! 

I define a new stack called DX and change the stack_root to {DX: /usr/dx} in 
the cluster_env.xml, the old is {HDP: /usr/hdp}. 

But when i start install, i find below error: 

WARNING 2018-03-22 10:05:49,709 base_alert.py:138 - 
[Alert][ambari_agent_disk_usage] Unable to execute alert. [Errno 2] No such 
file or directory: '/usr/dx' 

Does it mean ambari can not auto mkdir this one? 

If i miss something important, please tell me. 

Best Wishes