Add resiliency in UE against interrupted HTTP downloads.

Currently when there's an interruption in the HTTP transfer, update_engine
attempts to resume the transfer only 3 times. After that it gives up.
For reasons yet to be investigated (31019), this happens quite consistently
on ARM and hence we need to fix update_engine to be more resilient in such
cases.

The fix is to increase the retry count to 20 for post-OOBE case. We'll
still maintain the original limit of 3 retries for OOBE case so as to not
stall OOBE forever.

BUG=chromeos-31511:Add resiliency in UE against interrupted HTTP downloads
TEST=Existing unit tests hit all new code paths and pass. Manually tested
     on ZGB and Kaen.
Change-Id: I4e47761dc9b859701023b749c902ec2b1c649b6f
Reviewed-on: https://gerrit.chromium.org/gerrit/24416
Commit-Ready: Jay Srinivasan <jaysri@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
2 files changed
tree: 34dc98f5d7c20455abea9e6cd35fafae5ccf6c3c
  1. .gitignore
  2. 99-gpio-dutflag.rules
  3. action.h
  4. action_mock.h
  5. action_pipe.h
  6. action_pipe_unittest.cc
  7. action_processor.cc
  8. action_processor.h
  9. action_processor_mock.h
  10. action_processor_unittest.cc
  11. action_unittest.cc
  12. build
  13. bzip.cc
  14. bzip.h
  15. bzip_extent_writer.cc
  16. bzip_extent_writer.h
  17. bzip_extent_writer_unittest.cc
  18. certificate_checker.cc
  19. certificate_checker.h
  20. certificate_checker_mock.h
  21. certificate_checker_unittest.cc
  22. chrome_browser_proxy_resolver.cc
  23. chrome_browser_proxy_resolver.h
  24. chrome_browser_proxy_resolver_unittest.cc
  25. chrome_proxy_resolver.cc
  26. chrome_proxy_resolver.h
  27. chrome_proxy_resolver_unittest.cc
  28. cycle_breaker.cc
  29. cycle_breaker.h
  30. cycle_breaker_unittest.cc
  31. dbus_constants.h
  32. dbus_interface.h
  33. dbus_service.cc
  34. dbus_service.h
  35. delta_diff_generator.cc
  36. delta_diff_generator.h
  37. delta_diff_generator_unittest.cc
  38. delta_performer.cc
  39. delta_performer.h
  40. delta_performer_unittest.cc
  41. download_action.cc
  42. download_action.h
  43. download_action_unittest.cc
  44. extent_mapper.cc
  45. extent_mapper.h
  46. extent_mapper_unittest.cc
  47. extent_ranges.cc
  48. extent_ranges.h
  49. extent_ranges_unittest.cc
  50. extent_writer.cc
  51. extent_writer.h
  52. extent_writer_unittest.cc
  53. file_descriptor.cc
  54. file_descriptor.h
  55. file_writer.cc
  56. file_writer.h
  57. file_writer_mock.h
  58. file_writer_unittest.cc
  59. filesystem_copier_action.cc
  60. filesystem_copier_action.h
  61. filesystem_copier_action_unittest.cc
  62. filesystem_iterator.cc
  63. filesystem_iterator.h
  64. filesystem_iterator_unittest.cc
  65. flimflam_proxy.cc
  66. flimflam_proxy.h
  67. flimflam_proxy_unittest.cc
  68. full_update_generator.cc
  69. full_update_generator.h
  70. full_update_generator_unittest.cc
  71. gen_coverage_html
  72. generate_delta_main.cc
  73. gpio_handler.cc
  74. gpio_handler.h
  75. gpio_handler_unittest.cc
  76. gpio_handler_unittest.h
  77. gpio_mock_udev_interface.cc
  78. gpio_mock_udev_interface.h
  79. graph_types.h
  80. graph_utils.cc
  81. graph_utils.h
  82. graph_utils_unittest.cc
  83. http_common.cc
  84. http_common.h
  85. http_fetcher.cc
  86. http_fetcher.h
  87. http_fetcher_unittest.cc
  88. http_fetcher_unittest.h
  89. inherit-review-settings-ok
  90. install_plan.h
  91. integration_unittest.cc
  92. libcurl_http_fetcher.cc
  93. libcurl_http_fetcher.h
  94. LICENSE
  95. local_coverage_rate
  96. main.cc
  97. marshal.list
  98. metadata.cc
  99. metadata.h
  100. metadata_unittest.cc
  101. mock_dbus_interface.h
  102. mock_file_writer.h
  103. mock_http_fetcher.cc
  104. mock_http_fetcher.h
  105. multi_range_http_fetcher.cc
  106. multi_range_http_fetcher.h
  107. omaha_hash_calculator.cc
  108. omaha_hash_calculator.h
  109. omaha_hash_calculator_unittest.cc
  110. omaha_request_action.cc
  111. omaha_request_action.h
  112. omaha_request_action_unittest.cc
  113. omaha_request_params.cc
  114. omaha_request_params.h
  115. omaha_request_params_unittest.cc
  116. omaha_response_handler_action.cc
  117. omaha_response_handler_action.h
  118. omaha_response_handler_action_unittest.cc
  119. org.chromium.UpdateEngine.service
  120. payload_signer.cc
  121. payload_signer.h
  122. payload_signer_unittest.cc
  123. postinstall_runner_action.cc
  124. postinstall_runner_action.h
  125. postinstall_runner_action_unittest.cc
  126. prefs.cc
  127. prefs.h
  128. prefs_interface.h
  129. prefs_mock.h
  130. prefs_unittest.cc
  131. proxy_resolver.cc
  132. proxy_resolver.h
  133. run_unittests
  134. SConstruct
  135. setup_dev_packages
  136. simple_key_value_store.cc
  137. simple_key_value_store.h
  138. simple_key_value_store_unittest.cc
  139. subprocess.cc
  140. subprocess.h
  141. subprocess_unittest.cc
  142. tarjan.cc
  143. tarjan.h
  144. tarjan_unittest.cc
  145. terminator.cc
  146. terminator.h
  147. terminator_unittest.cc
  148. test_http_server.cc
  149. test_utils.cc
  150. test_utils.h
  151. testrunner.cc
  152. topological_sort.cc
  153. topological_sort.h
  154. topological_sort_unittest.cc
  155. udev_interface.h
  156. unittest_key.pem
  157. unittest_key2.pem
  158. update_attempter.cc
  159. update_attempter.h
  160. update_attempter_mock.h
  161. update_attempter_unittest.cc
  162. update_check_scheduler.cc
  163. update_check_scheduler.h
  164. update_check_scheduler_unittest.cc
  165. update_engine.xml
  166. update_engine_client.cc
  167. update_metadata.proto
  168. UpdateEngine.conf
  169. utils.cc
  170. utils.h
  171. utils_unittest.cc
  172. WATCHLISTS
  173. zip_unittest.cc