Merge lp:~townsend/libertine/smoke-test-workaround into lp:libertine

Proposed by Christopher Townsend
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
Reviewer Review Type Date Requested Status
Libertine CI Bot continuous-integration Approve
Larry Price Approve
Review via email: mp+304665@code.launchpad.net

Commit message

Add check for special LIBERTINE_JENKAAS_TESTING environment variable for the smoke testing harness.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

FAILED: Continuous integration, rev:297
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/111/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/libertine/job/build/319/console
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/240/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/321
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/305
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/305
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/305
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/299
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/299/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/299
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/299/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/299/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/299
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/299/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/299
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/299/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/299/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/111/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

FAILED: Continuous integration, rev:297
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/112/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/libertine/job/build/322/console
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/243/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/324
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/308
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/308
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/308
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/302
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/302
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/302/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/302/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/302
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/302
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/302/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/302/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/112/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Larry Price (larryprice) wrote :

Can we somehow take advantage of lxc config variables while setting up the tests?

https://lists.linuxcontainers.org/pipermail/lxc-users/2016-March/011334.html

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.

review: Needs Information
Revision history for this message
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://dev.launchpad.net/Running/LXC.

Revision history for this message
Larry Price (larryprice) wrote :

Well - I might have misinterpreted their MIRROR command. We can probably just touch base and approve this in the morning.

Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

FAILED: Continuous integration, rev:298
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/113/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/libertine/job/build/323/console
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/244/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/325
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/309
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/309
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/309
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/303
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/303/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/303
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/303/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/303/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/303
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/303/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/303
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/303/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/303/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/113/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

FAILED: Continuous integration, rev:298
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/114/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/libertine/job/build/324/console
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/245/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/326
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/310
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/310
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/310
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/304
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/304/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/304
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/304/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/304/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/304
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/304/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/304
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/304/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/304/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/114/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

FAILED: Continuous integration, rev:299
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/115/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/libertine/job/build/325/console
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/246/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/327
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/311
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/311
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/311
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/305
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/305/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/305
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/305/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/305/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/305
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/305/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/305
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/305/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/305/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/115/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Larry Price (larryprice) wrote :

lgtm

review: Approve
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.canonical.com/libertine/job/lp-libertine-autoland/50/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/libertine/job/build/326/console
    None: https://jenkins.canonical.com/libertine/job/lp-generic-land-mp/75/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/328
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/312
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/312
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/312
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/306
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/306/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/306
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/306/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/306/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/306
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/306/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/306
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/306/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/306/console

review: Needs Fixing (continuous-integration)
300. By Christopher Townsend

Merge lp:libertine.

Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

PASSED: Continuous integration, rev:300
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/119/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/331
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/264
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/264
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=default/264
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/264
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/264
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=yakkety,testname=default/264
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/251/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/333
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/316
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/316
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/316
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/315
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/315/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/315
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/315/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/315
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/315/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/315
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/315/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/315
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/315/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/315
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/315/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/119/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 # You should have received a copy of the GNU General Public License along
6 # with this program. If not, see <http://www.gnu.org/licenses/>.
7
8+import contextlib
9 import crypt
10 import dbus
11 import lxc
12@@ -72,6 +73,31 @@
13 return host_timezone
14
15
16+class EnvLxcSettings(contextlib.ExitStack):
17+ """
18+ Helper object providing a way to set the proxies for testing
19+
20+ When running smoke tests on Jenkins, LXC create operations need the proxies
21+ set, but subsequent apt operations cannot have the proxies set. This will
22+ set the proxies when called and unset the proxies when the context is
23+ destroyed.
24+ """
25+ def __init__(self):
26+ super().__init__()
27+ self.set_proxy_env()
28+ self.callback(lambda: self.del_proxy_env())
29+
30+ def set_proxy_env(self):
31+ if 'LIBERTINE_JENKAAS_TESTING' in os.environ:
32+ os.environ['http_proxy'] = 'http://squid.internal:3128'
33+ os.environ['https_proxy'] = 'https://squid.internal:3128'
34+
35+ def del_proxy_env(self):
36+ if 'LIBERTINE_JENKAAS_TESTING' in os.environ:
37+ del os.environ['http_proxy']
38+ del os.environ['https_proxy']
39+
40+
41 class LibertineLXC(BaseContainer):
42 """
43 A concrete container type implemented using an LXC container.
44@@ -181,12 +207,13 @@
45
46 utils.create_libertine_user_data_dir(self.container_id)
47
48- if not self.container.create("download", 0,
49- {"dist": "ubuntu",
50- "release": self.installed_release,
51- "arch": self.architecture}):
52- print("Failed to create container")
53- return False
54+ with EnvLxcSettings():
55+ if not self.container.create("download", 0,
56+ {"dist": "ubuntu",
57+ "release": self.installed_release,
58+ "arch": self.architecture}):
59+ print("Failed to create container")
60+ return False
61
62 self.create_libertine_config()
63

Subscribers

People subscribed via source and target branches