teuthology.task.install package

Submodules

teuthology.task.install.deb module

teuthology.task.install.redhat module

teuthology.task.install.redhat.install(*args, **kwds)

Installs rh ceph on all hosts in ctx.

Parameters:
  • ctx – the argparse.Namespace object
  • config – the config dict

uses yaml defined in qa suite or in users home dir to check for supported versions and packages to install.

the format of yaml is: versions:

supported:
  • ‘1.3.0’
rpm:
mapped:
‘1.3.0’ : ‘0.94.1’
deb:
mapped:
‘1.3.0’ : ‘0.94.1’
pkgs:
rpm:
  • ceph-mon
  • ceph-osd
deb:
  • ceph-osd
  • ceph-mds
teuthology.task.install.redhat.install_deb_pkgs(ctx, remote, version, downstream_config, deb_repo, deb_gpg_key)

Setup debian repo, Install gpg key and Install on debian packages : param ctx : param remote : param downstream_config the dict object that has downstream pkg info : deb_repo - http path of downstream ubuntu repo : deb_gpg_key - gpg key for the ubuntu pkg

teuthology.task.install.redhat.install_pkgs(ctx, remote, version, downstream_config)

Installs RH build using ceph-deploy.

Parameters:
  • ctx – the argparse.Namespace object
  • remote – the teuthology.orchestra.remote.Remote object

:param downstream_config the dict object that has downstream pkg info

teuthology.task.install.redhat.set_deb_repo(remote, deb_repo, deb_gpg_key=None)

Sets up debian repo and gpg key for package verification :param remote - remote node object :param deb_repo - debian repo root path :param deb_gpg_key - gpg key for the package

teuthology.task.install.redhat.uninstall_pkgs(ctx, remote, downstream_config)

Removes Ceph from all RH hosts

Parameters:
  • ctx – the argparse.Namespace object
  • remote – the teuthology.orchestra.remote.Remote object

:param downstream_config the dict object that has downstream pkg info

teuthology.task.install.rpm module

teuthology.task.install.util module

teuthology.task.install.util.get_flavor(config)

Determine the flavor to use.

teuthology.task.install.util.ship_utilities(*args, **kwds)

Write a copy of valgrind.supp to each of the remote sites. Set executables used by Ceph in /usr/local/bin. When finished (upon exit of the teuthology run), remove these files.

Parameters:
  • ctx – Context
  • config – Configuration

Module contents

teuthology.task.install.ceph_deploy_upgrade(*args, **kwds)

” Upgrades packages for a given project.

For example:

tasks:
- install.ceph_deploy_upgrade:
     all:
        branch: end

or specify specific roles:

tasks:
- install.ceph_deploy_upgrade:
     mon.a:
        branch: end
     osd.0:
        branch: other

or rely on the overrides for the target version:

overrides:
  install:
    ceph:
      sha1: ...
tasks:
- install.ceph_deploy_upgrade:
    all:

(HACK: the overrides will only apply the sha1/branch/tag if those keys are not present in the config.)

It is also possible to attempt to exclude packages from the upgrade set:

tasks: - install.ceph_deploy_upgrade:

exclude_packages: [‘ceph-test’, ‘ceph-test-dbg’]
Parameters:
  • ctx – the argparse.Namespace object
  • config – the config dict
teuthology.task.install.get_package_list(ctx, config)
teuthology.task.install.get_upgrade_version(ctx, config, remote)
teuthology.task.install.install(*args, **kwds)

The install task. Installs packages for a given project on all hosts in ctx. May work for projects besides ceph, but may not. Patches welcomed!

Parameters:
  • ctx – the argparse.Namespace object
  • config – the config dict
teuthology.task.install.install_packages(ctx, pkgs, config)

Installs packages on each remote in ctx.

Parameters:
  • ctx – the argparse.Namespace object
  • pkgs – list of packages names to install
  • config – the config dict
teuthology.task.install.remove_packages(ctx, config, pkgs)

Removes packages from each remote in ctx.

Parameters:
  • ctx – the argparse.Namespace object
  • config – the config dict
  • pkgs – list of packages names to remove
