Public bug reported:

=== Begin SRU Template ===
[Impact]
Cloud-init searches through each of its datasources until it finds one.
This can be slow or error prone leading to timeouts or other problems
in boot.  It also makes cloud-init not suitable to be installed in an
image as it is very much not 'inert' even when it is not necessary.

The changes covered in this bug add code that runs in a systemd generator
that quickly determines which datasource should be used.  That code
(ds-identify) can be configured to disable cloud-init if no source is found.
By doing so, no cloud-init python code is even executed making for faster
boot.

The changes in behavior in this first phase are:
 * 16.10 : Attempt a search.  If a positive result is found, enable only
   that datasource in cloud-init.  If no result is found, keep cloud-init
   enabled.  cloud-init will search its normal list and issue warnings.

 * 16.04 : report only mode.
   Attempt a search, but in report only mode.  Warnings are issued
   by cloud-init if it uses a datasource not in the result list.

[Test Case]
a.) forced fail
    1.) launch instance on KVM OpenStack. enable proposed, upgrade.
    2.) rm -Rf /var/lib/cloud /var/log/cloud-init* ;
    3.) modify /usr/lib/cloud-init/ds-identify to
           return $DS_NOT_FOUND
        in the first line of 'dscheck_OpenStack'
    4.) reboot
    5.) ssh in.  You should see a warning on stderr on ssh connection.
    
b.) forced fail with warnings disabled.
    follow 'a' above, but launch instance with user-data of
      #cloud-config
      warnings:
        dsid_missing_source: off
    Upon ssh in in step 5, no warnings should be seen.

c.) normal instance
    1.) launch instance, enable proposed, upgrade
    2.) rm -Rf /var/lib/cloud /var/log/cloud-init*
    3.) reboot
    4.) expect that same datasource is found.

[Other Information]
See also: 
https://lists.ubuntu.com/archives/ubuntu-devel/2017-February/039697.html
=== End SRU Template ===

Related bugs:
 * bug 1660385: Alert user of Ec2 Datasource on lookalike cloud

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: cloud-init 0.7.9-38-g83606ae-0ubuntu1
ProcVersionSignature: Ubuntu 4.9.0-15.16-generic 4.9.5
Uname: Linux 4.9.0-15-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
Date: Fri Mar  3 04:25:51 2017
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: cloud-init (Ubuntu)
     Importance: Medium
     Assignee: Scott Moser (smoser)
         Status: Confirmed

** Affects: cloud-init (Ubuntu Xenial)
     Importance: Medium
         Status: Confirmed

** Affects: cloud-init (Ubuntu Yakkety)
     Importance: Medium
         Status: Confirmed


** Tags: amd64 apport-bug dsid uec-images zesty

** Also affects: cloud-init (Ubuntu Yakkety)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Changed in: cloud-init (Ubuntu Xenial)
       Status: New => Confirmed

** Changed in: cloud-init (Ubuntu Yakkety)
       Status: New => Confirmed

** Changed in: cloud-init (Ubuntu Xenial)
   Importance: Undecided => Medium

** Changed in: cloud-init (Ubuntu Yakkety)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1669675

Title:
  support strict cloud platform identification and warnings [ds-
  identify]

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to