> On Jan. 29, 2017, 5:09 p.m., Nate Cole wrote:
> > ambari-common/src/main/python/ambari_commons/shell.py, lines 141-142
> > <https://reviews.apache.org/r/56059/diff/1/?file=1618458#file1618458line141>
> >
> >     Seems awfully specific.  Would be more flexible if we could pass in the 
> > kill delay as an argument whose default is 5 (the graceful_kill_delay).
> 
> Dmitro Lisnichenko wrote:
>     Do you mean having a single graceful_kill_delay parameter (the time 
> between SIGTERM and SIGKILL)? Or you mean exposing 
> yum_rpm_gracefull_kill_delay parameter for timeout between sending SIGTERM to 
> sensitive process like yum, and sending SIGKILL?

What I mean is that yumrpm.py is the one building the command to run.  I would 
prefer supplying the timeout there instead of using the yum_rpm_present as it's 
just something else we have to remember that we did 6 months from now.

We already know when we're calling yum.  We have a ton of arguments to control 
the timeout behavior, can we just be using them?  Can we use try_sleep, 
timeout, on_timeout, timeout_kill_strategy etc to our advantage (see 
shell.py/checked_call for complete list).


- Nate


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


On Jan. 29, 2017, 7:27 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56059/
> -----------------------------------------------------------
> 
> (Updated Jan. 29, 2017, 7:27 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmytro Grinenko, Jonathan 
> Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-19768
>     https://issues.apache.org/jira/browse/AMBARI-19768
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Steps*
> # Deploy HDP-2.5.0.0 with Ambari 2.4.1.0
> # Upgrade ambari to 2.5.0.0-481 (I did not register Falcon library, as the 
> jar was already present in /var/lib/ambari-server/resources/je-5.0.73.jar on 
> Ambari server node)
> # Register HDP-2.6.0.0-216
> # Start package installation
> 
> *Result:*
> Got below errors:
> {code}
> 2016-12-16 13:47:10,419|INFO|MainThread|machine.py:145 - 
> run()|CRITICAL:yum.main:
> 2016-12-16 13:47:10,419|INFO|MainThread|machine.py:145 - run()|
> 2016-12-16 13:47:10,419|INFO|MainThread|machine.py:145 - run()|Error: rpmdb 
> open failed
> 2016-12-16 13:47:10,420|INFO|MainThread|machine.py:145 - run()|Traceback 
> (most recent call last):
> 2016-12-16 13:47:10,420|INFO|MainThread|machine.py:145 - run()|File 
> "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", 
> line 166, in actionexecute
> 2016-12-16 13:47:10,420|INFO|MainThread|machine.py:145 - run()|ret_code = 
> self.install_packages(package_list)
> 2016-12-16 13:47:10,420|INFO|MainThread|machine.py:145 - run()|File 
> "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", 
> line 400, in install_packages
> 2016-12-16 13:47:10,420|INFO|MainThread|machine.py:145 - run()|if not 
> verifyDependencies():
> 2016-12-16 13:47:10,421|INFO|MainThread|machine.py:145 - run()|File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/packages_analyzer.py",
>  line 311, in verifyDependencies
> 2016-12-16 13:47:10,421|INFO|MainThread|machine.py:145 - run()|code, out = 
> rmf_shell.checked_call(cmd, sudo=True)
> 2016-12-16 13:47:10,421|INFO|MainThread|machine.py:145 - run()|File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 72, in inner
> 2016-12-16 13:47:10,421|INFO|MainThread|machine.py:145 - run()|result = 
> function(command, **kwargs)
> 2016-12-16 13:47:10,421|INFO|MainThread|machine.py:145 - run()|File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 102, in checked_call
> 2016-12-16 13:47:10,422|INFO|MainThread|machine.py:145 - run()|tries=tries, 
> try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
> 2016-12-16 13:47:10,422|INFO|MainThread|machine.py:145 - run()|File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 150, in _call_wrapper
> 2016-12-16 13:47:10,422|INFO|MainThread|machine.py:145 - run()|result = 
> _call(command, **kwargs_copy)
> 2016-12-16 13:47:10,422|INFO|MainThread|machine.py:145 - run()|File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 303, in _call
> 2016-12-16 13:47:10,423|INFO|MainThread|machine.py:145 - run()|raise 
> ExecutionFailed(err_msg, code, out, err)
> 2016-12-16 13:47:10,423|INFO|MainThread|machine.py:145 - 
> run()|ExecutionFailed: Execution of '/usr/bin/yum -d 0 -e 0 check 
> dependencies' returned 1. error: rpmdb: BDB0113 Thread/process 
> 16016/139791567193920 failed: BDB1507 Thread died in Berkeley DB library
> 2016-12-16 13:47:10,424|INFO|MainThread|machine.py:145 - run()|error: db5 
> error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run 
> database recovery
> 2016-12-16 13:47:10,424|INFO|MainThread|machine.py:145 - run()|error: cannot 
> open Packages index using db5 -  (-30973)
> 2016-12-16 13:47:10,424|INFO|MainThread|machine.py:145 - run()|error: cannot 
> open Packages database in /var/lib/rpm
> 2016-12-16 13:47:10,424|INFO|MainThread|machine.py:145 - 
> run()|CRITICAL:yum.main:
> 2016-12-16 13:47:10,424|INFO|MainThread|machine.py:145 - run()|
> 2016-12-16 13:47:10,425|INFO|MainThread|machine.py:145 - run()|Error: rpmdb 
> open failed
> 2016-12-16 13:47:10,425|INFO|MainThread|machine.py:145 - run()|Traceback 
> (most recent call last):
> 2016-12-16 13:47:10,425|INFO|MainThread|machine.py:145 - run()|File 
> "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", 
> line 469, in <module>
> 2016-12-16 13:47:10,425|INFO|MainThread|machine.py:145 - 
> run()|InstallPackages().execute()
> 2016-12-16 13:47:10,425|INFO|MainThread|machine.py:145 - run()|File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 287, in execute
> 2016-12-16 13:47:10,426|INFO|MainThread|machine.py:145 - run()|method(env)
> 2016-12-16 13:47:10,426|INFO|MainThread|machine.py:145 - run()|File 
> "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", 
> line 179, in actionexecute
> 2016-12-16 13:47:10,426|INFO|MainThread|machine.py:145 - run()|raise 
> Fail("Failed to distribute repositories/install packages")
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/ambari_commons/process_utils.py PRE-CREATION 
>   ambari-common/src/main/python/ambari_commons/shell.py 8d26599 
> 
> Diff: https://reviews.apache.org/r/56059/diff/
> 
> 
> Testing
> -------
> 
> test on live cluster. Still there are things to check
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>

Reply via email to