* ``ceph``: ceph branch to be used.
* ``kernel``: version of the kernel to be used.
* ``email``: email address to send the results to.
-* ``flavor``: the kernel flavor to run against
+* ``flavor``: the ceph packages shaman flavor to run against
* ``teuth``: version of teuthology to run
* ``mtype``: machine type of the run
* ``templates``: template file used for further modifying the suite (optional)
#
# {host} is 'gitbuilder_host' from .teuthology.yaml
# {proj} is the value of 'project' from the job yaml file or 'ceph'
- # {flavor} is the value of 'flavor' from the job yaml file or 'basic'
+ # {flavor} is the value of 'flavor' from the job yaml file or 'default'
# {uri} is ref/tag if 'tag' is set in the job yaml file
# or ref/branch if 'branch' is set in the job yaml file
# or sha1/sha1 if 'sha1' is set in the job yaml file
-f <flavor>, --flavor <flavor>
The ceph packages shaman flavor to run with:
('default', 'crimson', 'notcmalloc', 'jaeger')
- [default=default]
+ [default: default]
-t <branch>, --teuthology-branch <branch>
The teuthology branch to run against.
Default value is determined in the next order.
)
# when we're initializing with a remote we most likely have
# a task config, not the entire teuthology job config
- self.flavor = self.job_config.get("flavor", "basic")
+ self.flavor = self.job_config.get("flavor", "default")
self.tag = self.job_config.get("tag")
def _init_from_config(self):
"""
The base url that points at this project on gitbuilder.
- For example::
-
- http://gitbuilder.ceph.com/ceph-deb-raring-x86_64-basic/ref/master
-
:returns: A string of the base url for this project
"""
return self._get_base_url()
kernel_hash = None
else:
kernel_hash = util.get_gitbuilder_hash(
- 'kernel', self.args.kernel_branch, self.args.flavor,
+ 'kernel', self.args.kernel_branch, 'default',
self.args.machine_type, self.args.distro,
self.args.distro_version,
)
log.info("kernel sha1: {hash}".format(hash=kernel_hash))
kernel_dict = dict(kernel=dict(kdb=True, sha1=kernel_hash))
if kernel_hash != 'distro':
- kernel_dict['kernel']['flavor'] = self.args.flavor
+ kernel_dict['kernel']['flavor'] = 'default'
else:
kernel_dict = dict()
return kernel_dict
'base_yaml_paths': [],
'ceph_branch': 'master',
'machine_type': 'smithi',
- 'flavor': 'basic',
+ 'flavor': 'default',
'kernel_branch': 'testing',
'suite': 'krbd',
}
StringIO(frag2_read_output),
contextlib.closing(BytesIO())
]
- m_get_install_task_flavor.return_value = 'basic'
+ m_get_install_task_flavor.return_value = 'default'
m_get_package_versions.return_value = dict()
m_has_packages_for_distro.return_value = True
# schedule_jobs() is just neutered; check calls below
assert(count == 1)
assert runobj.base_config['suite_sha1'] == 'suite_hash'
m_has_packages_for_distro.assert_has_calls(
- [call('ceph_sha1', 'ubuntu', '14.04', 'basic', {})],
+ [call('ceph_sha1', 'ubuntu', '14.04', 'default', {})],
)
frags = (frag1_read_output, frag2_read_output)
expected_job = dict(
]
m_build_matrix.return_value = build_matrix_output
m_open.side_effect = [StringIO('field: val\n') for i in range(11)]
- m_get_install_task_flavor.return_value = 'basic'
+ m_get_install_task_flavor.return_value = 'default'
m_get_package_versions.return_value = dict()
m_has_packages_for_distro.side_effect = [
False for i in range(11)
] + [
contextlib.closing(BytesIO())
]
- m_get_install_task_flavor.return_value = 'basic'
+ m_get_install_task_flavor.return_value = 'default'
m_get_package_versions.return_value = dict()
# NUM_FAILS, then success
m_has_packages_for_distro.side_effect = \
count = runobj.schedule_suite()
assert count == 1
m_has_packages_for_distro.assert_has_calls(
- [call('ceph_sha1' + '^' * i, 'ubuntu', '14.04', 'basic', {})
+ [call('ceph_sha1' + '^' * i, 'ubuntu', '14.04', 'default', {})
for i in range(NUM_FAILS+1)]
)
m_find_git_parent.assert_has_calls(
),
],
)
- assert util.get_install_task_flavor(config) == 'basic'
+ assert util.get_install_task_flavor(config) == 'default'
def test_get_install_task_flavor_simple(self):
config = dict(
log = logging.getLogger(__name__)
CONTAINER_DISTRO = 'centos/8' # the one to check for build_complete
-CONTAINER_FLAVOR = 'basic' # basic maps to default on shaman
+CONTAINER_FLAVOR = 'default'
def fetch_repos(branch, test_name):
return resp.json()
-def package_version_for_hash(hash, flavor='basic', distro='rhel',
+def package_version_for_hash(hash, flavor='default', distro='rhel',
distro_version='8.0', machine_type='smithi'):
"""
Does what it says on the tin. Uses gitbuilder repos.
:param sha1: The sha1 hash of the ceph version.
:param os_type: The distro we want to get packages for, given
the ceph sha1. Ex. 'ubuntu', 'rhel', etc.
- :param flavor: The distro flavor
+ :param flavor: The ceph packages shaman flavor
:param package_versions: Use this optionally to use cached results of
previous calls to gitbuilder.
:returns: True, if packages are found. False otherwise.
def get_config_install(ctx, config):
config = apply_overrides(ctx, config)
log.debug('install config %s' % config)
- return [(config.get('flavor', 'basic'),
+ return [(config.get('flavor', 'default'),
config.get('tag', ''),
config.get('branch', ''),
config.get('sha1'))]
log.debug('install.upgrade config ' + str(role_config) +
' and with overrides ' + str(o))
# for install.upgrade overrides are actually defaults
- configs.append((o.get('flavor', 'basic'),
+ configs.append((o.get('flavor', 'default'),
role_config.get('tag', o.get('tag', '')),
role_config.get('branch', o.get('branch', '')),
role_config.get('sha1', o.get('sha1'))))
Determine the flavor to use.
"""
config = config or dict()
- flavor = config.get('flavor', 'basic')
+ flavor = config.get('flavor', 'default')
if config.get('path'):
# local dir precludes any other flavors
def test_kernel_hash_saya(self):
# We don't currently have these packages.
- assert suite.get_hash('kernel', 'master', 'basic', 'saya') is None
+ assert suite.get_hash('kernel', 'master', 'default', 'saya') is None
def test_all_master_branches(self):
# Don't attempt to send email
config.results_email = None
job_config = suite.create_initial_config('suite', 'master',
'master', 'master', 'testing',
- 'basic', 'centos', 'plana')
+ 'default', 'centos', 'plana')
assert ((job_config.branch, job_config.teuthology_branch,
job_config.suite_branch) == ('master', 'master', 'master'))
config.results_email = None
job_config = suite.create_initial_config('MY_SUITE', 'master',
'master', 'master', 'testing',
- 'basic', 'centos', 'plana')
+ 'default', 'centos', 'plana')
assert job_config['suite'] == 'MY_SUITE'
def test_config_kernel_section(self):
config.results_email = None
job_config = suite.create_initial_config('MY_SUITE', 'master',
'master', 'master', 'testing',
- 'basic', 'centos', 'plana')
+ 'default', 'centos', 'plana')
assert job_config['kernel']['kdb'] is True
def test_get_flavor_default(self):
config = dict()
- assert install.get_flavor(config) == 'basic'
+ assert install.get_flavor(config) == 'default'
def test_get_flavor_simple(self):
config = dict(
pytest.skip()
def _get_remote(self, arch="x86_64", system_type="deb", distro="ubuntu",
- codename="trusty", version="14.04"):
+ codename="focal", version="20.04"):
rem = Mock()
rem.system_type = system_type
rem.os.name = distro
assert expected is not None
config = dict(
os_type="ubuntu",
- os_version="14.04",
+ os_version="20.04",
sha1="sha1",
)
gp = self.klass("ceph", config)
def test_init_from_config_branch_ref(self):
config = dict(
os_type="ubuntu",
- os_version="14.04",
+ os_version="20.04",
branch='jewel',
)
gp = self.klass("ceph", config)
def test_init_from_config_tag_ref(self):
config = dict(
os_type="ubuntu",
- os_version="14.04",
+ os_version="20.04",
tag='v10.0.1',
)
gp = self.klass("ceph", config)
def test_init_from_config_tag_overrides_branch_ref(self, caplog):
config = dict(
os_type="ubuntu",
- os_version="14.04",
+ os_version="20.04",
branch='jewel',
tag='v10.0.1',
)
def test_init_from_config_branch_overrides_sha1(self, caplog):
config = dict(
os_type="ubuntu",
- os_version="14.04",
+ os_version="20.04",
branch='jewel',
sha1='sha1',
)
.test_init_from_remote_base_url(
"https://shaman.ceph.com/api/search?status=ready"
"&project=ceph&flavor=default"
- "&distros=ubuntu%2F14.04%2Fx86_64&ref=master"
+ "&distros=ubuntu%2F20.04%2Fx86_64&ref=master"
)
def test_init_from_remote_base_url_debian(self):
):
super(TestShamanProject, self).test_init_from_config_base_url(
"https://shaman.ceph.com/api/search?status=ready&project=ceph" \
- "&flavor=default&distros=ubuntu%2F14.04%2Fx86_64&sha1=sha1"
+ "&flavor=default&distros=ubuntu%2F20.04%2Fx86_64&sha1=sha1"
)
@patch('teuthology.packaging.ShamanProject._get_package_sha1')