← 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 is fixed in cloud-init 0.7.7

** Changed in: cloud-init
       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/1355343

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

Status in cloud-init:
  Fix Released
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