]> git.apps.os.sepia.ceph.com Git - teuthology.git/log
teuthology.git
5 years agorepo_utils: support github refs for branches 1339/head
Kyr Shatskyy [Tue, 22 Oct 2019 09:44:11 +0000 (11:44 +0200)]
repo_utils: support github refs for branches

This adds possibility to checkout github pr providing
special purpose ref spec (like refs/pull/X/merge and
refs/pull/X/head) as branch parameter to teuthology,
for example, "teuthology-suite -t".

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agomisc: add cwd and env to sh
Kyr Shatskyy [Tue, 22 Oct 2019 09:13:41 +0000 (11:13 +0200)]
misc: add cwd and env to sh

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agoMerge pull request #1335 from ceph/wip-wwn2
Nathan Cutler [Thu, 17 Oct 2019 13:09:29 +0000 (15:09 +0200)]
Merge pull request #1335 from ceph/wip-wwn2

misc: temporary fix for "No space left on device" errors

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
5 years agomisc: temporary fix for "No space left on device" errors 1335/head
Nathan Cutler [Wed, 16 Oct 2019 21:04:42 +0000 (23:04 +0200)]
misc: temporary fix for "No space left on device" errors

41a13eca480e38cfeeba7a180b4516b90598c39b fixed a longstanding bug that the lab
was relying on. Before the bug was fixed, the get_wwn_id_map function was doing:

    try:
        r = remote.run(
            args=[
                'ls',
                '-l',
                '/dev/disk/by-id/wwn-*',
            ],
            stdout=StringIO(),
        )
        stdout = r.stdout.getvalue()
    except Exception:
        log.info('Failed to get wwn devices! Using /dev/sd* devices...')
        return dict((d, d) for d in devs)

The bug was that "remote.run" was putting single quotes around the string
"/dev/disk/by-id/wwn-*" because it wasn't enclosed in Raw(...). The single
quotes were causing the command to fail, triggering the except clause, and that
was happening 100% of the time.

The fix in 41a13eca480e38cfeeba7a180b4516b90598c39b caused the command to start
succeeding, which caused execution to continue. As a result, MON stores and
OSDs started getting created on the wrong devices, and tests that were
previously succeeding started to fail due to "No space left on device".

In short, the wwn devices on today's smithis are not big enough for
/var/lib/ceph.

This commit "fixes the fix" by dropping the dead code and always returning the
value that qa/tasks/ceph.py has come to expect.

Fixes: https://tracker.ceph.com/issues/42313
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoMerge pull request #1326 from kshtsk/wip-great-again
kshtsk [Tue, 15 Oct 2019 19:02:06 +0000 (21:02 +0200)]
Merge pull request #1326 from kshtsk/wip-great-again

make teuthology-openstack great again

5 years agoopenstack: copy missing user-data from suse repo 1326/head
Kyr Shatskyy [Mon, 14 Oct 2019 15:19:07 +0000 (17:19 +0200)]
openstack: copy missing user-data from suse repo

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agoopenstack: cleanup stale comments
Kyr Shatskyy [Fri, 11 Oct 2019 04:46:08 +0000 (06:46 +0200)]
openstack: cleanup stale comments

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
5 years agoopenstack: make use base64 for python3 compatible code
Kyr Shatskyy [Fri, 11 Oct 2019 04:37:55 +0000 (06:37 +0200)]
openstack: make use base64 for python3 compatible code

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
5 years agoopenstack: delete unused __flavor and __flavor_range methods
Kyr Shatskyy [Fri, 11 Oct 2019 03:49:35 +0000 (05:49 +0200)]
openstack: delete unused __flavor and __flavor_range methods

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
5 years agoopenstack: use --limit 2000 with openstack image list command
Nathan Cutler [Fri, 2 Jun 2017 12:42:32 +0000 (14:42 +0200)]
openstack: use --limit 2000 with openstack image list command

The --limit defaults to 25, which is way too low.

Fixes: https://github.com/SUSE/teuthology/issues/82
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: only consider private images
Nathan Cutler [Fri, 2 Jun 2017 12:21:22 +0000 (14:21 +0200)]
openstack: only consider private images

OVH only returns the first 25 images, and the public ones (which we don't use
at all) eat up all the spots.

Fixes: https://github.com/SUSE/teuthology/issues/82
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: increase ceph-fuse delays
Loic Dachary [Tue, 5 Apr 2016 20:47:14 +0000 (22:47 +0200)]
openstack: increase ceph-fuse delays

In the same way it's done in machine_types/vps.yaml

Signed-off-by: Loic Dachary <loic@dachary.org>
Conflicts:
teuthology/openstack/openstack.yaml

5 years agosetup-openstack.sh: setup_pulpito: respond to setuptools treachery
Nathan Cutler [Thu, 2 Feb 2017 21:05:25 +0000 (22:05 +0100)]
setup-openstack.sh: setup_pulpito: respond to setuptools treachery

