Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion teuthology/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ def wait_until_healthy(ctx, remote, ceph_cluster='ceph', use_sudo=False):
Wait until a Ceph cluster is healthy. Give up after 15min.
"""
testdir = get_testdir(ctx)
# when cluster is setup using ceph-deploy or ansible
# when cluster is setup using ansible
# access to admin key is readonly for ceph user
cmd = ['ceph', '--cluster', ceph_cluster, 'health']
if use_sudo:
Expand Down
9 changes: 0 additions & 9 deletions teuthology/suite/placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ def _substitute(input_dict, values_dict):
r'\(MDS_UP_LESS_THAN_MAX\)'],
'sha1': Placeholder('ceph_hash'),
},
'ceph-deploy': {
'conf': {
'client': {
'log file': '/var/log/ceph/ceph-$name.$pid.log'
},
'mon': {
}
}
},
'install': {
'ceph': {
'sha1': Placeholder('ceph_hash'),
Expand Down
60 changes: 4 additions & 56 deletions teuthology/task/install/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ def verify_package_version(ctx, config, remote):
For most cases this is for ceph, but we also install samba
for example.
"""
# Do not verify the version if the ceph-deploy task is being used to
# install ceph. Verifying the ceph installed by ceph-deploy should work,
# but the qa suites will need reorganized first to run ceph-deploy
# before the install task.
# see: http://tracker.ceph.com/issues/11248
if config.get("extras"):
log.info("Skipping version verification...")
return True
if 'repos' in config and config.get('repos'):
log.info("Skipping version verification because we have custom repos...")
return True
Expand Down Expand Up @@ -203,17 +195,6 @@ def install(ctx, config):
debs += extra_pkgs
rpms += extra_pkgs

# When extras is in the config we want to purposely not install ceph.
# This is typically used on jobs that use ceph-deploy to install ceph
# or when we are testing ceph-deploy directly. The packages being
# installed are needed to properly test ceph as ceph-deploy won't
# install these. 'extras' might not be the best name for this.
extras = config.get('extras')
if extras is not None:
debs = ['ceph-test', 'ceph-fuse',
'librados2', 'librbd1',
'python-ceph']
rpms = ['ceph-fuse', 'librbd1', 'librados2', 'ceph-test', 'python-ceph']
package_list = dict(deb=debs, rpm=rpms)
install_packages(ctx, package_list, config)
try:
Expand All @@ -225,36 +206,14 @@ def install(ctx, config):

def upgrade_old_style(ctx, node, remote, pkgs, system_type):
"""
Handle the upgrade using methods in use prior to ceph-deploy.
Handle the upgrade using methods in use prior to deploy.
"""
if system_type == 'deb':
deb._upgrade_packages(ctx, node, remote, pkgs)
elif system_type == 'rpm':
rpm._upgrade_packages(ctx, node, remote, pkgs)


def upgrade_with_ceph_deploy(ctx, node, remote, pkgs, sys_type):
"""
Upgrade using ceph-deploy
"""
dev_table = ['branch', 'tag', 'dev']
ceph_dev_parm = ''
ceph_rel_parm = ''
for entry in node.keys():
if entry in dev_table:
ceph_dev_parm = node[entry]
if entry == 'release':
ceph_rel_parm = node[entry]
params = []
if ceph_dev_parm:
params += ['--dev', ceph_dev_parm]
if ceph_rel_parm:
params += ['--release', ceph_rel_parm]
params.append(remote.name)
subprocess.call(['ceph-deploy', 'install'] + params)
remote.run(args=['sudo', 'restart', 'ceph-all'])


def upgrade_remote_to_config(ctx, config):
assert config is None or isinstance(config, dict), \
"install.upgrade only supports a dictionary for configuration"
Expand Down Expand Up @@ -393,11 +352,8 @@ def upgrade_common(ctx, config, deploy_style):
:param config: the config dict
"""

#
# __doc__ strings for upgrade and ceph_deploy_upgrade are set from
# the same string so that help(upgrade) and help(ceph_deploy_upgrade)
# look the same.
#
# __doc__ strings for upgrade are set from the same string so that
# help(upgrade) look the same.


@contextlib.contextmanager
Expand All @@ -408,14 +364,6 @@ def upgrade(ctx, config):
upgrade.__doc__ = docstring_for_upgrade.format(cmd_parameter='upgrade')


@contextlib.contextmanager
def ceph_deploy_upgrade(ctx, config):
upgrade_common(ctx, config, upgrade_with_ceph_deploy)
yield

ceph_deploy_upgrade.__doc__ = docstring_for_upgrade.format(
cmd_parameter='ceph_deploy_upgrade')

def _override_extra_system_packages(config, project, install_overrides):
teuthology.deep_merge(config, install_overrides.get(project, {}))
extra_overrides = install_overrides.get('extra_system_packages')
Expand Down Expand Up @@ -541,7 +489,7 @@ def task(ctx, config):
will be installed. The override of the sha1 has no effect.

When passed 'rhbuild' as a key, it will attempt to install an rh ceph build
using ceph-deploy
using ceph

Normally, the package management system will try to install or upgrade
specified packages as instructed. But if newer versions of these packages
Expand Down
2 changes: 1 addition & 1 deletion teuthology/task/install/redhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def install(ctx, config):

def install_pkgs(ctx, remote, version, downstream_config):
"""
Installs RH build using ceph-deploy.
Installs RH build using ceph.

:param ctx: the argparse.Namespace object
:param remote: the teuthology.orchestra.remote.Remote object
Expand Down
14 changes: 0 additions & 14 deletions teuthology/test/task/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,6 @@ def test_verify_ceph_version_failed(self, m_get_package_version,
with pytest.raises(RuntimeError):
install.verify_package_version(Mock(), config, Mock())

@patch("teuthology.task.install._get_builder_project")
@patch("teuthology.task.install.packaging.get_package_version")
def test_skip_when_using_ceph_deploy(self, m_get_package_version,
m_gitbuilder_project):
gb = Mock()
gb.version = "0.89.0"
gb.project = "ceph"
m_gitbuilder_project.return_value = gb
# ceph isn't installed because ceph-deploy would install it
m_get_package_version.return_value = None
config = dict()
config['extras'] = True
install.verify_package_version(Mock(), config, Mock())

def test_get_flavor_default(self):
config = dict()
assert install.get_flavor(config) == 'default'
Expand Down
Loading