]> git.apps.os.sepia.ceph.com Git - teuthology.git/log
teuthology.git
6 years agovalgrind.supp: move the whitelist file to /qa dir of ceph.git 1274/head
Radoslaw Zarzynski [Thu, 28 Mar 2019 22:13:10 +0000 (23:13 +0100)]
valgrind.supp: move the whitelist file to /qa dir of ceph.git

This change drops valgrind.supp whitelist file from teuthology
repo and alters the install task to acquire it from /qa dir of
ceph-qa-suite repository.
It's expected the commit will have sibiling in ceph.git moving
the proper valgrind.supp there.

The rationale behind the entire change is duplication of these
files between two repos, their inconsistencies and confusion.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoMerge pull request #1268 from kshtsk/wip-default-suite-branch
Zack Cerza [Wed, 20 Mar 2019 19:06:37 +0000 (13:06 -0600)]
Merge pull request #1268 from kshtsk/wip-default-suite-branch

teuthology-suite: no default value for suite branch

6 years agoteuthology-suite: no default value for suite branch 1268/head
Kyr Shatskyy [Wed, 20 Mar 2019 17:09:45 +0000 (18:09 +0100)]
teuthology-suite: no default value for suite branch

By default suite branch must be equal to ceph one.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
6 years agoMerge pull request #1267 from dmick/master
Sage Weil [Fri, 15 Mar 2019 23:48:03 +0000 (18:48 -0500)]
Merge pull request #1267 from dmick/master

task/kernel: fix Depends: parsing for dependencies with "|"

6 years agotask/kernel: fix Depends: parsing for dependencies with "|" 1267/head
Dan Mick [Fri, 15 Mar 2019 23:14:24 +0000 (16:14 -0700)]
task/kernel: fix Depends: parsing for dependencies with "|"

also make the "Checking kernel version...want" logmsg include quotes
for spotting problems more quickly

Signed-off-by: Dan Mick <dan.mick@redhat.com>
6 years agoMerge pull request #1266 from kshtsk/wip-test-repo-from-file
Zack Cerza [Thu, 14 Mar 2019 19:15:59 +0000 (13:15 -0600)]
Merge pull request #1266 from kshtsk/wip-test-repo-from-file

Read test repo from file

6 years agoteuthology-openstack: strip out unicode tags for interim test repo yaml 1266/head
Kyr Shatskyy [Mon, 4 Mar 2019 18:18:10 +0000 (19:18 +0100)]
teuthology-openstack: strip out unicode tags for interim test repo yaml

When json file loads from file for --test-repo it is converted
to u'' instead of bare str. Later yaml.dump includes unicode
tags in resulting yaml which makes teuthology-suite fail and
throw an exception.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
6 years agoteuthology-openstack: update help for --test-repo argument
Kyr Shatskyy [Fri, 1 Mar 2019 18:38:33 +0000 (19:38 +0100)]
teuthology-openstack: update help for --test-repo argument

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
6 years agoteuthology-openstack: support test repo read from file
Kyr Shatskyy [Fri, 1 Mar 2019 16:35:22 +0000 (17:35 +0100)]
teuthology-openstack: support test repo read from file

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
6 years agoAdd optional priority for --test-repo
Kyr Shatskyy [Mon, 15 Oct 2018 20:00:15 +0000 (22:00 +0200)]
Add optional priority for --test-repo

Priority can be set adding optional '!' symbol with a number between
name and url. Internally there will be a 'priority' field added
next to 'name' and 'url' fields to the yaml definition.

Usage examples:
    --test-repo 'first-repo:http://hostname.domain/no-priority/repo'
    --test-repo 'second-repo!99:http://hostname.domain/default-priority/repo'
    --test-repo 'third-repo!1:http://hostname.domain/highest-priority/repo'
    --test-repo 'fourth-repo!2:http://hostname.domain/next-priority/repo'
    --test-repo 'fifth-repo!0:http://hostname.domain/zero-priority/repo'

Notes for zypper:
    The higher the number, the lower the priority.
    No priority is equivalent to 99 or 0 priorities.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
6 years agoMerge pull request #1263 from kshtsk/wip-os-getenv
Gregory Farnum [Tue, 12 Mar 2019 23:47:04 +0000 (16:47 -0700)]
Merge pull request #1263 from kshtsk/wip-os-getenv

openstack: take defaults from environment

6 years agoopenstack: take defaults from environment 1263/head
Kyr Shatskyy [Thu, 28 Feb 2019 15:37:10 +0000 (16:37 +0100)]
openstack: take defaults from environment

This patch introduces TEUTH_ based environment variables
which can be used to avoid bulky commands while overiding
default values for some of the teuthology arguments.
Removes mandatory of --ceph option for teuthology-suite,
and defaults to 'master'.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
6 years agoMerge pull request #1265 from batrick/selinux-nagios
David Galloway [Fri, 8 Mar 2019 17:55:24 +0000 (12:55 -0500)]
Merge pull request #1265 from batrick/selinux-nagios