Apparently, setuptools has a "screw the users" policy.

Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1023257
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agouser-data: global s/sudo tee/tee/, if{up,down} -a
Nathan Cutler [Sun, 12 Feb 2017 11:33:12 +0000 (12:33 +0100)]
user-data: global s/sudo tee/tee/, if{up,down} -a

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agouser-data: tweak Ubuntu 16.04 user-data
Nathan Cutler [Sun, 12 Feb 2017 07:45:35 +0000 (08:45 +0100)]
user-data: tweak Ubuntu 16.04 user-data

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: use wget instead of curl for Ubuntu-14.04
Loic Dachary [Mon, 28 Mar 2016 16:37:11 +0000 (18:37 +0200)]
openstack: use wget instead of curl for Ubuntu-14.04

So that it also works with Ubuntu 14.04.1 which did not have curl by
default.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: support /etc/network/intefaces injection
Loic Dachary [Tue, 8 Dec 2015 09:52:10 +0000 (10:52 +0100)]
openstack: support /etc/network/intefaces injection

Not all OpenStack providers have a dhcp server. Some of
them (dreamcompute for instance) may inject /etc/network/interfaces with
a pre-configured stanza. It is not enough to set the dns server in the
dhcp client configuration, it also needs to be set directly in
/etc/resolv.conf when that has no effect.

http://tracker.ceph.com/issues/14024 Fixes: #14024

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoensure VMs always have /etc/hosts set up
Loic Dachary [Tue, 8 Dec 2015 00:53:10 +0000 (01:53 +0100)]
ensure VMs always have /etc/hosts set up

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
5 years agobuildpackages: use items for py3 compatibility
Kyr Shatskyy [Mon, 14 Oct 2019 15:14:13 +0000 (17:14 +0200)]
buildpackages: use items for py3 compatibility

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agobuildpackages: sleep first in the wait/backoff loop
Nathan Cutler [Wed, 28 Feb 2018 18:27:27 +0000 (19:27 +0100)]
buildpackages: sleep first in the wait/backoff loop

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: change wait/backoff intervals
Nathan Cutler [Wed, 28 Feb 2018 15:42:17 +0000 (16:42 +0100)]
buildpackages: change wait/backoff intervals

The sshd in SLE15 is more paranoid and does not tolerate much banging on port 22:

+ sleep 8
+ for delay in 1 2 4 8 8 8 8 8 8 8 8 8 16 16 16 16 16 32 32 32 64 128 256 512
+ ssh -o ConnectTimeout=3 137.74.26.189 bash -c '"grep -q READYTORUN /var/log/cloud-init*.log"'
Warning: Permanently added '137.74.26.189' (ECDSA) to the list of known hosts.
Received disconnect from 137.74.26.189 port 22:2: Too many authentication failures

Also log the ssh status code.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoCleanup to use merging from suse stream
Kyr Shatskyy [Mon, 14 Oct 2019 15:00:10 +0000 (17:00 +0200)]
Cleanup to use merging from suse stream

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agoopenstack: user-data: install chrony on SLE15 and openSUSE 15
Nathan Cutler [Wed, 14 Mar 2018 22:25:27 +0000 (23:25 +0100)]
openstack: user-data: install chrony on SLE15 and openSUSE 15

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agosle-15-user-data: copy authorized_keys from root
Nathan Cutler [Thu, 1 Mar 2018 15:38:18 +0000 (16:38 +0100)]
sle-15-user-data: copy authorized_keys from root

The image generation script is overriding the disable_root setting in
/etc/cloud/cloud.cfg. As a result, openstack seeds the key in
/root/.ssh/authorized_keys instead of /home/sles/.ssh/authorized_keys

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: drop unneeded packages in SLE15
Nathan Cutler [Wed, 28 Feb 2018 17:02:39 +0000 (18:02 +0100)]
buildpackages: drop unneeded packages in SLE15

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoSupport SLE-15
Nathan Cutler [Wed, 10 Jan 2018 13:33:42 +0000 (14:33 +0100)]
Support SLE-15

With SLE15 it is no longer possible to SSH in as root. Instead, the OpenStack
SSH public key is injected into /home/sles. Reflect this in the user-data
files.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoTeuthologyOpenStack: use yaml.safe_load
Kyr Shatskyy [Mon, 14 Oct 2019 21:48:59 +0000 (23:48 +0200)]
TeuthologyOpenStack: use yaml.safe_load

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agoteuthology-openstack: fix broken deployment
Nathan Cutler [Thu, 25 Oct 2018 15:37:52 +0000 (17:37 +0200)]
teuthology-openstack: fix broken deployment

d6be711301fe7331acd428ab261ea648ef86305f broke the t-o deployment,
causing it to fail with the following Traceback:

