> On Nov. 11, 2015, 6:01 p.m., Andrew Onischuk wrote:
> > Also can we do the clean for all repositories? That would simply the logics 
> > exponentiantialy and help to avoid some bugs.
> 
> Alejandro Fernandez wrote:
>     +1 for that. Custom command that can be ran on-demand to clean all repos.
>     We need to be careful if the yum lock is already acquired, we don't want 
> to wait forever.
> 
> Andrew Onischuk wrote:
>     Actually I think custom command is a nicer idea, than doing it without 
> customer knowledge.
> 
> Di Li wrote:
>     hello folks,
>     
>     Just to make sure I understand it:
>     1. "clean for all repositories" >> As in simply running "yum clean all" 
> without the --disablerepo and --enablerepo parameters at all?
>     2. "custom command" >> As in a separate Python script that users can run 
> from the command line? Or are we talking about a UI feature here?
>     
>     Thanks.
> 
> Andrew Onischuk wrote:
>     1. Yes
>     2. Yes, it's a separate python file, and Alejandro probably mean 
> "custom_action" not custom_command. You can check install_packages.py and 
> other scripts in that folder for an example.
> 
> Jayush Luniya wrote:
>     +1 on custom_action route.

hello folks,

There is already this update_repo.py custom_action Python script in the current 
custom_actions directory. The python script simply creates HDP repo files. 
Should it be piggy-backed to run yum clean all right after the repos are 
created, instead of having a desinaged clean repo cache custom_action ?

Thanks.

Di


- Di


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


On Nov. 10, 2015, 9:02 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40080/
> -----------------------------------------------------------
> 
> (Updated Nov. 10, 2015, 9:02 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Andrew Onischuk, Jayush 
> Luniya, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13748
>     https://issues.apache.org/jira/browse/AMBARI-13748
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Need a way for Ambari to trigger a repository clean (yum clean expire-cache 
> on rhel, for example) when updating repository files during an Ambari update 
> as well as fresh installation of a cluster.
> 
> Currently, this must be done occasionally through a manual step, and if not 
> done will lead to problems during install.
> 
> 
> Diffs
> -----
> 
>   
> ambari-common/src/main/python/resource_management/libraries/providers/repository.py
>  11002cc 
>   
> ambari-common/src/main/python/resource_management/libraries/resources/repository.py
>  2484d67 
>   ambari-server/src/main/resources/custom_actions/scripts/install_packages.py 
> 1dfaa54 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py
>  05751fa 
>   ambari-server/src/test/python/custom_actions/TestInstallPackages.py 83b6bb5 
>   
> ambari-server/src/test/python/stacks/2.0.6/hooks/before-INSTALL/test_before_install.py
>  f9d69a8 
> 
> Diff: https://reviews.apache.org/r/40080/diff/
> 
> 
> Testing
> -------
> 
> New unit test. Patch cluster with the changes and run fresh install and 
> rolling upgrade to verify the repo clean up logic was run.
> 
> 
> Thanks,
> 
> Di Li
> 
>

Reply via email to