6 Commits

Author SHA1 Message Date
Jeremy Stanley
9b4555321c Nodepool should clone the config repo from git.o.o
* .../nodepool/scripts/cache_git_repos.py: Since the projects list
is not being retrieved as part of a git repository, use HTTPS
protocol rather than HTTP so it will be consistent with the way we
retrieve the bootstrap script in prepare_node.sh.

* .../nodepool/scripts/prepare_node.sh: Switch the config clone
operation from the Gerrit server to the Git server farm, since the
former does not support git protocol. Also make it a shallow clone
since we just need the files.

Change-Id: I1dc0697bb3f9832d180b6b1ebffaa563bd886281
2014-02-21 19:34:29 +00:00
Jeremy Stanley
017889913a Make nodepool git repo caching more robust
Previously, nodepool's prep scripts would not abort when
encountering git cloning errors. Now we retry once on failure and
then abort if it fails a second time. Also the script now makes sure
the clone actually results in a functional copy of each repository
by attempting to list branches and reset to HEAD.

Change-Id: I84565e4e90b34c6a9b8c86754efdde137cda08b2
2014-02-21 16:23:10 +00:00
Jeremy Stanley
06ee457497 Clone git repos for images via git protocol
For performance reasons--using git protocol instead of HTTP should
speed up cloning significantly on CentOS 6 in particular.

Change-Id: I37fadb1366eab5d66ec8e95945bea9c2c0251fcb
2014-02-21 15:36:11 +00:00
James E. Blair
a1547d5945 Add sync calls to all prepare scripts
Strictly speaking, we only need sync calls at the end of the
script that is directly invoked by nodepool.  But just so we
don't have to think about it too much, add them to all prepare
scripts.

Without it, clouds will happily snapshot a system without all
the data written to disk!

Closes-Bug: 1282136

Change-Id: Id7dcf6667d6e48eb5ae95fd42b09f0651eeb38f9
2014-02-19 09:05:23 -08:00
Monty Taylor
7d44f4f702 Split config from projects list
The projects list is a common list for devs to interact with. The config
in the list is not, but the config in the list means the file needs to
be in an erb template.

Split the two concerns, similar to zuul. Put the config in a config file
and the project data in a yaml file.

Change-Id: I708b8655b4b1ce377f3b7369e987418c1d72d977
2014-01-28 09:32:09 -08:00
James E. Blair
f816dc63ab Nodepool: cache all gerrit repos
Cache all review.openstack.org git repos in /opt/git.

Subsequent changes to gerrit-git-prep and devstack-gate will make
use of these repos (eventually deprecating the devstack-gate repos
is ~jenkins/workspace-cache).

Refactor the devstack cache python script a bit to make common
functions reusable.  Also rename it because underscores are better
than hyphens for python file names.

Change-Id: I4ae40613ebcca62b0dfc2eaba159557a4c71a529
2013-12-04 10:54:52 -08:00