selinux: ignore nagios denial

6 years agoMerge pull request #1264 from tchaikov/yaml-loads
Kefu Chai [Tue, 5 Mar 2019 01:03:50 +0000 (09:03 +0800)]
Merge pull request #1264 from tchaikov/yaml-loads

ansible.py: catch yaml.YAMLError when yaml.safe_load()

Reviewed-by: David Zafman <dzafman@redhat.com>
6 years agoselinux: ignore nagios denial 1265/head
Patrick Donnelly [Mon, 4 Mar 2019 21:26:46 +0000 (13:26 -0800)]
selinux: ignore nagios denial

Got this in RHEL 7.6 testing.

Fixes: https://tracker.ceph.com/issues/38519
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agoansible.py: catch yaml.YAMLError when yaml.safe_load() 1264/head
Kefu Chai [Mon, 4 Mar 2019 16:46:24 +0000 (00:46 +0800)]
ansible.py: catch yaml.YAMLError when yaml.safe_load()

yaml.safe_load() also throws yaml.scanner.ScannerError. so use
yaml.YAMLError to cover them all. see
https://pyyaml.org/wiki/PyYAMLDocumentation .

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #1259 from kshtsk/wip-mysqlclient
kshtsk [Wed, 27 Feb 2019 22:51:26 +0000 (23:51 +0100)]
Merge pull request #1259 from kshtsk/wip-mysqlclient

python-cov: update python mysql dependency

6 years agoMerge pull request #1258 from kshtsk/wip-no-nuke
kshtsk [Thu, 14 Feb 2019 12:23:42 +0000 (13:23 +0100)]
Merge pull request #1258 from kshtsk/wip-no-nuke

openstack: fix all volumes nuke

6 years agoopenstack: fix all volumes nuke 1258/head
Kyr Shatskyy [Wed, 6 Feb 2019 23:48:04 +0000 (00:48 +0100)]
openstack: fix all volumes nuke

Do not allow teuthology-nuke to delete all volumes on openstack.

There is a bug on some openstack clients that --name option
does not work correctly for 'openstack volume list' in contrast
to 'openstack server list' and lists all available volumes
ignoring '--name' option at all.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
6 years agoMerge pull request #1255 from kshtsk/wip-reconnect-timeout
vasukulkarni [Thu, 14 Feb 2019 01:01:16 +0000 (17:01 -0800)]
Merge pull request #1255 from kshtsk/wip-reconnect-timeout

orchestra: fix retry and socket timeout misconception

6 years agopython-cov: update python mysql dependency 1259/head
Kyr Shatskyy [Mon, 11 Feb 2019 15:20:14 +0000 (16:20 +0100)]
python-cov: update python mysql dependency

Signed-off-by: Kyr <kyrylo.shatskyy@suse.com>
6 years agoMerge pull request #1257 from kshtsk/fix-test-repo-utils
kshtsk [Mon, 11 Feb 2019 14:30:57 +0000 (15:30 +0100)]
Merge pull request #1257 from kshtsk/fix-test-repo-utils

test_repo_utils: fix shared temporary directory

6 years agotest_repo_utils: fix shared temporary directory 1257/head
Kyr Shatskyy [Mon, 11 Feb 2019 07:37:28 +0000 (08:37 +0100)]
test_repo_utils: fix shared temporary directory

Signed-off-by: Kyr <kyrylo.shatskyy@suse.com>
6 years agoorchestra: fix retry and socket timeouts misconception 1255/head
Kyr Shatskyy [Mon, 4 Feb 2019 20:08:26 +0000 (21:08 +0100)]
orchestra: fix retry and socket timeouts misconception

Fix retry and socket timeouts misconception for reconnect.
Add default sleep time as argument to the signature.

Signed-off-by: Kyr <kyrylo.shatskyy@gmail.com>
6 years agoMerge pull request #1254 from kshtsk/wip-dump-console-log
kshtsk [Tue, 5 Feb 2019 11:41:21 +0000 (12:41 +0100)]
Merge pull request #1254 from kshtsk/wip-dump-console-log

Dump console log if ssh_keyscan failed

6 years agoMerge pull request #1253 from ceph/wip-valgrind-whitelist
Gregory Farnum [Tue, 5 Feb 2019 07:51:24 +0000 (23:51 -0800)]
Merge pull request #1253 from ceph/wip-valgrind-whitelist

valgrind.supp: whitelist something in glibc

6 years agoopenstack: dump console log if ssh_keyscan failed 1254/head
Kyr Shatskyy [Mon, 4 Feb 2019 18:07:40 +0000 (19:07 +0100)]
openstack: dump console log if ssh_keyscan failed

Dump server's console log if ssh_keyscan failed

Signed-off-by: Kyr <kyrylo.shatskyy@gmail.com>
6 years agomisc: ssh_keyscan_wait should use _ssh_keyscan
Kyr Shatskyy [Mon, 4 Feb 2019 17:56:34 +0000 (18:56 +0100)]
misc: ssh_keyscan_wait should use _ssh_keyscan