2018-10-25 17:23:46,078.078 DEBUG:teuthology.misc:No server with a name
or ID of 'teuth-jschmid' exists.
Traceback (most recent call last):
  File "/home/jxs/projects/teuthology/teuthology/v/bin/teuthology-openstack", line 11, in <module>
    load_entry_point('teuthology', 'console_scripts', 'teuthology-openstack')()
  File "/home/jxs/projects/teuthology/teuthology/scripts/openstack.py", line 7, in main
    sys.exit(teuthology.openstack.main(parse_args(argv), argv))
  File "/home/jxs/projects/teuthology/teuthology/teuthology/openstack/__init__.py", line 1310, in main
    return TeuthologyOpenStack(ctx, teuth_config, argv).main()
  File "/home/jxs/projects/teuthology/teuthology/teuthology/openstack/__init__.py", line 704, in main
    self.setup()
  File "/home/jxs/projects/teuthology/teuthology/teuthology/openstack/__init__.py", line 890, in setup
    self.instance = OpenStackInstance(self.server_name())
  File "/home/jxs/projects/teuthology/teuthology/teuthology/openstack/__init__.py", line 82, in __init__
    if self.info['status'] == 'ERROR':
TypeError: 'NoneType' object has no attribute '__getitem__'

Signed-off-by: Joshua Schmid <jschmid@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Conflicts:
teuthology/openstack/__init__.py

5 years agoopenstack: fail immediately if VM creation fails
Nathan Cutler [Tue, 23 Oct 2018 11:08:34 +0000 (13:08 +0200)]
openstack: fail immediately if VM creation fails

Fixes: https://github.com/SUSE/teuthology/issues/159
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Conflicts:
teuthology/openstack/__init__.py

5 years agoopenstack: retry if volume create+attach operation fails
Kyr Shatskyy [Thu, 18 Oct 2018 00:41:41 +0000 (02:41 +0200)]
openstack: retry if volume create+attach operation fails

Once in awhile, a created volume fails to become available within
a reasonable period of time. When this happens, the entire test job
fails with the following error:

2018-10-02T06:52:44.106 ERROR:teuthology.provision.openstack:'volume
target192168000058-2' reached maximum tries (100) after waiting for 200
seconds

With this commit, we catch that exception and retry with a new volume.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Kyrylo Shatskyy <kyrylo.shatskyy@suse.com>
Conflicts:
teuthology/provision/openstack.py

5 years agoprovision/openstack: put "add volume" in a retry loop
Nathan Cutler [Thu, 23 Mar 2017 13:47:29 +0000 (14:47 +0100)]
provision/openstack: put "add volume" in a retry loop

Attempted workaround for this issue:

2017-03-23T12:33:20.684 DEBUG:teuthology.misc::sh: openstack --quiet volume show  -f json target217182140122-1
2017-03-23T12:34:22.140 DEBUG:teuthology.misc:{
2017-03-23T12:34:22.146 DEBUG:teuthology.misc:"size": 10,
2017-03-23T12:34:22.146 DEBUG:teuthology.misc:"status": "available",
2017-03-23T12:34:22.146 DEBUG:teuthology.misc:"properties": "ownedby='217.182.143.170'",
2017-03-23T12:34:22.146 DEBUG:teuthology.misc:"user_id": "122b249e82994f5aa8ec6a31b7891df5",
2017-03-23T12:34:22.146 DEBUG:teuthology.misc:"description": null,
2017-03-23T12:34:22.146 DEBUG:teuthology.misc:"availability_zone": "nova",
2017-03-23T12:34:22.146 DEBUG:teuthology.misc:"bootable": "false",
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"encrypted": false,
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"created_at": "2017-03-23T12:33:17.000000",
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"multiattach": false,
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"os-volume-replication:driver_data": null,
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"name": "target217182140122-1",
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"snapshot_id": null,
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"consistencygroup_id": null,
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"replication_status": "disabled",
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"os-vol-tenant-attr:tenant_id": "43583fef7b734bb1b6fb5f86d48abe5e",
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"source_volid": null,
2017-03-23T12:34:22.147 DEBUG:teuthology.misc:"os-volume-replication:extended_status": null,
2017-03-23T12:34:22.148 DEBUG:teuthology.misc:"type": "classic",
2017-03-23T12:34:22.148 DEBUG:teuthology.misc:"id": "e6949180-87fe-4f4c-b0a0-e3ea35bdb2e2",
2017-03-23T12:34:22.148 DEBUG:teuthology.misc:"attachments": []
2017-03-23T12:34:25.036 DEBUG:teuthology.misc:}
2017-03-23T12:34:25.042 DEBUG:teuthology.misc::sh: openstack server add volume target217182140122 target217182140122-1
2017-03-23T12:35:30.536 DEBUG:teuthology.misc:No volume with a name or ID of 'target217182140122-1' exists.
2017-03-23T12:35:34.512 ERROR:teuthology.provision.openstack:Command 'openstack server add volume target217182140122 target217182140122-1' returned non-zero exit status 1

