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".
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.
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.
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
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.
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__'
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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:
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:
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.
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.