After ssh_keyscan refactoring ssh_keyscan_wait should be using
the _ssh_keyscan instead.

Signed-off-by: Kyr <kyrylo.shatskyy@suse.com>
6 years agomisc: ssh_keyscan_wait should not raise any exceptions
Kyr Shatskyy [Mon, 4 Feb 2019 17:50:58 +0000 (18:50 +0100)]
misc: ssh_keyscan_wait should not raise any exceptions

The ssh_keyscan_wait raises exception MaxWhileTries while
it should return False.

Signed-off-by: Kyr <kyrylo.shatskyy@suse.com>
6 years agoMerge pull request #1256 from kshtsk/fix-f632
kshtsk [Mon, 4 Feb 2019 23:08:46 +0000 (00:08 +0100)]
Merge pull request #1256 from kshtsk/fix-f632

Fix flake8 pytest F632 errors

6 years agoFix flake8 pytest F632 errors 1256/head
Kyr Shatskyy [Mon, 4 Feb 2019 18:22:45 +0000 (19:22 +0100)]
Fix flake8 pytest F632 errors

Signed-off-by: Kyr <kyrylo.shatskyy@suse.com>
6 years agovalgrind.supp: whitelist something in glibc 1253/head
Sage Weil [Thu, 24 Jan 2019 23:03:11 +0000 (17:03 -0600)]
valgrind.supp: whitelist something in glibc

  <kind>Leak_PossiblyLost</kind>
  <xwhat>
    <text>7 bytes in 1 blocks are possibly lost in loss record 20 of 33,344</text>
    <leakedbytes>7</leakedbytes>
    <leakedblocks>1</leakedblocks>
  </xwhat>
  <stack>
    <frame>
      <ip>0xA811C23</ip>
      <obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
      <fn>malloc</fn>
      <dir>/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc</dir>
      <file>vg_replace_malloc.c</file>
      <line>299</line>
    </frame>
    <frame>
      <ip>0xE709809</ip>
      <obj>/usr/lib64/libc-2.17.so</obj>
      <fn>strdup</fn>
    </frame>
    <frame>
      <ip>0xFC49444</ip>
      <obj>/usr/lib64/libnl-3.so.200.23.0</obj>
      <fn>__trans_list_add</fn>
    </frame>
    <frame>
      <ip>0xF9E07E0</ip>
      <obj>/usr/lib64/libnl-route-3.so.200.23.0</obj>
    </frame>
    <frame>
      <ip>0x9BF7B02</ip>
      <obj>/usr/lib64/ld-2.17.so</obj>
      <fn>_dl_init</fn>
    </frame>
    <frame>
      <ip>0x9BE9069</ip>
      <obj>/usr/lib64/ld-2.17.so</obj>
    </frame>
    <frame>
      <ip>0x5</ip>
    </frame>
    <frame>
      <ip>0x1FFF000CA2</ip>
    </frame>
    <frame>
      <ip>0x1FFF000CAB</ip>
    </frame>
    <frame>
      <ip>0x1FFF000CAE</ip>
    </frame>
    <frame>
      <ip>0x1FFF000CB8</ip>
    </frame>
    <frame>
      <ip>0x1FFF000CBD</ip>
    </frame>
    <frame>
      <ip>0x1FFF000CC0</ip>
    </frame>
  </stack>
</error>

On centos 7.4

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #1250 from tchaikov/wip-sphinx-reformat
Gregory Farnum [Mon, 21 Jan 2019 21:26:06 +0000 (13:26 -0800)]
Merge pull request #1250 from tchaikov/wip-sphinx-reformat

task: reformat the docstring for sphinx

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
6 years agoMerge pull request #1251 from kshtsk/wip-matrix-tostr
kshtsk [Mon, 21 Jan 2019 18:41:48 +0000 (19:41 +0100)]
Merge pull request #1251 from kshtsk/wip-matrix-tostr

Fix matrix dump tostr() method

6 years agoFix matrix dump tostr() method 1251/head
Kyr Shatskyy [Tue, 15 Jan 2019 14:01:24 +0000 (15:01 +0100)]
Fix matrix dump tostr() method

Addresses issue while trying to dump matrix object:

  AttributeError: Base instance has no attribute '__getitem__'

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
6 years agotask: reformat the docstring for sphinx 1250/head
Kefu Chai [Mon, 21 Jan 2019 04:20:33 +0000 (12:20 +0800)]
task: reformat the docstring for sphinx

the code block should start with `::`, and should be indented.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #1247 from kshtsk/wip-allow-runtime-logging-for-sh
kshtsk [Thu, 17 Jan 2019 11:23:19 +0000 (12:23 +0100)]
Merge pull request #1247 from kshtsk/wip-allow-runtime-logging-for-sh

orchestra: allow runtime logging for sh