teuthology.task.install.remove_sources(ctx, config)

Removes repo source files from each remote in ctx.

Parameters:
  • ctx – the argparse.Namespace object
  • config – the config dict
teuthology.task.install.task(*args, **kwds)

Install packages for a given project.

tasks: - install:

project: ceph branch: bar
  • install:

    project: samba branch: foo extra_packages: [‘samba’]

  • install:
    extra_packages:

    deb: [‘librados-dev’, ‘libradosstriper-dev’] rpm: [‘librados-devel’, ‘libradosstriper-devel’]

    extra_system_packages:

    deb: [‘libboost-system-dev’] rpm: [‘boost-devel’]

  • install:

    rhbuild: 1.3.0 playbook: downstream_setup.yml vars:

    yum_repos:

Overrides are project specific:

overrides:
install:
ceph:
sha1: …

Debug packages may optionally be installed:

overrides:
install:
ceph:
debuginfo: true

Default package lists (which come from packages.yaml) may be overridden:

overrides:
install:
ceph:
packages:
deb: - ceph-osd - ceph-mon rpm: - ceph-devel - rbd-fuse

When tag, branch and sha1 do not reference the same commit hash, the tag takes precedence over the branch and the branch takes precedence over the sha1.

When the overrides have a sha1 that is different from the sha1 of the project to be installed, it will be a noop if the project has a branch or tag, because they take precedence over the sha1. For instance:

overrides:
install:
ceph:
sha1: 1234

tasks: - install:

project: ceph
sha1: 4567 branch: foobar # which has sha1 4567

The override will transform the tasks as follows:

tasks: - install:

project: ceph
sha1: 1234 branch: foobar # which has sha1 4567

But the branch takes precedence over the sha1 and foobar 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

Normally, the package management system will try to install or upgrade specified packages as instructed. But if newer versions of these packages to be installed have been installed on test node, we will have to uninstall or downgrade them. To downgrade multiple packages in a single shot:

tasks: - install:

project: ceph branch: hammer downgrade_packages: [‘librados2’, ‘librbd1’]

Reminder regarding teuthology-suite side effects:

The teuthology-suite command always adds the following:

overrides:
install:
ceph:
sha1: 1234

where sha1 matches the –ceph argument. For instance if teuthology-suite is called with –ceph master, the sha1 will be the tip of master. If called with –ceph v0.94.1, the sha1 will be the v0.94.1 (as returned by git rev-parse v0.94.1 which is not to be confused with git rev-parse v0.94.1^{commit})

Parameters:
  • ctx – the argparse.Namespace object
  • config – the config dict
teuthology.task.install.upgrade(*args, **kwds)

” Upgrades packages for a given project.

For example:

tasks:
- install.upgrade:
     all:
        branch: end

or specify specific roles:

tasks:
- install.upgrade:
     mon.a:
        branch: end
     osd.0:
        branch: other

or rely on the overrides for the target version:

overrides:
  install:
    ceph:
      sha1: ...
tasks:
- install.upgrade:
    all:

(HACK: the overrides will only apply the sha1/branch/tag if those keys are not present in the config.)

It is also possible to attempt to exclude packages from the upgrade set:

tasks: - install.upgrade:

exclude_packages: [‘ceph-test’, ‘ceph-test-dbg’]
Parameters:
  • ctx – the argparse.Namespace object
  • config – the config dict
teuthology.task.install.upgrade_common(ctx, config, deploy_style)

Common code for upgrading

teuthology.task.install.upgrade_old_style(ctx, node, remote, pkgs, system_type)

Handle the upgrade using methods in use prior to ceph-deploy.

teuthology.task.install.upgrade_remote_to_config(ctx, config)
teuthology.task.install.upgrade_with_ceph_deploy(ctx, node, remote, pkgs, sys_type)

Upgrade using ceph-deploy

teuthology.task.install.verify_package_version(ctx, config, remote)

Ensures that the version of package installed is what was asked for in the config.

For most cases this is for ceph, but we also install samba for example.