> On April 18, 2017, 12:36 a.m., Alejandro Fernandez wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
> > Line 52 (original), 52 (patched)
> > <https://reviews.apache.org/r/58489/diff/1/?file=1693394#file1693394line52>
> >
> >     Why would service_name be the string "null"?
> 
> Madhuvanthi Radhakrishnan wrote:
>     During install_packages roleCommand, the service name is set to "null"
>     /var/lib/ambari-agent/data/command-5.json:    "serviceName": "null",
> 
> Nate Cole wrote:
>     If serviceName is the string "null" then that's pretty lame. :)  That 
> should be fixed.
> 
> Jayush Luniya wrote:
>     I agree we should not have serviceName = "null" :) However we ensure 
> there are no other side effects to it.

Hi,
On debugging it looks like during json.dumps (CustomServiceOrchestrator.py) it 
converts everything to string and hence null is converted to "null".
I see that this is the case for not just serviceName but several other values.
For eg:
[root@jay-hdf-1 data]# grep \"null\" command-302.json
            "capacity-scheduler": "null",
            "_storm.min.ruid": "null",
            "topology.acker.executors": "null",
            "topology.max.task.parallelism": "null",
            "transactional.zookeeper.port": "null",
            "topology.worker.childopts": "null",
            "transactional.zookeeper.servers": "null",
            "topology.tick.tuple.freq.secs": "null",
            "ui.filter": "null",

One way to fix this is in the AmbariActionExecutionHelper.java, where I can 
assign serviceName = "" instead of null and then remove the "null" check in 
stack_tools.py.
This opens up a host of unit test failures where the expectation is null (java 
side) and test command.json files use "serviceName" : "null" (python side)
Since the fix in this patch is a blocker for system tests, I can address the 
null issue in a follow up jira.


- Madhuvanthi


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


On April 18, 2017, 11:30 p.m., Madhuvanthi Radhakrishnan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58489/
> -----------------------------------------------------------
> 
> (Updated April 18, 2017, 11:30 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Jayush 
> Luniya, Nate Cole, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-20775
>     https://issues.apache.org/jira/browse/AMBARI-20775
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> All the commands.json files should always contain the versionAdvertised 
> field. If versionAdvertised is not set in command.json then we should assume 
> that versionAdvertised=False when calling stack_tools.py
> 
> 
> Diffs
> -----
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
>  463d61f53d 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
>  93ec0b74f5 
>   
> ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
>  3579fcbd2a 
>   ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py 
> ab5e2cdaf9 
>   ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json 
> 0b5ba6a0ba 
>   ambari-server/src/test/python/stacks/2.0.6/configs/default.json 94425e0a30 
>   ambari-server/src/test/python/stacks/2.0.6/configs/flume_22.json 6ec9ec929c 
>   ambari-server/src/test/python/stacks/2.0.6/configs/flume_only.json 
> 1550715d72 
>   ambari-server/src/test/python/stacks/2.1/configs/client-upgrade.json 
> 013bb8b8d2 
>   ambari-server/src/test/python/stacks/2.1/configs/default.json e04e1eb9f4 
>   ambari-server/src/test/python/stacks/2.2/configs/default.json bcb021b74f 
>   ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json 
> 7ded3a01e1 
>   ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json 
> 7a29ea0c0d 
>   ambari-server/src/test/python/stacks/2.2/configs/knox_upgrade.json 
> a9db11c645 
>   ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json 
> fb561f74f3 
>   ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json 
> 86ca03a4a3 
>   ambari-server/src/test/python/stacks/2.2/configs/ranger-admin-upgrade.json 
> cbe8ebeb15 
>   
> ambari-server/src/test/python/stacks/2.2/configs/ranger-usersync-upgrade.json 
> dc4c43b9e0 
>   ambari-server/src/test/python/stacks/2.3/configs/hbase_default.json 
> 0da58ce2a5 
> 
> 
> Diff: https://reviews.apache.org/r/58489/diff/2/
> 
> 
> Testing
> -------
> 
> Tested for service actions:
> Start
> Stop
> Restart
> Reconfigure
> Service Check
> Enable HA
> 
> 
> Thanks,
> 
> Madhuvanthi Radhakrishnan
> 
>

Reply via email to