6 years agoorchestra: allow runtime logging for sh 1247/head
Kyr Shatskyy [Thu, 3 Jan 2019 07:48:07 +0000 (08:48 +0100)]
orchestra: allow runtime logging for sh

When run.run is used with 'stdout' argument, the output of run command
is read to the given stream and logged with corresponding level only after
completion, which is different from the default behaviour. This 'hides'
useful information when, for example, the command is hung or stuck.
Aso it is usually handy when there are some data can be found
in the log for a prolonged command execution during runtime.

This patch addresses the issue.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
6 years agoMerge pull request #1246 from tchaikov/wip-downgrade
Kefu Chai [Thu, 3 Jan 2019 01:38:57 +0000 (09:38 +0800)]
Merge pull request #1246 from tchaikov/wip-downgrade

task/install: assert on installed_version > downgrade_version

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agotask/install: assert on installed_version > downgrade_version 1246/head
Kefu Chai [Mon, 31 Dec 2018 08:07:26 +0000 (16:07 +0800)]
task/install: assert on installed_version > downgrade_version

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #1245 from tchaikov/wip-downgrade-packages
Kefu Chai [Sat, 22 Dec 2018 01:36:42 +0000 (09:36 +0800)]
Merge pull request #1245 from tchaikov/wip-downgrade-packages

task/install: populate "downgrade_packages" to nested_config

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agotask/install: populate "downgrade_packages" to nested_config 1245/head
Kefu Chai [Fri, 21 Dec 2018 07:17:09 +0000 (15:17 +0800)]
task/install: populate "downgrade_packages" to nested_config

- populate "downgrade_packages" to `nested_config` in `task()`.
  otherwise, the "downgrade_packages" is invisible to the `install()`
  function.
- also print logging message before downgrading packages.
- cleanup rpm._downgrade_packages(), no need to format `downgrade_cmd`.
  it's already formated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #1244 from tchaikov/wip-install-downgrade-packages
Kefu Chai [Thu, 13 Dec 2018 03:01:00 +0000 (11:01 +0800)]
Merge pull request #1244 from tchaikov/wip-install-downgrade-packages

task/install: add "downgrade_packages" option for "install" task

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agotask/install: add "downgrade_packages" option for "install" task 1244/head
Kefu Chai [Tue, 11 Dec 2018 12:19:08 +0000 (20:19 +0800)]
task/install: add "downgrade_packages" option for "install" task

in rados/thrash-old-clients, hammer or jewel packages is installed. but
yum does not allow downgrade a package by default, if a newer version is
already installed. in this case, librbd1 and librados2 are installed as
dependencies of qemu-kvm. their version is 1:10.2.5-4.el7 at the time of
writing in CentOS/RHEL 7.5. so if we want to install librbd1 or
librados2 from jewel, yum will simply consider the requirement is
already fulfilled and hence do nothing. if we want to install
ceph-radosgw from jewel, yum will fail, as ceph-radosgw depends on
librados2 and other Ceph packages of the same version from jewel. but
librbd1 and librados2 have been already installed. the error message
looks like:

Error: Package: 1:ceph-common-0.94.10-87.g116a558.el7.x86_64 (Ceph)
           Requires: librados2 = 1:0.94.10-87.g116a558.el7
           Installed: 1:librados2-10.2.5-4.el7.x86_64 (@base)
               librados2 = 1:10.2.5-4.el7
           Available: 1:librados2-0.94.10-87.g116a558.el7.x86_64 (Ceph)
               librados2 = 1:0.94.10-87.g116a558.el7

so we need to downgrade librbd1 and librados2 first.

in this change, "downgrade_package" option is added for "install" task,
so we can specify packages to be downgraded to given version, these
packages won't be installed twice if they are also specified by
"install" task elsewhere to be installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotask/install: define "project" before using it
Kefu Chai [Tue, 11 Dec 2018 09:31:08 +0000 (17:31 +0800)]
task/install: define "project" before using it

no need to define `project` at the beginning of install(), we can
just use `config.get('project', 'ceph')`. better readability this way,
as we will reference `ceph` in the same expression.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #1243 from tchaikov/wip-install-pkg-order
Kefu Chai [Tue, 11 Dec 2018 01:30:46 +0000 (09:30 +0800)]
Merge pull request #1243 from tchaikov/wip-install-pkg-order

task/install: keep the order of pkgs to be installed

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
6 years agotask/install: keep the order of pkgs to be installed 1243/head
Kefu Chai [Mon, 10 Dec 2018 14:50:38 +0000 (22:50 +0800)]
task/install: keep the order of pkgs to be installed

before this change, the package list to be installed are ordered by
the hash function used by set().

after this change, the order of packages are not changed. so we can
ensure the order of package installation is the identical to that
of package list in yaml.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #1241 from ceph/wip-job-id
vasukulkarni [Mon, 3 Dec 2018 23:32:42 +0000 (15:32 -0800)]
Merge pull request #1241 from ceph/wip-job-id