Fixes: http://tracker.ceph.com/issues/17659
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agotests: skip openstack tests if OS_AUTH_URL not set
Nathan Cutler [Tue, 7 Feb 2017 15:09:14 +0000 (16:09 +0100)]
tests: skip openstack tests if OS_AUTH_URL not set

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: hide OS_ variables dumping in logs
Kyr Shatskyy [Thu, 31 Jan 2019 15:34:10 +0000 (16:34 +0100)]
openstack: hide OS_ variables dumping in logs

Hide OS_ variables in the log, so it can't be easily
read by human and steal secrets.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agoopenstack: Support GitHub PR merge branches
Kyrylo Shatskyy [Thu, 6 Dec 2018 19:42:54 +0000 (20:42 +0100)]
openstack: Support GitHub PR merge branches

Add support for github pr merge branches, like 'origin/pr/*/merge',
so it can be used to setup teuthology server using teuthology-openstack
command line tool with --teuthology-branch argument.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agoopenstack: add get_instance method
Kyr Shatskyy [Fri, 2 Nov 2018 13:47:18 +0000 (14:47 +0100)]
openstack: add get_instance method

Refactor teuthology-openstack so it get openstack instance once.
Allow to run suite without prior setup() invocation.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
5 years agoopenstack: fix pulpito and paddles status in init script
Kyr Shatskyy [Mon, 22 Oct 2018 19:58:16 +0000 (21:58 +0200)]
openstack: fix pulpito and paddles status in init script

After deployment teuthology cluster on openstack, teuthology
service status-paddles and status-pulpito commands report
'dead', however paddles and pulpito are running.
This fix addresses this issue.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
5 years agoteuthology-openstack: add banner after cluster creation
Kyr Shatskyy [Sat, 20 Oct 2018 03:18:34 +0000 (05:18 +0200)]
teuthology-openstack: add banner after cluster creation

When creating a teuthology openstack cluster and not
requesting any suite suite run the teuthology-openstack
quits silently not giving information where the cluster
is created and how its services can be reached.
This fix addresses the issue above.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
5 years agoteuthology-openstack: add nameserver option
Kyr Shatskyy [Tue, 16 Oct 2018 10:39:19 +0000 (12:39 +0200)]
teuthology-openstack: add nameserver option

Add --nameserver option to teuthology-openstack cli tool so
teuthology cluster can be deployed and configured to use
customly provided dns

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
5 years agobuildpackages: use makecheck image to instantiate build VM
Nathan Cutler [Wed, 25 Apr 2018 19:39:34 +0000 (21:39 +0200)]
buildpackages: use makecheck image to instantiate build VM

The teuthology images no longer have the right repos for building Ceph.
Use the makecheck images instead.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoFix ovh paddles populate
Kyr Shatskyy [Fri, 5 Oct 2018 12:22:17 +0000 (14:22 +0200)]
Fix ovh paddles populate

Unfortunate typo instroduced in sha1 e491969d4b5b9dca710d1ce89f0cde918bbee1b4
which fixed ECP nodes creation and broke OVH nodes creation.

5 years agoFix cannot populate paddles
Kyr Shatskyy [Thu, 13 Sep 2018 12:03:21 +0000 (14:03 +0200)]
Fix cannot populate paddles

When trying to deploy teuthology on openstack with several networks
and non unique subnet addresses setup-openstack script fails to add
nodes to paddles databases.

This patch removes duplicates while getting default_subnets.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agoconnection: key_filename is a string, not an array
Loic Dachary [Tue, 7 Feb 2017 14:23:55 +0000 (15:23 +0100)]
connection: key_filename is a string, not an array

Signed-off-by: Loic Dachary <ldachary@redhat.com>
5 years agoAdd ECP support
Kyr Shatskyy [Wed, 21 Mar 2018 23:16:27 +0000 (00:16 +0100)]
Add ECP support

Isolated __flavor and __flavor_range from openstack invocation.
Flavor and Network parameters can be taken from teuthology config
under 'openstack' records.
Added filters for new OVH flavors.

 Conflicts:
teuthology/openstack/__init__.py

5 years agoopenstack: Support Leap 42.3
Nathan Cutler [Wed, 31 May 2017 12:49:16 +0000 (14:49 +0200)]
openstack: Support Leap 42.3

Without Salt for now, due to https://bugzilla.opensuse.org/show_bug.cgi?id=1042379

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: cloudlab support (part 2)
Loic Dachary [Sun, 3 Apr 2016 16:40:24 +0000 (18:40 +0200)]
openstack: cloudlab support (part 2)

The ctl hostname was replaced by a fqdn that always ends with cloudlab.us

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: do not use cached tokens for neutron
Loic Dachary [Mon, 22 Aug 2016 16:20:05 +0000 (18:20 +0200)]
openstack: do not use cached tokens for neutron

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: teuthology must use aarch64, not arm64
Loic Dachary [Tue, 5 Apr 2016 08:45:37 +0000 (10:45 +0200)]
openstack: teuthology must use aarch64, not arm64

teuthology / gitbuilder / ansible_architecture arch is

   dpkg-architecture --query DEB_HOST_GNU_CPU (x86_64 and aarch64)

