support strict cloud platform identification and warnings [ds-identify]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Scott Moser | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== 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/
3.) modify /usr/lib/
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:
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/
3.) reboot
4.) expect that same datasource is found.
[Other Information]
See also: https:/
=== 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-
ProcVersionSign
Uname: Linux 4.9.0-15-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
Date: Fri Mar 3 04:25:51 2017
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
This bug was fixed in the package cloud-init - 0.7.9-47- gc81ea53- 0ubuntu1
--------------- 47-gc81ea53- 0ubuntu1) zesty; urgency=medium
cloud-init (0.7.9-
* debian/rules: install Z99-cloudinit- warnings. sh to /etc/profile.d warnings: Add profile.d script for showing warnings on locale- test.sh: convert tabs to spaces, remove unneccesary tion.
* New upstream snapshot.
- Support warning if the used datasource is not in ds-identify's list
(LP: #1669675)
- Z99-cloudinit-
login.
- Z99-cloud-
execute bit in permissions.
- tools/ds-identify: look at cloud.cfg when looking for ec2 strict_id.
- tools/ds-identify: fix bug that would mistakingly enable vmware guest
customiza
-- Scott Moser <email address hidden> Fri, 03 Mar 2017 01:56:19 -0500