Remove unused 'machine_type' parameter from kill_job()

6 years agoMerge pull request #1194 from adamwg/no-validate-refs
vasukulkarni [Mon, 3 Dec 2018 23:32:21 +0000 (15:32 -0800)]
Merge pull request #1194 from adamwg/no-validate-refs

Add no-validate-refs option to teuthology-suite

6 years agoMerge pull request #1239 from ceph/wip-addrvec
Sage Weil [Fri, 30 Nov 2018 19:18:01 +0000 (13:18 -0600)]
Merge pull request #1239 from ceph/wip-addrvec

misc: optionally bind to v1+v2 addrs for mons

6 years agoMerge pull request #1237 from ceph/wip-rhel8
Zack Cerza [Fri, 30 Nov 2018 18:42:13 +0000 (11:42 -0700)]
Merge pull request #1237 from ceph/wip-rhel8

opsys: Add RHEL8

6 years agoMerge pull request #1238 from ceph/wip-instrument-import
Zack Cerza [Fri, 30 Nov 2018 18:41:24 +0000 (11:41 -0700)]
Merge pull request #1238 from ceph/wip-instrument-import

run_tasks.py: log the right ImportError message

6 years agoRemove unused 'machine_type' parameter from kill_job() 1241/head
Shilpa Jagannath [Wed, 28 Nov 2018 07:44:13 +0000 (13:14 +0530)]
Remove unused 'machine_type' parameter from kill_job()

Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
6 years agomisc: optionally bind to v1+v2 addrs for mons 1239/head
Sage Weil [Mon, 26 Nov 2018 17:59:51 +0000 (11:59 -0600)]
misc: optionally bind to v1+v2 addrs for mons

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agorun_tasks.py: allow _import to raise the right ImportError 1238/head
Nathan Cutler [Thu, 22 Nov 2018 11:59:48 +0000 (12:59 +0100)]
run_tasks.py: allow _import to raise the right ImportError

It turns out it's possible for a file qa/tasks/foo.py to exist,
yet importing it still raises an ImportError because it references a
non-existent symbol.

In this case, teuthology was clobbering the real ImportError with its
own bogus text.

Fixes: http://tracker.ceph.com/issues/37370
Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agoAdd validate-sha1 option to teuthology-suite 1194/head
Adam Wolfe Gordon [Mon, 23 Jul 2018 22:28:05 +0000 (16:28 -0600)]
Add validate-sha1 option to teuthology-suite

Allow users to skip validation of SHA1s passed to -S when submitting
jobs via teuthology-suite. This is useful when testing against
non-GitHub repos, since teuthology can't validate refs for a plain git
repository.

Signed-off-by: Adam Wolfe Gordon <awg@digitalocean.com>
6 years agoMerge PR #1234 into master 1240/head
Patrick Donnelly [Wed, 21 Nov 2018 19:40:26 +0000 (11:40 -0800)]
Merge PR #1234 into master

* refs/pull/1234/head:
only pass system errors to hub handler
small refactor of bash code

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoopsys: Add RHEL8 1237/head
David Galloway [Tue, 20 Nov 2018 20:04:53 +0000 (15:04 -0500)]
opsys: Add RHEL8

Signed-off-by: David Galloway <dgallowa@redhat.com>
6 years agoonly pass system errors to hub handler 1234/head
Patrick Donnelly [Fri, 9 Nov 2018 19:31:04 +0000 (11:31 -0800)]
only pass system errors to hub handler

Fixes: http://tracker.ceph.com/issues/36731
Code suggested/contributed by Kefu.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agosmall refactor of bash code
Patrick Donnelly [Fri, 9 Nov 2018 19:26:45 +0000 (11:26 -0800)]
small refactor of bash code

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agoMerge pull request #1236 from ceph/wip-netaddr
Yuri Weinstein [Wed, 14 Nov 2018 16:19:43 +0000 (08:19 -0800)]
Merge pull request #1236 from ceph/wip-netaddr

ceph_ansible: Install netaddr

6 years agoceph_ansible: Install netaddr 1236/head
David Galloway [Tue, 13 Nov 2018 20:56:44 +0000 (15:56 -0500)]
ceph_ansible: Install netaddr

See https://github.com/ceph/ceph-ansible/pull/3199

Signed-off-by: David Galloway <dgallowa@redhat.com>
6 years agoMerge pull request #1230 from tchaikov/wip-better-remote-run
Kefu Chai [Mon, 12 Nov 2018 00:09:23 +0000 (08:09 +0800)]
Merge pull request #1230 from tchaikov/wip-better-remote-run

@zmc @smithfarm gents, i've updated the change to address the concerns. if no objections, i'd like merge as it is in two days.

6 years agoMerge pull request #1235 from ceph/wip-suppress-cpython
Sage Weil [Sat, 10 Nov 2018 20:11:08 +0000 (14:11 -0600)]
Merge pull request #1235 from ceph/wip-suppress-cpython

