# etc.
baseurl_template: http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}
+ # If True, teuthology-suite verifies that a package matching the
+ # desired ceph branch exists in the gitbuilder. If False, no
+ # verification is done and teuthology-suite assumes the packages
+ # are either not necessary to run the task or they are created on
+ # demand.
+ suite_verify_ceph_hash: True
+
# The OpenStack backend configuration, a dictionary interpreted as follows
#
openstack:
'koji_task_url': 'https://kojipkgs.fedoraproject.org/work/',
'baseurl_template': 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}',
'teuthology_path': None,
+ 'suite_verify_ceph_hash': True,
'openstack': {
'clone': 'git clone http://github.com/ceph/teuthology',
'user-data': 'teuthology/openstack/openstack-{os_type}-{os_version}-user-data.txt',
kernel_dict = dict()
# Get the ceph hash
- ceph_hash = get_hash('ceph', ceph_branch, kernel_flavor, machine_type,
- distro)
+ if config.suite_verify_ceph_hash:
+ ceph_hash = get_hash('ceph', ceph_branch, kernel_flavor, machine_type,
+ distro)
+ else:
+ ceph_hash = git_ls_remote('ceph', ceph_branch)
+
if not ceph_hash:
exc = BranchNotFoundError(ceph_branch, 'ceph.git')
schedule_fail(message=str(exc), name=name)
log.info("ceph sha1: {hash}".format(hash=ceph_hash))
- # Get the ceph package version
- ceph_version = package_version_for_hash(ceph_hash, kernel_flavor,
- distro, machine_type)
- if not ceph_version:
- schedule_fail("Packages for ceph hash '{ver}' not found".format(
- ver=ceph_hash), name)
- log.info("ceph version: {ver}".format(ver=ceph_version))
+ if config.suite_verify_ceph_hash:
+ # Get the ceph package version
+ ceph_version = package_version_for_hash(ceph_hash, kernel_flavor,
+ distro, machine_type)
+ if not ceph_version:
+ schedule_fail("Packages for ceph hash '{ver}' not found".format(
+ ver=ceph_hash), name)
+ log.info("ceph version: {ver}".format(ver=ceph_version))
+ else:
+ log.info('skipping ceph package verification')
if teuthology_branch and teuthology_branch != 'master':
if not git_branch_exists('teuthology', teuthology_branch):
fetch_repos=DEFAULT,
teuthology_schedule=DEFAULT,
sleep=DEFAULT,
+ get_arch=lambda x: 'x86_64',
+ git_ls_remote=lambda *args: '1234',
+ get_hash=DEFAULT,
+ package_version_for_hash=lambda *args: 'fake-9.5',
) as m:
+ config.suite_verify_ceph_hash = False
main(['--suite', suite_name,
'--suite-dir', 'teuthology/test',
'--throttle', throttle,
'--machine-type', machine_type])
m['sleep'].assert_called_with(int(throttle))
+ m['get_hash'].assert_not_called()
+
+ with patch.multiple(
+ suite,
+ fetch_repos=DEFAULT,
+ teuthology_schedule=DEFAULT,
+ sleep=DEFAULT,
+ get_arch=lambda x: 'x86_64',
+ git_ls_remote=lambda *args: '1234',
+ get_hash=DEFAULT,
+ package_version_for_hash=lambda *args: 'fake-9.5',
+ ) as m:
+ config.suite_verify_ceph_hash = True
+ m['get_hash'].return_value = '12345'
+ main(['--suite', suite_name,
+ '--suite-dir', 'teuthology/test',
+ '--throttle', throttle,
+ '--machine-type', machine_type])
+ m['sleep'].assert_called_with(int(throttle))
+ m['get_hash'].assert_called()