Debian Bug report logs - #783847
cloud-init: no default security package mirror in cloud.cfg, cc_apt_configure module and apt_source statement fails

version graph

Package: cloud-init; Maintainer for cloud-init is Debian Cloud Team <debian-cloud@lists.debian.org>; Source for cloud-init is src:cloud-init (PTS, buildd, popcon).

Reported by: Brandon Bradley <bradleytastic@gmail.com>

Date: Thu, 30 Apr 2015 17:09:01 UTC

Severity: important

Found in version cloud-init/0.7.6~bzr976-2

Fixed in version cloud-init/0.7.7~bzr1156-1

Done: Bastian Blank <waldi@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Charles Plessy <plessy@debian.org>:
Bug#783847; Package cloud-init. (Thu, 30 Apr 2015 17:09:06 GMT) (full text, mbox, link).


Acknowledgement sent to Brandon Bradley <bradleytastic@gmail.com>:
New Bug report received and forwarded. Copy sent to Charles Plessy <plessy@debian.org>. (Thu, 30 Apr 2015 17:09:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Brandon Bradley <bradleytastic@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cloud-init: no default security package mirror in cloud.cfg, cc_apt_configure module and apt_source statement fails
Date: Thu, 30 Apr 2015 11:52:50 -0500
[Message part 1 (text/plain, inline)]
Package: cloud-init
Version: 0.7.6~bzr976-2
Severity: important

Hello!

cloud.cfg included with this package does not set a security package mirror by default. This causes **at least** apt_sources statements in cloud config files to fail. If apt_sources is not the last statement in the cloud config, all statements below apt_sources will fail as well. This is **very bad** for new users of cloud-init.

Example user-data, cloud-init.log, and cloud-init-output.log is attached.

Here is the error in cloud-init.log (prettied for human eyes):

Apr 30 11:00:33 test1 [CLOUDINIT] util.py[WARNING]: Running apt-configure (<module 'cloudinit.config.cc_apt_configure' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.pyc'>) failed
Apr 30 11:00:33 test1 [CLOUDINIT] util.py[DEBUG]: Running apt-configure (<module 'cloudinit.config.cc_apt_configure' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.pyc'>) failed

#012Traceback (most recent call last):
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 658, in _run_modules
#012    cc.run(run_name, mod.handle, func_args, freq=freq)
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/cloud.py", line 63, in run
#012    return self._runners.run(name, functor, args, freq, clear_on_fail)
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/helpers.py", line 197, in run
#012    results = functor(*args)
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.py", line 69, in handle
#012    generate_sources_list(release, mirrors, cloud, log)
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.py", line 159, in generate_sources_list
#012    templater.render_to_file(template_fn, '/etc/apt/sources.list', params)
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/templater.py", line 33, in render_to_file
#012    contents = render_from_file(fn, params)
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/templater.py", line 29, in render_from_file
#012    return render_string(util.load_file(fn), params)
#012  File "/usr/lib/python2.7/dist-packages/cloudinit/templater.py", line 40, in render_string
#012    return Template(content, searchList=[params]).respond()
#012  File "cheetah_DynamicallyCompiledCheetahTemplate_1430409633_31_30168.py", line 114, in respond
#012NotFound: cannot find 'security'


This statement will fix the problem (temporarily?):

system_info:
  package_mirrors:
    - arches: [default]
      failsafe: 
        security: http://security.debian.org/

Should probably have this in the default cloud.cfg unless there was/is a good reason not to.

Cheers!
Brandon Bradley


-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cloud-init depends on:
ii  debconf [debconf-2.0]                  1.5.56
ii  ifupdown                               0.7.53.1
ii  libpython2.7-stdlib [python-argparse]  2.7.9-2
ii  lsb-base                               4.1+Debian13+nmu1
ii  procps                                 2:3.3.9-9
ii  python                                 2.7.9-1
pn  python-boto                            <none>
pn  python-cheetah                         <none>
pn  python-configobj                       <none>
pn  python-oauth                           <none>
pn  python-prettytable                     <none>
pn  python-requests                        <none>
pn  python-software-properties             <none>
ii  python-yaml                            3.11-2

cloud-init recommends no packages.

cloud-init suggests no packages.
[user-data (text/plain, attachment)]
[cloud-init-output.log (text/plain, attachment)]
[cloud-init.log (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#783847; Package cloud-init. (Mon, 23 Nov 2015 07:24:04 GMT) (full text, mbox, link).


Acknowledgement sent to Charles Plessy <plessy@debian.org>:
Extra info received and forwarded to list. (Mon, 23 Nov 2015 07:24:04 GMT) (full text, mbox, link).


Message #10 received at 783847@bugs.debian.org (full text, mbox, reply):

From: Charles Plessy <plessy@debian.org>
To: Brandon Bradley <bradleytastic@gmail.com>, 783847@bugs.debian.org
Subject: Re: Bug#783847: cloud-init: no default security package mirror in cloud.cfg, cc_apt_configure module and apt_source statement fails
Date: Mon, 23 Nov 2015 16:21:14 +0900
Control: tag -1 pending

Le Thu, Apr 30, 2015 at 11:52:50AM -0500, Brandon Bradley a écrit :
> 
> cloud.cfg included with this package does not set a security package mirror
> by default. This causes **at least** apt_sources statements in cloud config
> files to fail. If apt_sources is not the last statement in the cloud config,
> all statements below apt_sources will fail as well. This is **very bad** for
> new users of cloud-init.

> This statement will fix the problem (temporarily?):
> 
> system_info:
>   package_mirrors:
>     - arches: [default]
>       failsafe: 
>         security: http://security.debian.org/

Dear Brandon,

I am sorry that it took so much time to answer you...  Now I am preparing an
update of the cloud-init package, and I will modify cloud.cfg in a way similar
to what you suggested.

diff --git a/debian/cloud.cfg b/debian/cloud.cfg
index 27500b0..4800f74 100644
--- a/debian/cloud.cfg
+++ b/debian/cloud.cfg
@@ -99,3 +99,4 @@ system_info:
      - arches: [default]
        failsafe:
          primary: http://ftp.debian.org/debian
+         security: http://security.debian.org/debian-security

Please let me know if you think other changes are necessary.

Have a nice day,

Charles

-- 
Charles Plessy
Tsurumi, Kanagawa, Japan.



Added tag(s) pending. Request was from Charles Plessy <plessy@debian.org> to 783847-submit@bugs.debian.org. (Mon, 23 Nov 2015 07:24:04 GMT) (full text, mbox, link).


Reply sent to Bastian Blank <waldi@debian.org>:
You have taken responsibility. (Fri, 29 Jan 2016 15:09:19 GMT) (full text, mbox, link).


Notification sent to Brandon Bradley <bradleytastic@gmail.com>:
Bug acknowledged by developer. (Fri, 29 Jan 2016 15:09:19 GMT) (full text, mbox, link).


Message #17 received at 783847-close@bugs.debian.org (full text, mbox, reply):

From: Bastian Blank <waldi@debian.org>
To: 783847-close@bugs.debian.org
Subject: Bug#783847: fixed in cloud-init 0.7.7~bzr1156-1
Date: Fri, 29 Jan 2016 13:49:02 +0000
Source: cloud-init
Source-Version: 0.7.7~bzr1156-1

We believe that the bug you reported is fixed in the latest version of
cloud-init, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 783847@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bastian Blank <waldi@debian.org> (supplier of updated cloud-init package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 29 Jan 2016 14:28:01 +0100
Source: cloud-init
Binary: cloud-init
Architecture: source
Version: 0.7.7~bzr1156-1
Distribution: unstable
Urgency: medium
Maintainer: Charles Plessy <plessy@debian.org>
Changed-By: Bastian Blank <waldi@debian.org>
Description:
 cloud-init - initialization system for infrastructure cloud instances
Closes: 702382 783847 784083 788196 789884 804782
Changes:
 cloud-init (0.7.7~bzr1156-1) unstable; urgency=medium
 .
   [ Charles Plessy ]
   * New usptream release and bzr snapshot.  (Closes: #804782)
     ed25519 ssh keys are generated (Closes: #788196).
   * Import some of the changes from ../config/cloud.cfg.
   * Add security mirror.
     Thanks to Brandon Bradley <bradleytastic@gmail.com> (Closes: #783847)
   * Use upstream systemd units (Closes: #784083).
   * debian/00_debian.cfg: ensure that 'nofail' is used instead of
     'nobootwait' (Closes: #702382, #789884).
 .
   [ Bastian Blank ]
   * Make Azure datasource run without root
   * Use upstream init scripts.
   * Use pybuild as build system.
   * Don't hardcode python dependencies.
   * Fix build dependencies.
   * Depend on lsb-release.
   * Update default cloud.cfg.
   * Add myself as uploader.
Checksums-Sha1:
 3d805bd2e8956395e3efcbdeb79c9dfabdbbcefa 2024 cloud-init_0.7.7~bzr1156-1.dsc
 e087b420786db6e1cc554091ab9738c8ad08fa67 571489 cloud-init_0.7.7~bzr1156.orig.tar.gz
 0737ea4a9a86be7fb2ed4bee698a64984b3806cb 26500 cloud-init_0.7.7~bzr1156-1.debian.tar.xz
Checksums-Sha256:
 46a154f831a47ce90ab5c882f37ede835dd940068f7da7f37be0f2437ad7317e 2024 cloud-init_0.7.7~bzr1156-1.dsc
 661f948ac07cd5d2ae1aa09fdaacbece911e1ce5250910e0c2a3321a2a449df7 571489 cloud-init_0.7.7~bzr1156.orig.tar.gz
 6147981a391dc05d489b4f206644344fd3940d7fcb3922199d44edb1dbd0ea3b 26500 cloud-init_0.7.7~bzr1156-1.debian.tar.xz
Files:
 690165498f8b94707cff310dc6dc64bd 2024 admin optional cloud-init_0.7.7~bzr1156-1.dsc
 ea30ad6234d3658ec4426ad9d02dd5b4 571489 admin optional cloud-init_0.7.7~bzr1156.orig.tar.gz
 ca66b35d7beac6275d15fde713598479 26500 admin optional cloud-init_0.7.7~bzr1156-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJWq2nPAAoJEG2TiIWKaf5RnuMH/3hGI9J1SbekqyXzySi6+kIJ
KvaksbAEqQvTNLbUNWNGh4e6VVURltuQS1pQCe63fzefPIQ/rPObFUfTo2BZXwUW
4BfJ+FrpktuUa1cIDJ6HZqOpqPPFCRm0pdqBsX2lbD8cg08sPYhpOxymrIjNCp9f
b7aFTGBQcOWAB4mB74ZmKYSMMILcly2nMWcehb9D3x2IsRUKWSQ0nAqEtt3ad4J4
gdX1MBdMdTei6hN/NCR8LDwvtD7nS/wGdvZWn90XqNWWE7090bdbiOMq7CxWnncK
lAyotsnUDLjnNll3Zjkf9Zpv2f6saklvLienKcZLih17Ky5ww4SPDMvb+U4bT/g=
=4TJh
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 03 Mar 2016 07:31:31 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Jan 4 12:27:30 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.