← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1355343] Re: cloud-init writes sources.list without newline at end of file

 

This bug was fixed in the package cloud-init - 0.7.7~bzr1055-0ubuntu1

---------------
cloud-init (0.7.7~bzr1055-0ubuntu1) vivid; urgency=medium

  * New upstream snapshot.
    * move to python3 (LP: #1247132)
    * systemd: run cloud-init before systemd-user-sessions.service
    * Use the GCE short hostname. (LP: #1383794)
    * Enable user-data encoding support for GCE. (LP: #1404311)
    * Update to use a newer and better OMNIBUS_URL
    * Be more tolerant of 'ssh_authorized_keys' types
    * Fix parse_ssh_config failing in ssh_util.py
    * Increase the robustness/configurability of the chef module.
    * retain trailing newline from template files when using
      jinja2 (LP: #1355343)
    * fix broken output handling (LP: #1387340)
    * digital ocean datasource
    * update url in config drive documentation
    * freebsd: enable correct behavior on Ec2.
    * freebsd: Use the proper virtio FreeBSD network interface name.
 -- Scott Moser <smoser@xxxxxxxxxx>   Wed, 11 Feb 2015 15:55:58 -0500

** Changed in: cloud-init (Ubuntu)
       Status: Confirmed => 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/1355343

Title:
  cloud-init writes sources.list without newline at end of file

Status in Init scripts for use on cloud images:
  Fix Committed
Status in cloud-init package in Ubuntu:
  Fix Released

Bug description:
  This happens on Utopic. Trusty is fine. Steps to reproduce:

  sudo lxc-create -t ubuntu-cloud -n utopic -- -F -s daily -r utopic
  sudo lxc-start-ephemeral -o trusty -n test -d
  sudo lxc-attach -n test -- login -f root

  Examine /etc/apt/sources.list inside the host. For example, "cat
  /etc/apt/sources.list" shows the subsequent prompt at the end of the
  last line instead of on a fresh line. "vim /etc/apt/sources.list" says
  "noeol".

  Expected: newline at end of file, following Unix convention.
  Actual: no newline at end of file.

  Impact: messes up my local script that does trivial manipulations
  (adds a local repository).

  I've examined the sources.list shipped with the image, and it doesn't
  have this problem and the sources.list I see after startup looks
  radically different (matching the template in /etc/cloud/...). So it
  seems to me that the templating mechanism inside cloud-init is causing
  this.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.10
  Package: cloud-init 0.7.6~bzr992-0ubuntu1
  ProcVersionSignature: Ubuntu 3.13.0-7.26-generic 3.13.1
  Uname: Linux 3.13.0-7-generic x86_64
  NonfreeKernelModules: veth xt_conntrack ipt_REJECT ip6table_filter ip6_tables ebtable_nat ebtables overlayfs xt_CHECKSUM iptable_mangle ipt_MASQUERADE iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp bridge stp llc iptable_filter ip_tables x_tables dm_crypt kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel microcode psmouse serio_raw aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd floppy
  ApportVersion: 2.14.5-0ubuntu4
  Architecture: amd64
  Date: Mon Aug 11 18:00:26 2014
  PackageArchitecture: all
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

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