deb package Architectures: (conf/distributions) is

   dpkg-architecture --query DEB_HOST_GNU_ARCH (amd64 and arm64)

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: move net() to OpenStack
Loic Dachary [Mon, 28 Mar 2016 17:49:02 +0000 (19:49 +0200)]
openstack: move net() to OpenStack

It is not only needed when provisionning the teuthology instance.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: rework floating IP handling
Loic Dachary [Mon, 28 Mar 2016 17:35:34 +0000 (19:35 +0200)]
openstack: rework floating IP handling

Signed-off-by: Loic Dachary <loic@dachary.org>
Conflicts:
teuthology/openstack/__init__.py

5 years agoopenstack: there may be more than one IPv4 subnet
Loic Dachary [Sun, 27 Mar 2016 11:50:01 +0000 (13:50 +0200)]
openstack: there may be more than one IPv4 subnet

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: increase teuthology flavors
Loic Dachary [Mon, 10 Apr 2017 07:29:28 +0000 (09:29 +0200)]
openstack: increase teuthology flavors

Ansible has higher memory requirements these days. Keep the default
flavor to the minimum because it is used during tests.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoAdd multi-user support for openstack
Kyr Shatskyy [Thu, 11 Jan 2018 12:26:52 +0000 (14:26 +0200)]
Add multi-user support for openstack

Conflicts:
requirements.txt
teuthology/misc.py
teuthology/openstack/__init__.py
teuthology/provision/openstack.py

5 years agobuildpackages: use createrepo_c package on newer SUSEs
Nathan Cutler [Tue, 6 Mar 2018 06:25:35 +0000 (07:25 +0100)]
buildpackages: use createrepo_c package on newer SUSEs

The old createrepo package brings in Python 2. As of Code 15, that's no longer
going to work.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: run zypper refresh in try/wait loop
Nathan Cutler [Mon, 5 Mar 2018 00:22:03 +0000 (01:22 +0100)]
buildpackages: run zypper refresh in try/wait loop

Avoid silly things like:

+ sudo zypper --non-interactive --no-gpg-checks refresh
System management is locked by the application with pid 2560 (zypper).

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: fix dates in spec file changelog
Nathan Cutler [Sat, 3 Mar 2018 07:05:56 +0000 (08:05 +0100)]
buildpackages: fix dates in spec file changelog

Eliminates the following warnings:

2018-03-03T06:56:01.948 DEBUG:teuthology.misc:warning: bogus date in %changelog: Tue Mar 10 2013 Gary Lowell <glowell@inktank.com> - 1-0
2018-03-03T06:56:01.948 DEBUG:teuthology.misc:warning: bogus date in %changelog: Tue Aug 27 2012 Gary Lowell <glowell@inktank.com> - 1-0

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: drop suse-specific code in ceph-release.spec
Nathan Cutler [Sat, 3 Mar 2018 07:05:19 +0000 (08:05 +0100)]
buildpackages: drop suse-specific code in ceph-release.spec

The ceph-release RPM is not used on SUSE.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: ensure ceph.spec has correct Version and Release
Nathan Cutler [Fri, 2 Mar 2018 23:19:19 +0000 (00:19 +0100)]
buildpackages: ensure ceph.spec has correct Version and Release

In the buildpackages task we don't care what the spec file thinks the Version
and Release should be. We force it to be what we need.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: ensure spec file has correct tarball name
Nathan Cutler [Fri, 2 Mar 2018 21:01:17 +0000 (22:01 +0100)]
buildpackages: ensure spec file has correct tarball name

We are using this script to build various versions of ceph.spec.in, which do
various things for different build environments. Ignore whatever the spec file
is trying to do with the tarball name and force it to the name of the tarball
at hand.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: make-rpm.sh: tweak rpmbuild options
Nathan Cutler [Thu, 1 Mar 2018 21:08:03 +0000 (22:08 +0100)]
buildpackages: make-rpm.sh: tweak rpmbuild options

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: make-rpm.sh: update ceph.spec sed
Nathan Cutler [Thu, 1 Mar 2018 17:32:01 +0000 (18:32 +0100)]
buildpackages: make-rpm.sh: update ceph.spec sed

Drop OBS-specific release suffix

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: install createrepo package carefully
Nathan Cutler [Thu, 29 Jun 2017 20:55:39 +0000 (22:55 +0200)]
buildpackages: install createrepo package carefully

Address error message "Source '...' does not contain the desired medium" when
repos get stale.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: zypper refresh before first zypper install
Nathan Cutler [Thu, 25 May 2017 17:31:19 +0000 (19:31 +0200)]
buildpackages: zypper refresh before first zypper install

Refresh is needed to avoid errors like "Media source 'https://...' does not
contain the desired medium" when we use live repositories.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: prefer vps-ssd-* flavors in OVH
Nathan Cutler [Fri, 12 May 2017 11:48:05 +0000 (13:48 +0200)]
openstack: prefer vps-ssd-* flavors in OVH

