[Bug 1540965] Re: Support Joyent lx-brand environment in smartos datasource
Robert C Jennings
1540965 at bugs.launchpad.net
Fri Feb 5 01:33:06 UTC 2016
SRU templated added and ready for upload/sponsorship.
Scott, can you ack the upload?
Ben, can you sponsor this?
Thanks.
** Description changed:
+ [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.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1540965
Title:
Support Joyent lx-brand environment in smartos datasource
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1540965/+subscriptions
More information about the Ubuntu-server-bugs
mailing list