copr_test: fixes and improvements for resiliency #2

Merged
merged 1 commit into from Dec 14, 2017

Conversation

Projects
None yet
2 participants
Contributor

smoser commented Dec 14, 2017

The biggest fix here is retrying the download of yum data up to 10 times
with a backoff. This is the fix we employed in
cloud-init/tools/run-centos and have been successful with it. This retry is
done in an added 'install_packages' function.

  • drop unused function inside_as
  • inside(): add LANG=C LC_ALL=C to avoid tools inside complaining about
    locale. (yum would complain: Failed to set locale, defaulting to C)
  • inside(): debug 1 with the command being run.
  • debug(): prefix output with '::' so it is easily found among noise.
  • wait_for_network: do not redirect 'inside's stderr, only the command
    being run. This allows us to see the debug statement from inside.
  • do not use 'sh -c' when not needed.
  • fix '--project' and '--group' options to take an option.
  • fix '-v' to not take an option (making -v actually work).
copr_test: fixes and improvements for resiliency
The biggest fix here is retrying the download of yum data up to 10 times
with a backoff.  This is the fix we employed in
cloud-init/tools/run-centos and have been successful with it.  This retry is
done in an added  'install_packages' function.

 - drop unused function inside_as
 - inside(): add LANG=C LC_ALL=C to avoid tools inside complaining about
   locale. (yum would complain: Failed to set locale, defaulting to C)
 - inside(): debug 1 with the command being run.
 - debug(): prefix output with '::' so it is easily found among noise.
 - wait_for_network: do not redirect 'inside's stderr, only the command
   being run.  This allows us to see the debug statement from inside.
 - do not use 'sh -c' when not needed.
 - fix '--project' and '--group' options to take an option.
 - fix '-v' to *not* take an option (making -v actually work).

@powersj powersj merged commit 338ff6a into canonical-server:master Dec 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment