← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~bac/launchpad/bug-981114 into lp:launchpad

 

Brad Crittenden has proposed merging lp:~bac/launchpad/bug-981114 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #981114 in Launchpad itself: "LP tests fail in lxc due to 'bzr whoami' failure"
  https://bugs.launchpad.net/launchpad/+bug/981114

For more details, see:
https://code.launchpad.net/~bac/launchpad/bug-981114/+merge/101970

= Summary =

Tests fail if /etc/mailname is not set, which is not a problem for
developer machines but is for lxc containers.

== Proposed fix ==

Set /etc/mailname to be 'localhost'.

== Pre-implementation notes ==

Discussions with Gary.

== Implementation details ==

As above.

== Tests ==

None

== Demo and Q/A ==

Run setuplxc and verify /etc/mailname is there and that the following
tests pass:

bin/test -vvt test_uncommit_branch

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  utilities/setuplxc.py
-- 
https://code.launchpad.net/~bac/launchpad/bug-981114/+merge/101970
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/launchpad/bug-981114 into lp:launchpad.
=== modified file 'utilities/setuplxc.py'
--- utilities/setuplxc.py	2012-03-30 15:00:46 +0000
+++ utilities/setuplxc.py	2012-04-13 20:13:25 +0000
@@ -1111,6 +1111,10 @@
     # ephemeral container
     root_sshcall('mkdir -p /rootfs/usr/lib')
     root_sshcall('ln -s /usr/lib/graphviz /rootfs/usr/lib/graphviz')
+    # XXX: BradCrittenden 2012-04-13 bug=981114: Manually create /etc/mailname
+    # or bzrlib gets upset and returns None,None for whoami causing test
+    # failures.
+    root_sshcall("echo 'localhost' | cat > /etc/mailname")
 
 
 def stop_lxc(lxcname, ssh_key_path):