valgind: ignore all leaks relating to CPython code

6 years agovalgind: ignore all leaks relating to CPython code 1235/head
Sage Weil [Fri, 9 Nov 2018 14:53:03 +0000 (08:53 -0600)]
valgind: ignore all leaks relating to CPython code

Yes, this is a big hammer, and we are ignoring a lot.  However, it is a
HUGE step forward to what we do now, which is not check for ceph-mgr
leaks at all.

By adding this suppress I found and fixed 3 separate ceph-mgr leaks.  This
will let us prevent others (in non-Py code) from being introduced.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #1231 from kshtsk/wip-shortname-logging-for-ip
Gregory Farnum [Fri, 2 Nov 2018 20:07:23 +0000 (13:07 -0700)]
Merge pull request #1231 from kshtsk/wip-shortname-logging-for-ip

Fix ipv4 and ipv6 address logging for Remote.run

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
6 years agoMerge pull request #1233 from kshtsk/wip-remote-sh
Gregory Farnum [Fri, 2 Nov 2018 20:03:50 +0000 (13:03 -0700)]
Merge pull request #1233 from kshtsk/wip-remote-sh

orchestra: add remote.sh commands analogous to misc.sh

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
6 years agoorchestra: add remote.sh commands analogous to misc.sh 1233/head
Kyr Shatskyy [Tue, 30 Oct 2018 13:17:05 +0000 (14:17 +0100)]
orchestra: add remote.sh commands analogous to misc.sh

Adds a remote.sh similar to misc.sh, in fact a shortcut for remote.run,
but return output instead of proc
Example:
    my_name = Remote('127.0.0.1').sh('whoami')

Adds a remote.sh_file run a script as file on a remote with or without sudo
Example 1: Run python script
    Remote('127.0.0.1').sh_file("#!/usr/bin/env python3\n"
                                "import sys\n"
                                "print(sys.version_info)")
Example 2: Run script as root
    Remote('user@host.domain').sh_file("whoami", sudo=True,
                                       label="who-am-i-for-the-real")
Example 3: Run script as other user
    Remote('user@host.domain').sh_file("whoami", sudo='nobody', )

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
6 years agoMerge pull request #1228 from zenglg/master
vasukulkarni [Mon, 29 Oct 2018 18:41:32 +0000 (11:41 -0700)]
Merge pull request #1228 from zenglg/master

Fix setenforce failed while selinux is disabled

6 years agoFix ipv4 and ipv6 address logging for Remote.run 1231/head
Kyrylo Shatskyy [Sun, 28 Oct 2018 17:56:14 +0000 (18:56 +0100)]
Fix ipv4 and ipv6 address logging for Remote.run

The Remote class does not respect ip addresses
when it comes to define shortnames. As a result,
the hostname is not shown correctly in the log.
For ipv4 it only shows first number of the octet.
For ipv6 it even does not allow to proceed,
and raises exception in orchestra.run.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
6 years agoorchestra.run: log the ssh command without prefix 1230/head
Kefu Chai [Fri, 26 Oct 2018 06:18:34 +0000 (14:18 +0800)]
orchestra.run: log the ssh command without prefix

run() also supports single string, but if we pass a longstring literal
which contains "\n", it renders log difficult to read.
in this change, multi-line command is logged in multiple lines,
and print the "prefix" in the first line, then print the command in
following lines without "prefix".

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
6 years agotask/install: run install commands in a concatenated string
Kefu Chai [Thu, 25 Oct 2018 14:01:14 +0000 (22:01 +0800)]
task/install: run install commands in a concatenated string

this improve the readabiliy of long script.

FWIW, the `arg` will be passed as the `command` parameter of
paramiko.SSHClient.exec_command() if it is a `basestring`.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #1229 from tchaikov/wip-yum-install
Kefu Chai [Thu, 25 Oct 2018 12:45:36 +0000 (20:45 +0800)]
Merge pull request #1229 from tchaikov/wip-yum-install

task/install: run 'yum ... install' the right way

Reviewed-by: Nathan Cutler <ncutler@suse.com>
6 years agotask/install: run 'yum ... install' the right way 1229/head
Kefu Chai [Thu, 25 Oct 2018 11:25:53 +0000 (19:25 +0800)]
task/install: run 'yum ... install' the right way

after cd1cef6, we install rpm packages like

2018-10-25T06:31:33.578 INFO:teuthology.orchestra.run.smithi076:Running:
"sudo yum -y '' install '' '' libcephfs_jni1"
...
2018-10-25T06:31:34.180
INFO:teuthology.orchestra.run.smithi076.stderr:No such command: . Please
use /bin/yum --help
2018-10-25T06:31:34.193 DEBUG:teuthology.orchestra.run:got remote
process result: 1

which fails the qa run on rpm based distros.

in this change, the command line args are passed in itertools.chain(),
because orchestra.run.quote() takes an iterable which contains string or
Raw.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoFix setenforce failed while selinux is disabled 1228/head
Linggang Zeng [Thu, 25 Oct 2018 06:49:03 +0000 (14:49 +0800)]
Fix setenforce failed while selinux is disabled

