> On Dec. 16, 2017, 3:35 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
> > Lines 160-164 (patched)
> > <https://reviews.apache.org/r/64667/diff/1/?file=1919066#file1919066line161>
> >
> >     We should not hard code this into install_packages. Can we just expose 
> > this method for the Livy Python files to call?
> 
> Dmitro Lisnichenko wrote:
>     In this case, this code should run before install_packages.py . 
> Otherwise, symlinks will be badly broken, and my code will not be able to fix 
> that. I can move the code to restart() of Livy, but we would have to require 
> users (via release notes) to restart Livy before installing packages for a 
> new stack. 
>     Should I move this code to restart? Or should leave it as is, intending 
> to refactor/generalize it at 2.6.2?

I don't see how they will be badly broken - we're updating the conf pointers 
after the packages are installed anyway. Let's say that we have this problem in 
the system:

/etc/livy/conf -> /usr/hdp/current/livy (broken)
/usr/hdp/current/livy-server/conf -> /etc/component/conf (wrong)

During Livy's configure() or pre_upgrade_restart(), can we specifically invoke 
conf_select.convert_conf_directories_to_symlinks() for the Livy package?

```
      old_conf = directory_struct['conf_dir']
      current_dir = directory_struct['current_dir']
      if os.path.islink(old_conf):
        # it's already a link; make sure it's a link to where we want it
        if os.readlink(old_conf) != current_dir:
```

Seems like this would allow us to detect the broken link in /etc/livy/conf and 
fix it.


- Jonathan


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


On Dec. 16, 2017, 10:53 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64667/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2017, 10:53 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Mahadev Konar, and Nate Cole.
> 
> 
> Bugs: AMBARI-22522
>     https://issues.apache.org/jira/browse/AMBARI-22522
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Adding a small, livy-only workaround into install_packages.py
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/custom_actions/scripts/install_packages.py 
> c8497cd 
> 
> 
> Diff: https://reviews.apache.org/r/64667/diff/1/
> 
> 
> Testing
> -------
> 
> mvn clean test,
> live cluster check
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>

Reply via email to