Merge lp:~townsend/libertine/smoke-test-workaround into lp:libertine
- smoke-test-workaround
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Christopher Townsend |
Approved revision: | 300 |
Merged at revision: | 298 |
Proposed branch: | lp:~townsend/libertine/smoke-test-workaround |
Merge into: | lp:libertine |
Diff against target: |
62 lines (+33/-6) 1 file modified
python/libertine/LxcContainer.py (+33/-6) |
To merge this branch: | bzr merge lp:~townsend/libertine/smoke-test-workaround |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Libertine CI Bot | continuous-integration | Approve | |
Larry Price | Approve | ||
Review via email:
|
Commit message
Add check for special LIBERTINE_
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Libertine CI Bot (libertine-ci-bot) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:297
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Larry Price (larryprice) wrote : | # |
Can we somehow take advantage of lxc config variables while setting up the tests?
https:/
I'm thinking particularly core.http and core.https. I don't know if they apply globally or only to container download.
...I'm also not really sure what the smoke test build is doing? You'll have to enlighten me in the morning.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Larry Price (larryprice) wrote : | # |
Ah - I found that it's all based out of the lp:libertine-testing branch. Not sure how it's all getting installed on slave-0 and running, though.
I also think my previous comment is actually only a config option for LXD. Another option might be the MIRROR env variable, which I think we might be able to set globally before the smoke test run based on this link: https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Larry Price (larryprice) wrote : | # |
Well - I might have misinterpreted their MIRROR command. We can probably just touch base and approve this in the morning.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:298
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:298
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:299
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
- 300. By Christopher Townsend
-
Merge lp:libertine.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Libertine CI Bot (libertine-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:300
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'python/libertine/LxcContainer.py' | |||
2 | --- python/libertine/LxcContainer.py 2016-09-06 12:36:47 +0000 | |||
3 | +++ python/libertine/LxcContainer.py 2016-09-07 19:08:46 +0000 | |||
4 | @@ -12,6 +12,7 @@ | |||
5 | 12 | # You should have received a copy of the GNU General Public License along | 12 | # You should have received a copy of the GNU General Public License along |
6 | 13 | # with this program. If not, see <http://www.gnu.org/licenses/>. | 13 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
7 | 14 | 14 | ||
8 | 15 | import contextlib | ||
9 | 15 | import crypt | 16 | import crypt |
10 | 16 | import dbus | 17 | import dbus |
11 | 17 | import lxc | 18 | import lxc |
12 | @@ -72,6 +73,31 @@ | |||
13 | 72 | return host_timezone | 73 | return host_timezone |
14 | 73 | 74 | ||
15 | 74 | 75 | ||
16 | 76 | class EnvLxcSettings(contextlib.ExitStack): | ||
17 | 77 | """ | ||
18 | 78 | Helper object providing a way to set the proxies for testing | ||
19 | 79 | |||
20 | 80 | When running smoke tests on Jenkins, LXC create operations need the proxies | ||
21 | 81 | set, but subsequent apt operations cannot have the proxies set. This will | ||
22 | 82 | set the proxies when called and unset the proxies when the context is | ||
23 | 83 | destroyed. | ||
24 | 84 | """ | ||
25 | 85 | def __init__(self): | ||
26 | 86 | super().__init__() | ||
27 | 87 | self.set_proxy_env() | ||
28 | 88 | self.callback(lambda: self.del_proxy_env()) | ||
29 | 89 | |||
30 | 90 | def set_proxy_env(self): | ||
31 | 91 | if 'LIBERTINE_JENKAAS_TESTING' in os.environ: | ||
32 | 92 | os.environ['http_proxy'] = 'http://squid.internal:3128' | ||
33 | 93 | os.environ['https_proxy'] = 'https://squid.internal:3128' | ||
34 | 94 | |||
35 | 95 | def del_proxy_env(self): | ||
36 | 96 | if 'LIBERTINE_JENKAAS_TESTING' in os.environ: | ||
37 | 97 | del os.environ['http_proxy'] | ||
38 | 98 | del os.environ['https_proxy'] | ||
39 | 99 | |||
40 | 100 | |||
41 | 75 | class LibertineLXC(BaseContainer): | 101 | class LibertineLXC(BaseContainer): |
42 | 76 | """ | 102 | """ |
43 | 77 | A concrete container type implemented using an LXC container. | 103 | A concrete container type implemented using an LXC container. |
44 | @@ -181,12 +207,13 @@ | |||
45 | 181 | 207 | ||
46 | 182 | utils.create_libertine_user_data_dir(self.container_id) | 208 | utils.create_libertine_user_data_dir(self.container_id) |
47 | 183 | 209 | ||
54 | 184 | if not self.container.create("download", 0, | 210 | with EnvLxcSettings(): |
55 | 185 | {"dist": "ubuntu", | 211 | if not self.container.create("download", 0, |
56 | 186 | "release": self.installed_release, | 212 | {"dist": "ubuntu", |
57 | 187 | "arch": self.architecture}): | 213 | "release": self.installed_release, |
58 | 188 | print("Failed to create container") | 214 | "arch": self.architecture}): |
59 | 189 | return False | 215 | print("Failed to create container") |
60 | 216 | return False | ||
61 | 190 | 217 | ||
62 | 191 | self.create_libertine_config() | 218 | self.create_libertine_config() |
63 | 192 | 219 |
FAILED: Continuous integration, rev:297 /jenkins. canonical. com/libertine/ job/lp- libertine- ci/111/ /jenkins. canonical. com/libertine/ job/build/ 319/console /jenkins. canonical. com/libertine/ job/lp- generic- update- mp/240/ console /jenkins. canonical. com/libertine/ job/build- 0-fetch/ 321 /jenkins. canonical. com/libertine/ job/build- 1-sourcepkg/ release= vivid+overlay/ 305 /jenkins. canonical. com/libertine/ job/build- 1-sourcepkg/ release= xenial+ overlay/ 305 /jenkins. canonical. com/libertine/ job/build- 1-sourcepkg/ release= yakkety/ 305 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= vivid+overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= vivid+overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= xenial+ overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= xenial+ overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= yakkety/ 299/console /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= vivid+overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= vivid+overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= xenial+ overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= xenial+ overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= yakkety/ 299/console
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/libertine/ job/lp- libertine- ci/111/ rebuild
https:/