blob: 22ece93bd55b78923ffc4db5450158cce43da2a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
Mason with Zuul/Gearman/turbo-hipster
=====================================
Configuration
-------------
Some of the configuration is done by Ansible. This is documented in
clusters/mason-system-x86_64-openstack-deploy.morph. The config files
which are dealt with in this way are mason/share/zuul.conf and
mason/share/turbo-hipster-config.yaml. You will probably want to
edit the default configuration in mason/share/zuul-layout.yaml.
### mason/share/zuul-layout.yaml
Full documentation of the configuration of Zuul can be found [here][0].
The projects section in this file contains a list of projects and the
tests to run on them. The "name" field should be the name of the
project on Gerrit. You then define the jobs to be run for each pipeline
on that project. In the example,
projects:
- name: baserock/baserock/definitions
check:
- build:
- build_test
there exists some pipeline named check. The above sets up Zuul to run
the job "build" when the check pipeline gets a change. If the build job
is successful, then Zuul will run the build_test job. On completion,
Zuul will report in the way defined in the pipeline.
Not all tests have dependencies. The following is also valid:
projects:
- name: baserock/baserock/definitions
check:
- build
- some-other-test
[0]: http://ci.openstack.org/zuul/zuul.html#layout-yaml
Debugging
---------
Once you've deployed a Mason and got it configured correctly, you may
want or need to look at its logs or restart it. If you change its config,
you'll need to do:
systemctl restart zuul-server
systemctl restart zuul-merger
And if you change /etc/turbo-hipster-config.yaml you will also need
to do:
systemctl restart turbo-hipster
The logs created by the current plugins are in /var/www/logs/. These
will be useful if a change causes a build to fail and you need to see why.
They are also accessible by going to "http://<mason-ip>/logs/" in a web
browser.
Zuul saves its logs in /var/log/zuul/debug.log and /var/log/zuul/zuul.log.
The most useful of these for discovering why something has gone wrong is
debug.log.
Turbo-hipster saves its logs in /var/log/turbo-hipster/debug.log. Its quite
messy but can be useful for determining what part of a plugin went wrong.
The plugins are in "/usr/share/system-tests/mason/tests/". If you change
them, you will need to run
systemctl restart turbo-hipster
in order for turbo-hipster to use the right plugin code.
Issues
------
### "--verified" is not a valid option
This suggests that either your Gerrit instance has not been configured
to have a "Verified" label, or your Mason user on Gerrit cannot change
the value of said label.
### project "foo/bar" is not found
This means that a Gerrit event has occurred on a project not listed in
the projects section of /etc/zuul-layout.yaml. If that event was a
change you wanted testing, you'll need to amend /etc/zuul-layout.yaml.
### failing to deploy test systems
Check your OpenStack credentials. Look in /var/log/morph.log to see
where the deployment (if any) failed. If none, check your config. Does
the test plugin in /etc/turbo-hipster-config.yaml have "deployment-hosts"
set correctly (["architecture:user@url"], for OpenStack x86_64 this could
be "x86_64:user@openstack.example.com:5000/v2.0/" - the username is not
used for OpenStack)? Is the deployment host reachable from your machine?
The turbo-hipster logs may be useful for finding the exact error with
the deployment.
Useful commands
---------------
Run these on the machine running Zuul.
Show the running jobs:
zuul -c /etc/zuul.conf show running-jobs
Force Zuul to reassess a change:
zuul -c /etc/zuul.conf enqueue --trigger gerrit --pipeline check --project baserock/baserock/definitions --change 71,1
where 71 is the change number.
Full docs of the Zuul client are [here][1].
[1]: http://ci.openstack.org/zuul/client.html
|