Signed-off-by: Linggang Zeng <linggang.zeng@easystack.cn>
6 years agoMerge pull request #1218 from kshtsk/wip-test-repo
Zack Cerza [Thu, 25 Oct 2018 01:07:32 +0000 (19:07 -0600)]
Merge pull request #1218 from kshtsk/wip-test-repo

Add custom repos before installing rpm packages

6 years agoMerge pull request #1227 from rjfd/wip-jwt-dependency
Zack Cerza [Wed, 24 Oct 2018 22:01:59 +0000 (16:01 -0600)]
Merge pull request #1227 from rjfd/wip-jwt-dependency

requirements.txt: add JWT dependency required by ceph-dashboard tests

6 years agoMerge pull request #1224 from ceph/wip-36522
Sage Weil [Tue, 23 Oct 2018 13:49:01 +0000 (08:49 -0500)]
Merge pull request #1224 from ceph/wip-36522

valgrind: suppress __libc_csu_init leaks

6 years agorequirements.txt: add JWT dependency required by ceph-dashboard tests 1227/head
Ricardo Dias [Tue, 23 Oct 2018 06:50:16 +0000 (07:50 +0100)]
requirements.txt: add JWT dependency required by ceph-dashboard tests

Signed-off-by: Ricardo Dias <rdias@suse.com>
6 years agoMerge pull request #1225 from ceph/wip-36499
Gregory Farnum [Tue, 23 Oct 2018 05:15:03 +0000 (22:15 -0700)]
Merge pull request #1225 from ceph/wip-36499

kernel: Update kernel using `DEBIAN_FRONTEND noninteractive`

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
6 years agovalgrind: suppress __libc_csu_init leaks 1224/head
Sage Weil [Fri, 19 Oct 2018 14:08:26 +0000 (09:08 -0500)]
valgrind: suppress __libc_csu_init leaks

Fixes: http://tracker.ceph.com/issues/36522
6 years agokernel: Update kernel using `DEBIAN_FRONTEND noninteractive` 1225/head
David Galloway [Fri, 19 Oct 2018 12:23:34 +0000 (08:23 -0400)]
kernel: Update kernel using `DEBIAN_FRONTEND noninteractive`

Fixes: https://tracker.ceph.com/issues/36499
Signed-off-by: David Galloway <dgallowa@redhat.com>
6 years agoopenstack: add --test-repo CLI option 1218/head
Kyr Shatskyy [Thu, 26 Oct 2017 16:15:41 +0000 (18:15 +0200)]
openstack: add --test-repo CLI option

Add custom repos before installing rpm packages on test nodes.
Repository can be specified as a NAME:URL pair. Several repos
can be provided by specifying the option multiple times.
For example,
    --test-repo foo:http://example.com/repo/foo \
    --test-repo bar:http://example.com/repo/bar

gives two test package repositories named "foo" and "bar".

Conflicts:
scripts/openstack.py
teuthology/openstack/__init__.py
teuthology/orchestra/opsys.py
teuthology/task/install/rpm.py

6 years agoinstall: rpm: only one option per variable
Nathan Cutler [Wed, 30 Aug 2017 10:18:30 +0000 (12:18 +0200)]
install: rpm: only one option per variable

Although the variables are entitled, e.g., "pkg_mng_opts" they
really can only contain at most one option. Here's what happens
when they contain more than one:

Running: "sudo zypper '-n --no-gpg-checks' install --capability --no-recommends ceph-radosgw"
stderr:Unknown option ' '
stderr:Unknown option '-'
stderr:Unknown option '-'

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agotask: install: rpm: zypper install with --no-recommends
Nathan Cutler [Mon, 5 Jun 2017 17:55:23 +0000 (19:55 +0200)]
task: install: rpm: zypper install with --no-recommends

Since teuthology is used to automate CI testing, it is undesirable to
install anything more than is necessary to run the tests.

Fixes: https://github.com/SUSE/teuthology/issues/84
Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agoOverride failing package signature checks
Nathan Cutler [Wed, 30 Aug 2017 09:55:15 +0000 (11:55 +0200)]
Override failing package signature checks

The RPMs built by teuthology's buildpackages task are not signed and
after a recent zypper update the install task started to fail with

