← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1685810] Re: nova-lxd needs to read 'product_name' in environment, not 'platform'

 

This bug was fixed in the package cloud-init -
0.7.9-113-g513e99e0-0ubuntu1~17.04.1

---------------
cloud-init (0.7.9-113-g513e99e0-0ubuntu1~17.04.1) zesty; urgency=medium

  * debian/update-grub-legacy-ec2: fix early exit failure no /etc/fstab
    file. (LP: #1682160)
  * New upstream snapshot.
    - nova-lxd: read product_name from environment, not platform.
      (LP: #1685810)
    - Fix yum repo config where keys contain array values [Dylan Perry]
    - template: Update debian backports template [Joshua Powers]
    - rsyslog: replace ~ with stop [Joshua Powers] (LP: #1367899)
    - Doc: add additional RTD examples [Joshua Powers]
    - Fix growpart for some cases when booted with root=PARTUUID.
      (LP: #1684869)
    - pylint: update output style to parseable [Joshua Powers]
    - pylint: fix all logging warnings [Joshua Powers]
    - CloudStack: Add NetworkManager to list of supported DHCP lease dirs.
      [Syed Mushtaq Ahmed]
    - net: kernel lies about vlans not stealing mac addresses, when they do
      [Dimitri John Ledkov] (LP: #1682871)
    - ds-identify: Check correct path for "latest" config drive
      [Daniel Watkins] (LP: #1673637)
    - doc: Fix example for resolv.conf configuration.  [Jon Grimm]
    - Fix examples that reference upstream chef repository.  [Jon Grimm]
    - doc: correct grammar and improve clarity in merging documentation.
      [David Tagatac]
    - doc: Add missing doc link to snap-config module. [Ryan Harper]
    - snap: allows for creating cloud-init snap [Joshua Powers]
    - DigitalOcean: assign IPv4ll address to lowest indexed interface.
      [Ben Howard] (LP: #1676908)
    - DigitalOcean: configure all NICs presented in meta-data.
      [Ben Howard] (LP: #1676908)
    - Remove (and/or fix) URL shortener references [Jon Grimm]
    - HACKING.rst: more info on filling out contributors agreement.
    - util: teach write_file about copy_mode option
      [Lars Kellogg-Stedman] (LP: #1644064)
    - DigitalOcean: bind resolvers to loopback interface.
      [Ben Howard] (LP: #1676908)
    - tests: fix AltCloud tests to not rely on blkid (LP: #1636531)

 -- Scott Moser <smoser@xxxxxxxxxx>  Thu, 27 Apr 2017 15:09:31 -0400

** Changed in: cloud-init (Ubuntu Zesty)
       Status: Fix Committed => Fix Released

-- 
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/1685810

Title:
  nova-lxd needs to read 'product_name' in environment, not 'platform'

Status in cloud-init:
  Fix Committed
Status in cloud-init package in Ubuntu:
  Fix Released
Status in cloud-init source package in Xenial:
  Fix Released
Status in cloud-init source package in Yakkety:
  Fix Released
Status in cloud-init source package in Zesty:
  Fix Released
Status in cloud-init source package in Artful:
  Fix Released

Bug description:
  === Begin SRU Template ===
  [Impact]
  Warning message for nova-lxd images in openstack clouds due to no valid datasource found.

  [Test Case]
  # It downloads a cloud image of a given release, and then creates a -proposed
  image with cloud-init upgraded.
  wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
  chmod 755 get-proposed-image

  source novarc

  for release in xenial yakkety zesty do;
   ref=$release-proposed;
   lxc-proposed-snapshot --proposed --publish $release $ref;
   lxc image export $ref .;
   imagefile=`ls -tr *gz | tail -n 1`
   mkdir $ref;
   cd $ref;
   sudo tar -zxvpf ../$imagefile;  # preserve permissions
   cd rootfs;
   sudo tar zcpvf $ref.tar.gz *;
   #upload raw image to your cloud
    openstack image create --disk-format raw --container-format bare --file $ref.tar.gz testing/$ref.tar.gz;
    openstack server create --image testing/$ref.tar.gz --flavor=m1.tiny lxd-$release --key-name <your-key>;
    nova floating-ip-create;
    nova foating-ip-associate <server> <address>;
    ssh ubuntu@<address> 'sudo DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force 2>&1 | grep Found';   # single datasource: OpenStack
  done

  [Regression Potential]
  Low as this only addresses the warning by correctly identifying the OpenStack cloud datasource.

  [Other Info]

  === End SRU Template ===

  It seems that signals were crossed in bug 1661797.
  cloud-init implementation reads the environment variable 'platform' from pid1, and nova-lxd implementation exported 'product_name'.

  Thus, ssh to nova-lxd provided container, user sees a warning.
  Also
  $ sudo DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force 2>&1 | grep PLAT
  PID_1_PLATFORM=unavailable

  While:
  $ sudo cat /proc/1/environ | tr '\0' '\n'
  product_name=OpenStack Nova
  container=lxc

  Related bugs:
   * bug 1661797: identify lxd-nova platform to enable Openstack datasource

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


References