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

Subscribers

People subscribed via source and target branches