OVH has effectively two price tiers for VM flavors, which could be given the
unofficial descriptive names "El Cheapo" and "Regular".

Under the flavor scheme we are currently using the "El Cheapo" flavors are
those that match the regular expression '^vps-ssd-' (just three flavors); all
others are "Regular".

Prefer the "El Cheapo" flavors over "Regular" flavors when the selection
criteria yields matches in both OVH price tiers.

For OpenStack providers other than OVH, the behavior should not change.

In addition to the above, this patch removes duplication of the regular
expression used for selecting OpenStack flavors. While it's convenient not to
have to change the regular expression in three or more places, this comes with
a disadvantage: the patch removes "flavor-select-regexp" from .teuthology.yaml,
so it is no longer possible to adjust the flavor-selection heuristics by
editing the configuration file. Such adjustment _must_ be done by modifying
__flavor_wrapper(). This is not really a loss, though, because - as the OVH
case demonstrates - a single regular expression match may not be enough to
select the least expensive flavor matching the selection criteria.

Fixes: https://github.com/SUSE/teuthology/issues/75
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Conflicts:
teuthology/openstack/__init__.py

5 years agoopenstack: install, enable and start fail2ban on teuthology VM
Jan Fajerski [Mon, 13 Mar 2017 11:10:31 +0000 (12:10 +0100)]
openstack: install, enable and start fail2ban on teuthology VM

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agosetup-openstack.sh: install salt-master on the teuthology VM
Nathan Cutler [Mon, 13 Feb 2017 12:45:29 +0000 (13:45 +0100)]
setup-openstack.sh: install salt-master on the teuthology VM

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agosetup-openstack.sh: edit /etc/init.d/dnsmasq after installing dnsmasq
Nathan Cutler [Thu, 9 Feb 2017 13:31:59 +0000 (14:31 +0100)]
setup-openstack.sh: edit /etc/init.d/dnsmasq after installing dnsmasq

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agodnsmasq must respond to all requests
Loic Dachary [Thu, 9 Feb 2017 10:21:07 +0000 (11:21 +0100)]
dnsmasq must respond to all requests

It is a security issue that should be addressed when running long lived
clusters. But teuthology-openstack is meant to not last more than a few
days.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
5 years agoopenstack: nginx root moved to /var/www/html
Loic Dachary [Wed, 8 Feb 2017 23:02:26 +0000 (00:02 +0100)]
openstack: nginx root moved to /var/www/html

In ubuntu 16.04

Signed-off-by: Loic Dachary <ldachary@redhat.com>
5 years agoopenstack: buildpackages is gitbuilder compatible
Loic Dachary [Wed, 8 Feb 2017 14:02:15 +0000 (15:02 +0100)]
openstack: buildpackages is gitbuilder compatible

Do not use shaman (it is the new default).

Signed-off-by: Loic Dachary <ldachary@redhat.com>
5 years agoopenstack: the device may be eth0 or ens3
Loic Dachary [Tue, 7 Feb 2017 15:34:34 +0000 (16:34 +0100)]
openstack: the device may be eth0 or ens3

Signed-off-by: Loic Dachary <ldachary@redhat.com>
5 years agosetup_openstack.sh: fix test for non-empty $default_subnets
Jan Fajerski [Fri, 3 Feb 2017 10:59:42 +0000 (11:59 +0100)]
setup_openstack.sh: fix test for non-empty $default_subnets

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agoopenstack: cloudlab support (part 5)
Loic Dachary [Thu, 7 Apr 2016 15:45:17 +0000 (17:45 +0200)]
openstack: cloudlab support (part 5)

There is no need for host-record=ctl etc. the profile has been modified
and OS_AUTH_URL is a fqdn.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: cloudlab support (part 4)
Loic Dachary [Wed, 6 Apr 2016 17:56:30 +0000 (19:56 +0200)]
openstack: cloudlab support (part 4)

Hardcode network and subnet. There is no way to chose the relevant one.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: cloudlab support (part 3)
Loic Dachary [Mon, 4 Apr 2016 18:27:49 +0000 (20:27 +0200)]
openstack: cloudlab support (part 3)

The ctl hostname was replaced by a fqdn that always ends with cloudlab.us

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: apt-get install --force-yes
Loic Dachary [Mon, 28 Mar 2016 16:38:19 +0000 (18:38 +0200)]
openstack: apt-get install --force-yes

So that the setup is not disturbed by temporary signature breakage which
sometime happens on the Ubuntu repo.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: clear nginx root
Loic Dachary [Sat, 12 Mar 2016 09:39:12 +0000 (16:39 +0700)]
openstack: clear nginx root

So it can be explored by a human being instead of being hidden by an
empty index.html.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoteuthology-openstack: do not deploy cluster by default
Kyr Shatskyy [Tue, 16 Oct 2018 11:09:38 +0000 (13:09 +0200)]
teuthology-openstack: do not deploy cluster by default

