Lines Matching +full:- +full:- +full:retry
2 # Use of this source code is governed by a BSD-style license that can be
13 from autotest_lib.client.common_lib.cros import retry
26 This method parse the output of lxc-ls to get a list of container
27 information. The lxc-ls command output looks like:
29 --------------------------------------------------------------------------
30 base STOPPED - - NO - - - -
31 test_123 RUNNING 10.0.3.27 - NO 8359 6.28MB 6.28MB 0.0MB
39 cmd = 'sudo lxc-ls -P %s -f -F %s' % (os.path.realpath(container_path),
45 # Only LXC 1.x has the second line of '-' as a separator.
46 if line.startswith('------'):
77 common_utils.run('sudo tar -xvf %s -C %s' % (target, extract_dir))
80 # Make sure retries only happen in the non-timeout case.
81 @retry.retry((error.CmdError),
86 # We do not want to retry on CmdTimeoutError but still retry on
87 # CmdError. Hence we can't use curl --timeout=...
88 common_utils.run('sudo curl -s %s -o %s' % (url, target_file_path),
92 # Make sure retries only happen in the non-timeout case.
93 @retry.retry((error.CmdError),
119 logging.info('Server-side packaging is not enabled. Install package %s '
137 @retry.retry(error.CmdError, timeout_min=30)
174 # Always run apt-get update before installing any container. The base
176 common_utils.run('sudo apt-get update')
180 packages.extend(['python-pip', 'python-dev'])
183 'sudo DEBIAN_FRONTEND=noninteractive apt-get install %s -y '
184 '--force-yes' % ' '.join(packages))
188 # For containers running in Moblab, /usr/local/lib/python2.7/dist-packages/
190 # be installed in /usr/lib/python2.7/dist-packages/
191 # Containers created in Moblab does not have autotest/site-packages folder.
192 if not os.path.exists('/usr/local/autotest/site-packages'):
193 target_setting = '--target="/usr/lib/python2.7/dist-packages/"'
200 @retry.retry(error.CmdError, timeout_min=20)
219 @retry.retry(error.CmdError, timeout_min=20)