15 Commits

Author SHA1 Message Date
Jeremy Stanley
572c35a827 Look for yum instead of rpm in elements too
On CentOS 6.x the rpm executable is in /bin instead of /usr/bin, but
the cache-devstack element ends up running yum if it wants to
download RPM packages anyway. Look for yum instead of rpm as an
indication of which packages to install.

Commit fa18656 fixed this in cache_devstack.py for snapshot images,
but missed that it was affecting diskimage-builder elements as well.

Change-Id: I4b76a48564cd5d703d79cfda88bbbfe97216a70a
2015-05-07 01:56:52 +00:00
Jeremy Stanley
6a8f64190d Do a better job of identifying CentOS 6
Since DIB creates a chroot but doesn't actually chroot in an
extra-data script, look for /etc/redhat-release relative to the
temporary chroot base path. Also given that the centos element
leaves DIB_RELEASE exported as am empty string in the calling
environment rather than unset, place it first in the conditional
list.

Change-Id: I0a51f88ff5ea71b6aa6e6406b656cefb0e135e88
2015-05-04 04:22:05 +00:00
Jeremy Stanley
08dc5cf613 Import subprocess in cache devstack element
Change fd9c80208c00021a49df6907973bbbb3fa242069 inadvertently
removed the subprocess import from 55-cache-devstack-repos even
though it was used in a function defined within that element, unlike
in its snapshot prep script counterpart. Readd it so that this
element works again.

Change-Id: I954a1e7e99af96b08e0a59e99e513902731fd773
2015-05-04 03:24:56 +00:00
Jeremy Stanley
fd9c80208c Replace subprocess with run_local in _find_images
In the DevStack caching script/element for Nodepool images, use
run_local instead of subprocess.check_output in the _find_images
function. The latter wasn't introduced until Python 2.7 and so won't
work on CentOS 6. The script called from this function returns
quickly and doesn't benefit from non-blocking I/O anyway.

Change-Id: I3129f1f5b3fece321ae132ea1a52b0e156e58365
2015-05-02 12:17:56 +00:00
Jeremy Stanley
1023e20f41 Determine CentOS 6 platform in cache-devstack
The centos element (which is CentOS 6.x specific) doesn't provide
DIB_RELEASE so we have to identify it another way.

Change-Id: Ibf3b25b99f03c6077538dec6c3770dc0f690e3f5
2015-05-01 20:57:05 +00:00
Ramy Asselin
4a5e37d3ed Use GIT_BASE environment variable
Use GIT_BASE variable to be consistent with:
nodepool/elements/openstack-repos/extra-data.d/50-create-repo-list

Change-Id: I2ae933aef62cb1f9009483406bb15405efaf4001
2015-03-04 17:28:25 -08:00
Clark Boylan
12dc33e30c Use sudo when manipulating git for image list
When we build our images we attempt to checkout all of the valid
devstack branches so that we can list all of the images necessary to be
cached for each branch. Unfortunately this devstack repo is owned by
root during dib and snapshot image builds. This means we must use sudo
when updating the repo (either changing branches or updating the
current branch).

Change-Id: I8cd09cfed4d586648dcbd34fa04bfc030c31ee45
2015-02-26 18:19:23 -08:00
Clark Boylan
b8932165ba Fix DIB image cache path in DIB element
The DIB cache-devstack element's early-source-repos script was using a
hardcoded cache path rather than rooting at $DIB_IMAGE_CACHE. This meant
that for this portion of the DIB builds they insisted on writing to the
current users homedir and not the overridden cache path. Root the cache
path properly against $DIB_IMAGE_CACHE so that an overridden path is
properly used.

Change-Id: I9c84de7497bd9259b5660e78e84d2adc86f9d61c
2015-01-13 14:29:53 -08:00
Jeremy Stanley
b70a27d6c4 Use PyMySQL and venv path when caching subunit2sql
Also rename the element to one which runs in the context of the
diskimage chroot rather than in the root context, and make it
executable.

Change-Id: I093d02706f2965e071e2a76ab1131ac29016d03c
2015-01-12 23:34:45 +00:00
Jeremy Stanley
05e6bfaa10 Correct tempest clone location in node prep
Change-Id: I4208637457bbf1e7562f358913ff71b9f3b0732d
2015-01-12 17:25:06 +00:00
Jenkins
1d113cbf24 Merge "Add nodepool script to preseed testrepository from subunit2sql" 2015-01-12 14:14:45 +00:00
Matthew Treinish
8fdd1ce943 Add nodepool script to preseed testrepository from subunit2sql
This commit adds a new nodepool script to use subunit2sql to preseed
testrepository with timing data to use for scheduler optimization.
This uses aggregate data from all the tests stored in the subunit2sql
db from all the test runs to generate a subunit stream with test
execute times which equal the rolling average stored in the tests
table.

This also adds a call out to the new prepare_tempest_testrepository
script in order to pre-seed tempest's testrepository with data from
the subunit2sql DB. This will enable the testr scheduler to perform
some worker balance optimization based on the average run_times from
all the previous gate runs.

Change-Id: I04404a55baf4da2745760246b8606ed3db52c03a
2015-01-07 12:25:06 -05:00
Monty Taylor
e89225e978 Support name change in devstack to debs
A short time ago, devstack change the name of its lists of debian
packages from apts to debs. In order to properly pre-cache, we should
read these.

Change-Id: Id784e2876a2cbbede650b7e101ff90f7d74ec367
2014-12-11 13:46:47 -08:00
Ian Wienand
f5c3bd5dad Initial centos7 support for build-image.sh
Add some filtering to 55-cache-devsatck-repos to handle centos7, which
actually gets setup with a DISTRO_NAME of rhel7 in devstack

Update the readme file to highlight the options for building other
images.

"DISTRO=centos7 ./tools/build-image.sh" creates a workable centos7
qcow image with this change and a d-i-b that includes
Ie24033468b78587ea87188ee1b843b26895798ff

Change-Id: Ida38cba0a303ab77432d5d354f1952e00ebfa00e
2014-10-07 10:21:00 -07:00
Anita Kuno
1d21cd635f Reorganizes project-config
This repo was created from filter branching the openstack-infra/
config repo. This process brought a lot of cruft with it in the
form of directories that we no longer need. This patch removes
that cruft so we begin with a tidier repo.

Change-Id: Ibffad1b11c0c5f84eedfb0365369f60c4961a0f3
2014-09-25 11:41:04 -04:00