New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 757526 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[autotest] Container hostname setting is not reliable

Project Member Reported by kenobi@chromium.org, Aug 21 2017

Issue description

The lxc.utsname config variable currently used to set the container hostname is not reliable.  Specifically, it appears to work only if the default container hostname (i.e. the container name), is not a valid RFC-952 compliant hostname.

To get concrete, what this means is that if the container naming scheme ever changes such that our container names no longer contain underscores, then the hostnames of those containers will not be set correctly, which in turn will cause CTS test results to be incorrectly tagged.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/f583ceaa50bc187e262f077a7d09c1ef6e3dc615

commit f583ceaa50bc187e262f077a7d09c1ef6e3dc615
Author: Ben Kwa <kenobi@google.com>
Date: Wed Aug 23 13:23:29 2017

[autotest] Make Container.set_hostname reliable.

The lxc.utsname config variable does not function reliably (see
associated bug).  This change uses an alternate, more reliable method to
set the container hostname.

Also, factor the container name munging out of the set_hostname function
and into the caller - it's more intuitive that way.

BUG= chromium:757526 
TEST=sudo python lxc_functional_test.py -v
TEST=sudo python container_test.py -v

Change-Id: I26d04fe342267b941dca8c2e20663ec022e77132
Reviewed-on: https://chromium-review.googlesource.com/624698
Commit-Ready: Ben Kwa <kenobi@chromium.org>
Tested-by: Ben Kwa <kenobi@chromium.org>
Reviewed-by: Ben Kwa <kenobi@chromium.org>

[modify] https://crrev.com/f583ceaa50bc187e262f077a7d09c1ef6e3dc615/site_utils/lxc/zygote.py
[modify] https://crrev.com/f583ceaa50bc187e262f077a7d09c1ef6e3dc615/site_utils/lxc/container.py
[modify] https://crrev.com/f583ceaa50bc187e262f077a7d09c1ef6e3dc615/site_utils/lxc/container_unittest.py
[modify] https://crrev.com/f583ceaa50bc187e262f077a7d09c1ef6e3dc615/site_utils/lxc/zygote_unittest.py
[modify] https://crrev.com/f583ceaa50bc187e262f077a7d09c1ef6e3dc615/site_utils/lxc/container_bucket.py

Comment 2 by kenobi@chromium.org, Aug 30 2017

Status: Fixed (was: Started)

Sign in to add a comment