Commit Graph

16 Commits

Author SHA1 Message Date
Loic Dachary
69e9b22e4b buildpackages: refactor to not require remote
Most of the flavor, sha1, tag etc. selection logic as implemented in the
packaging module of teuthology relies on remote hosts. This is complex
to tests and inconvenient because hosts must be provisionned even before
trying to figure out which packages need to be installed.

Using remote hosts is necessary when bare metal targets are used because
teuthology must adapt to the operating system already installed. The
selection logic in the context of dynamically provisionned targets is
simpler because it is defined by the job being run.

The buildpackages is refactored to use only the job configuration to
figure out which packages must be built. It makes it specific to targets
that are dynamically provisionned. It would have to be modified to query
the remote host in the case of bare metal targets.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-11-18 22:49:59 +01:00
Loic Dachary
129c5db6c9 buildpackages: 10GB is too small most of the time
Signed-off-by: Loic Dachary <loic@dachary.org>
2015-11-12 15:09:26 +01:00
Loic Dachary
baa8ea327e buildpackages: implement notcmalloc flavor
http://tracker.ceph.com/issues/13454 Fixes: #13454

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-10-13 14:56:10 +02:00
Loic Dachary
56a6e0c356 buildpackages: use _get_version instead of os_version
os_version is from the remote and will be 7.1.23 for CentOS 7
instead of the expected 7.0 for all 7.* CentOS.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-10-10 12:51:15 +02:00
Loic Dachary
4d89c9e4de buildpackages: walk the whole config tree to find sha1 to build
It is not enough to look for the first install task. In upgrade tests,
the install.upgrade task requires more packages to be built. In more
complicated tests using sequential and parallel tasks, the actual
install or install.upgrade task may be deeper in the config tree.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-10-09 10:05:58 +02:00
Loic Dachary
c103579a55 buildpackages: honour install priorities tags, branch, sha1
The install config may have contradicting tag/branch and sha1.  When
suite.py prepares the jobs, it always overrides the sha1 with whatever
default is provided on the command line with --distro and what is found
in the gitbuilder. If it turns out that the tag or the branch in the
install config task is about another sha1, it will override anyway.

Instead of obtaining the tag, branch and sha1 directly from the
packaging.GitbuilderProject object, compute them from the returned
uri_reference data member. The uri_reference is used by the install task
to fetch packages in the gitbuilders and this is what buildpackages
needs to build.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-10-09 10:03:35 +02:00
Loic Dachary
a630da7220 buildpackages: allow for concurrent build if != sha1
Signed-off-by: Loic Dachary <loic@dachary.org>
2015-10-08 12:16:30 +02:00
Loic Dachary
9db757b811 buildpackages: prefer GitbuilderProject.os_{type,version} over config.
The config['os_type'] and config['os_version'] are not always set for a given
job (for instance, in the rbd suite). When a suite runs, it relies on
default values, depending on the target Operating System and internal,
hard coded values associating ubuntu to 14.04 etc.

Instead of using config['os_{type,version}'] use the GitbuilderProject
equivalent which is set with the appropriate defaults.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-10-08 12:16:30 +02:00
Loic Dachary
204e27fecd buildpackages: flock must --close
The process run by flock must not inherit the file descriptor because
this will cause the lock to be held forever should the command survive
the call to flock. This is for instance the case for the ssh-agent.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-26 15:23:03 +02:00
Loic Dachary
78b2a9aa74 buildpackages: get Ceph git url via get_ceph_git_url()
Instead of relying on git_base_url, use the get_ceph_git_url() to obtain
the URL of the Ceph repository to use with git clone. This allows the
user to override it via the git_ceph_url configuration option and the
--git-ceph-url command line option to teuthology-openstack.

http://tracker.ceph.com/issues/11883 Refs: #11883

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-26 13:11:36 +02:00
Loic Dachary
7e3a271a89 buildpackages: make rpm packages
Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-23 21:11:26 +02:00
Loic Dachary
e38a6d69df buildpackages: build the repository and the packages
http://tracker.ceph.com/issues/13031 Fixes: #13031

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-16 23:19:34 +02:00
Loic Dachary
8c618e5645 buildpackages: re-use config from install task
So that the packages built match what the install task expects.

http://tracker.ceph.com/issues/13031 Fixes: #13031

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-15 17:37:05 +02:00
Loic Dachary
d40d8ff501 buildpackages: pep8 compliance
http://tracker.ceph.com/issues/13031 Fixes: #13031

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-15 16:16:34 +02:00
Loic Dachary
0eeb441bb0 buildpackages: build ceph packages and upload them
Import install from task.

http://tracker.ceph.com/issues/13031 Fixes: #13031

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-15 16:13:09 +02:00
Loic Dachary
2b25080d4f buildpackages: build ceph packages and upload them
Build Ceph packages from source for the required revision, os_type,
os_version and architecture and upload them to the gitbuilder
repository.

http://tracker.ceph.com/issues/13031 Fixes: #13031

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-09-15 12:01:05 +02:00