[Bug 1540965] Re: Support Joyent lx-brand environment in smartos datasource

Robert C Jennings 1540965 at bugs.launchpad.net
Fri Feb 5 20:14:58 UTC 2016


New trusty.debdiff based on feedback from Ben.  I have cleaned up the
changelog (version and path to patch), fixed the diff to have the
correct from address, and changed dmi_data() to call
util.read_dmi_data() rather than use a local implementation of that util
function.

** Patch added: "trusty.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1540965/+attachment/4564774/+files/trusty.debdiff

** Patch removed: "trusty.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1540965/+attachment/4564773/+files/trusty.debdiff

** Patch removed: "trusty.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1540965/+attachment/4564237/+files/trusty.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1540965

Title:
  Support Joyent lx-brand environment in smartos datasource

Status in cloud-init package in Ubuntu:
  Fix Released
Status in cloud-init source package in Trusty:
  New
Status in cloud-init source package in Wily:
  New
Status in cloud-init source package in Xenial:
  Fix Released

Bug description:
  [Impact]

   * Cloud-init does not support the datasource presented to LX-Brand
     zones in SmartOS.  Without this support cloud-init does not work
     on the Joyent cloud platform's container service.

   * The metadata is provided in the same format as already supported
     for KVM-based instances for the SmartOS datasource (with
     communication over a serial port).  For LX-Brand zones the
     metadata is accessed via a socket file.

  [Test Case]

   * Install cloud-init on an lx-brand zone image and
     run 'cloud-init init'.  No metadata will be found without
     this patch.

   * With the patched cloud-init, run 'cloud-init init' on the
     new lx-brand zones images.  The metadata should be discovered
     and the instance should be recognized as being provisioned.
     Perform the same testing on existing KVM-based SmartOS instances
     to ensure there is no regression.

  [Regression Potential]

   * [Trusty only] This SRU backports support for the V2 metadata format
     that has been present since the Vivid release.  This is well tested
     code and has no user-facing impact.  This was done because the
     V2 datasource allows for serial or socket communication. The existing
     Joyent datasource uses the serial port provided in KVM instances,
     however LX-brand zones have a socket instead @
     /native/.zonecontrol/metadata.sock.  Additionally the V2 datasource
     provides checksums and response length fields that allow for
     validation of results.  Additional testing was performed on Trusty
     SmartOS and KVM instances to validate these changes.

   * To keep code common for KVM (serial) and LX-Brand (socket)
     communication the code had to switch to read byte-by-byte from
     the metadata source file object to avoid reading past the end of
     input on the socket which would block indefinitely.  This is a change
     from using readline and will be slower but not significantly so.

   * This builds on the existing SmartOS datasource to enable LX-Brand.
     There is risk that this will break the datasouce on existing KVM
     instances. To mitigate this risk testing has been performed on
     both environments with Trusty, Vivid (out of support today),
     Wily, and Xenial.

  [Other Info]

   * This is python 2/3 byte/string safe on Vivid, Wily, and Trusty
     where cloud-init supports python 3.

  ==== Original Description ====

  The Joyent Metadata Protocol Specification (Version 2)[1] allows for
  serial or socket communication. The existing Joyent datasource uses
  the serial port provided in KVM instances, however LX-brand zones have
  a socket instead @ /native/.zonecontrol/metadata.sock.

  Detecting we are in a Joyent LX-brand zone is possible by looking at '/bin/uname -v' which will report "BrandZ virtual linux" or checking for the existence of a /native mount where '/native/usr/bin/uname -s' reports
  SunOS.

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



More information about the Ubuntu-sponsors mailing list