← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1745663] [NEW] tests: lxd console code breaks when using lxd as snap

 

Public bug reported:

Running the integration tests using the lxd backend fails when lxd is installed as a snap:
https://paste.ubuntu.com/26465769/

The failure is a result of the
tests/cloud_tests/platforms/lxd.py:_setup_console_log() function
attempting to modify the configuration:

49         cfg = "lxc.console.logfile=%s" % logf
50         orig = self._pylxd_container.config.get('raw.lxc', "")
51         if orig:
52             orig += "\n"
53         self._pylxd_container.config['raw.lxc'] = orig + cfg

LXD logs: https://paste.ubuntu.com/26465860/
My lxd setup/config: https://paste.ubuntu.com/26465838/

The specific issue I believe is that LXD as a snap is confined and does
not have access to /tmp (need to confirm this) hence the error message:

console.c:lxc_console_create:561 - No such file or directory - failed to
open console log file "/tmp/LXDInstance-cloud-test-ubuntu-xenial-image-
modification-em88d5kzvxzdrzsgod029n8iztb/console.log"

** Affects: cloud-init
     Importance: Undecided
         Status: New

** Description changed:

  Running the integration tests using the lxd backend fails when lxd is installed as a snap:
  https://paste.ubuntu.com/26465769/
  
  The failure is a result of the
  tests/cloud_tests/platforms/lxd.py:_setup_console_log() function
  attempting to modify the configuration:
  
  49         cfg = "lxc.console.logfile=%s" % logf
  50         orig = self._pylxd_container.config.get('raw.lxc', "")
  51         if orig:
  52             orig += "\n"
  53         self._pylxd_container.config['raw.lxc'] = orig + cfg
  
  LXD logs: https://paste.ubuntu.com/26465860/
  My lxd setup/config: https://paste.ubuntu.com/26465838/
  
  The specific issue I believe is that LXD as a snap is confined and does
- not have access to /tmp hence the error message:
+ not have access to /tmp (need to confirm this) hence the error message:
  
  console.c:lxc_console_create:561 - No such file or directory - failed to
  open console log file "/tmp/LXDInstance-cloud-test-ubuntu-xenial-image-
  modification-em88d5kzvxzdrzsgod029n8iztb/console.log"

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1745663

Title:
  tests: lxd console code breaks when using lxd as snap

Status in cloud-init:
  New

Bug description:
  Running the integration tests using the lxd backend fails when lxd is installed as a snap:
  https://paste.ubuntu.com/26465769/

  The failure is a result of the
  tests/cloud_tests/platforms/lxd.py:_setup_console_log() function
  attempting to modify the configuration:

  49         cfg = "lxc.console.logfile=%s" % logf
  50         orig = self._pylxd_container.config.get('raw.lxc', "")
  51         if orig:
  52             orig += "\n"
  53         self._pylxd_container.config['raw.lxc'] = orig + cfg

  LXD logs: https://paste.ubuntu.com/26465860/
  My lxd setup/config: https://paste.ubuntu.com/26465838/

  The specific issue I believe is that LXD as a snap is confined and
  does not have access to /tmp (need to confirm this) hence the error
  message:

  console.c:lxc_console_create:561 - No such file or directory - failed
  to open console log file "/tmp/LXDInstance-cloud-test-ubuntu-xenial-
  image-modification-em88d5kzvxzdrzsgod029n8iztb/console.log"

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1745663/+subscriptions


Follow ups