We do not want to deploy cluster by mistake, so it is
reasonable to have dedicated option for cluster deployment,
like --setup.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
Conflicts:
teuthology/openstack/__init__.py

5 years agoopenstack: allow setting of teuthology VM params from command line
Nathan Cutler [Tue, 11 Apr 2017 08:59:11 +0000 (10:59 +0200)]
openstack: allow setting of teuthology VM params from command line

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: add new OVH flavors to filter list
Nathan Cutler [Tue, 11 Apr 2017 09:14:32 +0000 (11:14 +0200)]
openstack: add new OVH flavors to filter list

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: user-data: add filesystems:ceph:mimic OBS repo
Nathan Cutler [Sun, 4 Mar 2018 23:46:25 +0000 (00:46 +0100)]
openstack: user-data: add filesystems:ceph:mimic OBS repo

Temporary measure to make it possible for DeepSea to deploy Ceph
in openSUSE Leap 15.0

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: user-data: remove system librados2 librbd1
Nathan Cutler [Sun, 4 Mar 2018 10:58:58 +0000 (11:58 +0100)]
openstack: user-data: remove system librados2 librbd1

The pre-installed system librados2 and librbd1 packages may block us
from installing packages-under-test.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: user-data: tweak packages on openSUSE Leap 15.0
Nathan Cutler [Sat, 3 Mar 2018 22:22:29 +0000 (23:22 +0100)]
openstack: user-data: tweak packages on openSUSE Leap 15.0

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: use install-deps.sh from local clone if available
Nathan Cutler [Mon, 13 Mar 2017 16:21:52 +0000 (17:21 +0100)]
buildpackages: use install-deps.sh from local clone if available

Fixes: https://github.com/SUSE/teuthology/issues/53
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack/buildpackages: tweaked opensuse 42.2 user-data
Nathan Cutler [Mon, 13 Mar 2017 15:16:50 +0000 (16:16 +0100)]
openstack/buildpackages: tweaked opensuse 42.2 user-data

Fixes: https://github.com/SUSE/teuthology/issues/54
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: add opensuse-42.2 userdata
Nathan Cutler [Wed, 8 Feb 2017 23:08:06 +0000 (00:08 +0100)]
openstack: add opensuse-42.2 userdata

Symlink to 42.1

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: conditionally fetch tags from ceph/ceph.git
Nathan Cutler [Sun, 19 Feb 2017 22:13:44 +0000 (23:13 +0100)]
buildpackages: conditionally fetch tags from ceph/ceph.git

A new parameter, canonical_tags, is added to .teuthology.yaml defaulting to
true.

A new command-line option "--no-canonical-tags" is added to teuthology-openstack
(when given, canonical_tags is set to false in .teuthology.yaml; otherwise it
defaults to true).

The buildpackages task is modified to take the appropriate action based on the
value of canonical_tags taken from .teuthology.yaml. Also, an info message is
displayed reminding the user that the command-line parameter only takes place
when the teuthology VM is created. Like --simultaneous-jobs, the parameter has
no effect in subsequent runs against an existing teuthology environment.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Conflicts:
scripts/openstack.py

5 years agobuildpackages: use sle instead of sles for SUSE Linux Enterprise
Nathan Cutler [Sun, 12 Feb 2017 12:04:58 +0000 (13:04 +0100)]
buildpackages: use sle instead of sles for SUSE Linux Enterprise

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agotasks: import buildpackages.py from ceph/ceph master
Nathan Cutler [Wed, 8 Feb 2017 20:22:09 +0000 (21:22 +0100)]
tasks: import buildpackages.py from ceph/ceph master

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: add centos-7.3-user-data.txt
Nathan Cutler [Sat, 18 Feb 2017 11:12:20 +0000 (12:12 +0100)]
buildpackages: add centos-7.3-user-data.txt

Tests are failing with:

2017-02-18T11:07:34.742 DEBUG:teuthology.misc:timeout 30m openstack server create --image 'teuthology-centos-7.3-x86_64'  --flavor hg-60-ssd --key-name teuthology --security-group teuthology --property ownedby=149.202.169.26 --user-data centos-7.3-user-data.txt --wait ceph-rpm-centos7-x86_64-basic-f65754e312f11823c5bb7e9fe24655f3fd68bcd2
2017-02-18T11:07:37.227 DEBUG:teuthology.misc:Can't open 'centos-7.3-user-data.txt': [Errno 2] No such file or directory: 'centos-7.3-user-data.txt'

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: fix make-rpm.sh for kraken + SUSE
Nathan Cutler [Sun, 12 Feb 2017 21:14:32 +0000 (22:14 +0100)]
buildpackages: fix make-rpm.sh for kraken + SUSE

tl;dr:

SUSE builds in the OBS do not use the make-dist script to generate the
tarball.  This commit overrides a SUSE downstream patch that was breaking
make-dist.

Full analysis:

