Merge ~smoser/cloud-init:doc/softlayer-improve-doc-in-datasource into cloud-init:master

Proposed by Scott Moser
Status: Merged
Approved by: Scott Moser
Approved revision: 6ab0f10fade0f5e6e830245bfe60600c84e532d8
Merge reported by: Scott Moser
Merged at revision: b73559e2f98025e08fdb42544bb1d2e0f92a7a8d
Proposed branch: ~smoser/cloud-init:doc/softlayer-improve-doc-in-datasource
Merge into: cloud-init:master
Diff against target: 79 lines (+63/-1)
1 file modified
cloudinit/sources/DataSourceIBMCloud.py (+63/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Chad Smith Approve
Philip Roche (community) Approve
Review via email: mp+344255@code.launchpad.net

Commit message

IBMCloud: improve documentation in datasource.

This adds information to the IBMCloud datasource describing the
6 different scenarios that it is expected to handle.

Description of the change

see commit message

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:29876e241e9034a60f91b72749cae41d8658b842
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1058/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1058/rebuild

review: Approve (continuous-integration)
Revision history for this message
Philip Roche (philroche) wrote :

Reads well and is as per my understanding of their boot modes too

review: Approve
Revision history for this message
Chad Smith (chad.smith) wrote :

minor nits and then +1/

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:6ab0f10fade0f5e6e830245bfe60600c84e532d8
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1059/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1059/rebuild

review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=b73559e2

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/sources/DataSourceIBMCloud.py b/cloudinit/sources/DataSourceIBMCloud.py
2index 02b3d56..cfa724b 100644
3--- a/cloudinit/sources/DataSourceIBMCloud.py
4+++ b/cloudinit/sources/DataSourceIBMCloud.py
5@@ -30,11 +30,73 @@ There are 2 different api exposed launch methods.
6 mean that 1 in 8^16 (~4 billion) Xen ConfigDrive systems will be
7 incorrectly identified as IBMCloud.
8
9+The combination of these 2 launch methods and with or without user-data
10+creates 6 boot scenarios.
11+ A. os_code with user-data
12+ B. os_code without user-data
13+ Cloud-init is fully operational in this mode.
14+
15+ There is a block device attached with label 'config-2'.
16+ As it differs from OpenStack's config-2, we have to differentiate.
17+ We do so by requiring the UUID on the filesystem to be "9796-932E".
18+
19+ This disk will have the following files. Specifically note, there
20+ is no versioned path to the meta-data, only 'latest':
21+ openstack/latest/meta_data.json
22+ openstack/latest/network_data.json
23+ openstack/latest/user_data [optional]
24+ openstack/latest/vendor_data.json
25+
26+ vendor_data.json as of 2018-04 looks like this:
27+ {"cloud-init":"#!/bin/bash\necho 'root:$6$<snip>' | chpasswd -e"}
28+
29+ The only difference between A and B in this mode is the presence
30+ of user_data on the config disk.
31+
32+ C. template, provisioning boot with user-data
33+ D. template, provisioning boot without user-data.
34+ With ds-identify cloud-init is fully disabled in this mode.
35+ Without ds-identify, cloud-init None datasource will be used.
36+
37+ This is currently identified by the presence of
38+ /root/provisioningConfiguration.cfg . That file is placed into the
39+ system before it is booted.
40+
41+ The difference between C and D is the presence of the METADATA disk
42+ as described in E below. There is no METADATA disk attached unless
43+ user-data is provided.
44+
45+ E. template, post-provisioning boot with user-data.
46+ Cloud-init is fully operational in this mode.
47+
48+ This is identified by a block device with filesystem label "METADATA".
49+ The looks similar to a version-1 OpenStack config drive. It will
50+ have the following files:
51+
52+ openstack/latest/user_data
53+ openstack/latest/meta_data.json
54+ openstack/content/interfaces
55+ meta.js
56+
57+ meta.js contains something similar to user_data. cloud-init ignores it.
58+ cloud-init ignores the 'interfaces' style file here.
59+ In this mode, cloud-init has networking code disabled. It relies
60+ on the provisioning boot to have configured networking.
61+
62+ F. template, post-provisioning boot without user-data.
63+ With ds-identify, cloud-init will be fully disabled.
64+ Without ds-identify, cloud-init None datasource will be used.
65+
66+ There is no information available to identify this scenario.
67+
68+ The user will be able to ssh in as as root with their public keys that
69+ have been installed into /root/ssh/.authorized_keys
70+ during the provisioning stage.
71+
72 TODO:
73 * is uuid (/sys/hypervisor/uuid) stable for life of an instance?
74 it seems it is not the same as data's uuid in the os_code case
75 but is in the template case.
76-
77 """
78 import base64
79 import json

Subscribers

People subscribed via source and target branches