File 'repomd.xml' from repository 'ceph-rpm-under-test' is unsigned, continue? [yes/no] (no): no
Error building the cache: [ceph-rpm-under-test|http://149.202.175.91/ceph-rpm-sle12-x86_64-basic/sha1/3804e807353c9d125753b1cf4f6405f79db83d4e/x86_64] Valid metadata not found at specified URL

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agopackaging: add ceph-rpm-under-test zypper repo with high priority
Nathan Cutler [Thu, 11 May 2017 20:18:55 +0000 (22:18 +0200)]
packaging: add ceph-rpm-under-test zypper repo with high priority

Otherwise the ceph packages from OBS are preferred because RPM evaluates, e.g.,
12.0.2+git.1493341348.9148e53 as a higher version number than
12.0.2-276.gf27d4b00ed.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agopackaging: call the zypper repo ceph-rpm-under-test
Nathan Cutler [Sat, 11 Feb 2017 08:21:16 +0000 (09:21 +0100)]
packaging: call the zypper repo ceph-rpm-under-test

The zypper repo must have a name/alias and "ceph-rpm-under-test" seems better
than just "ceph-rpm"; it's a repo containing the ceph RPMs that are being
tested.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agopackaging: SUSEify GitbuilderProject._remove_rpm_repo()
Nathan Cutler [Sat, 11 Feb 2017 04:46:46 +0000 (05:46 +0100)]
packaging: SUSEify GitbuilderProject._remove_rpm_repo()

When a job completes, all Ceph packages installed are removed and then the repo
is removed as well. Repo removal fails with:

    Running: 'sudo yum -y erase ceph-release'
    sudo: yum: command not found

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agopackaging: add repo instead of installing ceph-release
Nathan Cutler [Thu, 9 Feb 2017 21:54:38 +0000 (22:54 +0100)]
packaging: add repo instead of installing ceph-release

The ceph-release RPM probably doesn't do what we want, anyway.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agoopsys.py: make from_os_release support SUSE
Nathan Cutler [Tue, 28 Feb 2017 11:11:42 +0000 (12:11 +0100)]
opsys.py: make from_os_release support SUSE

Fixes: #47
Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agoEnable SUSE Linux Enterprise as a teuthology target
Kyr Shatskyy [Wed, 10 Oct 2018 04:25:39 +0000 (06:25 +0200)]
Enable SUSE Linux Enterprise as a teuthology target

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agosetup: do not set ceph_qa_suite_git_url in ~/.teuthology.yaml
Nathan Cutler [Fri, 10 Feb 2017 14:38:06 +0000 (15:38 +0100)]
setup: do not set ceph_qa_suite_git_url in ~/.teuthology.yaml

When this value is set, it is necessary to explicitly give --suite-repo and
--suite-branch. We would rather have the defaults for these come from
--ceph-repo and --ceph.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agoopenstack: switch to --{ceph,suite}-repo
Loic Dachary [Fri, 10 Feb 2017 10:45:37 +0000 (11:45 +0100)]
openstack: switch to --{ceph,suite}-repo

--ceph-git-url and --ceph-qa-suite-git-url are now
arguments of teuthology-suite but were named --ceph-repo and
--suite-repo instead.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
6 years agoopenstack: sync with new teuthology-suite arguments
Loic Dachary [Fri, 10 Feb 2017 10:44:29 +0000 (11:44 +0100)]
openstack: sync with new teuthology-suite arguments

Signed-off-by: Loic Dachary <ldachary@redhat.com>
6 years agoopenstack: split argparse arguments
Loic Dachary [Sun, 6 Dec 2015 21:50:52 +0000 (22:50 +0100)]
openstack: split argparse arguments

So that it can be re-used by scripts that need to include part of the parser.

Signed-off-by: Loic Dachary <loic@dachary.org>
6 years agoopenstack: ensure non-interactivity of custom YAML upload ssh
Nathan Cutler [Fri, 23 Jun 2017 12:16:16 +0000 (14:16 +0200)]
openstack: ensure non-interactivity of custom YAML upload ssh

Fixes: https://github.com/SUSE/teuthology/issues/90
Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agoopenstack: upload absolute paths to remote teuthology machine
Nathan Cutler [Wed, 15 Mar 2017 14:12:37 +0000 (15:12 +0100)]
openstack: upload absolute paths to remote teuthology machine

If any absolute paths are given on the teuthology-openstack command line,
assume they are local YAML files and upload them to the remote teuthology
machine before running teuthology-suite.

If the local YAML file (absolute path) is PATH, the remote
path will be /home/ubuntu/yaml/$PATH. The remote file is clobbered if
it already exists.

Fixes: https://github.com/SUSE/teuthology/issues/46
Fixes: https://github.com/SUSE/teuthology/issues/56
Signed-off-by: Nathan Cutler <ncutler@suse.com>
6 years agoMerge pull request #1222 from kshtsk/wip-fix-mock-is-not-iterable
Zack Cerza [Thu, 18 Oct 2018 22:06:01 +0000 (16:06 -0600)]
Merge pull request #1222 from kshtsk/wip-fix-mock-is-not-iterable

tests: use dict() instead Mock() to test config

6 years agoMerge pull request #1223 from kshtsk/wip-run-config-log-level
Gregory Farnum [Wed, 17 Oct 2018 15:03:10 +0000 (08:03 -0700)]
Merge pull request #1223 from kshtsk/wip-run-config-log-level

Increase log level to 'info' of run config

Reviewed-by: Greg Farnum <gfarnum@redhat.com>