make-rpm.sh breaks for kraken when run on SLE-12-SP2:

+ rpmbuild -ba --define '_unpackaged_files_terminate_build 0' --define '_topdir /tmp/release/sles/WORKDIR' ceph.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.F2hJfx
+ umask 022
+ cd /tmp/release/sles/WORKDIR/BUILD
+ cd /tmp/release/sles/WORKDIR/BUILD
+ rm -rf ceph-11.1.0
+ /usr/bin/bzip2 -dc /tmp/release/sles/WORKDIR/SOURCES/ceph-11.1.0-7423-g8f37fcc.tar.bz2
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd ceph-11.1.0
/var/tmp/rpm-tmp.F2hJfx: line 35: cd: ceph-11.1.0: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.F2hJfx (%prep)

The buildpackages task uses "make-dist" to generate the tarball. In order for
the tarball so generated to be buildable by rpmbuild, the spec file must
contain the following lines:

Version:        @VERSION@
Release:        @RPM_RELEASE@%{?dist}
...
%prep
%autosetup -p1 -n @TARBALL_BASENAME@

SUSE builds in OBS/IBS use a modified spec file and uses a different mechanism
to generate the tarball. (This worked well up until jewel but for kraken and
beyond we may need to reconsider.) In the SUSE downstream version of the spec
file, the lines look like this:

Version:        @VERSION@
Release:        @RPM_RELEASE@%{?dist}
...
%prep
%if 0%{?rhel}
%autosetup -p1 -n @TARBALL_BASENAME@
%endif
%if ! 0%{?rhel}
%autosetup -p1
%endif

The absence of "-n @TARBALL_BASENAME@" causes the tarball basename to be
"ceph-$VERSION" (e.g. ceph-12.0.0) instead of the full
"ceph-$VERSION-$RPM_RELEASE" (e.g. ceph-12.0.0-3534.g000000), yet rpmbuild
expects the latter because the "Release:" field of the spec file is populated.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: populate version file with RPM version
Nathan Cutler [Fri, 10 Feb 2017 22:09:02 +0000 (23:09 +0100)]
buildpackages: populate version file with RPM version

Until now, the "version" file contained a string like 10.2.5-6244-g9027e75

The RPM version obtained by doing "rpm -q $PKG --qf %{VERSION}-%{RELEASE}"
looks like this: 10.2.5-6244.g9027e75

When teuthology compares these two strings, they don't match even though
the version numbers are effectively the same.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: add user-data for newer SUSE versions
Nathan Cutler [Wed, 8 Feb 2017 20:18:57 +0000 (21:18 +0100)]
buildpackages: add user-data for newer SUSE versions

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agobuildpackages: apply suse modifications
Loic Dachary [Tue, 7 Feb 2017 21:26:27 +0000 (22:26 +0100)]
buildpackages: apply suse modifications

From https://github.com/SUSE/ceph-qa-suite/tree/wip-opensuse-jewel
because it is known to work. Omit the branch specification.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agobuildpackages: import from ceph/master
Loic Dachary [Tue, 7 Feb 2017 17:26:03 +0000 (18:26 +0100)]
buildpackages: import from ceph/master

It is exactly the same in all branches. It really belongs in teuthology
and was placed in ceph-qa-suite because it required a more flexible
development cycle.

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agosetup-openstack.sh: populate all subnets
Nathan Cutler [Thu, 2 Feb 2017 21:21:39 +0000 (22:21 +0100)]
setup-openstack.sh: populate all subnets

It used to be that OVH only returned a single subnet. Now it is returning two
or three and we need to populate them all.

Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1023263
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoopenstack: cloudlab support
Loic Dachary [Mon, 28 Mar 2016 16:40:25 +0000 (18:40 +0200)]
openstack: cloudlab support

The only image available and working there at the moment is 14.04.1
which require a few tweaks to be setup properly.

https://groups.google.com/forum/#!topic/cloudlab-users/EN6YASWXwZU

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: setup ceph-workbench credentials
Loic Dachary [Mon, 7 Mar 2016 09:30:26 +0000 (16:30 +0700)]
openstack: setup ceph-workbench credentials

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: install docker in the teuthology instance
Loic Dachary [Sat, 5 Mar 2016 01:57:46 +0000 (08:57 +0700)]
openstack: install docker in the teuthology instance

Signed-off-by: Loic Dachary <loic@dachary.org>
5 years agoopenstack: install ceph-workbench
Loic Dachary [Sat, 19 Dec 2015 16:42:27 +0000 (17:42 +0100)]
openstack: install ceph-workbench

Signed-off-by: Loic Dachary <loic@dachary.org>
Conflicts:
teuthology/openstack/__init__.py

5 years agoMerge pull request #1328 from kshtsk/wip-no-iterkeys
kshtsk [Mon, 14 Oct 2019 12:34:05 +0000 (14:34 +0200)]
Merge pull request #1328 from kshtsk/wip-no-iterkeys

python3: get rid of iterkeys for compatibility