Age | Commit message (Collapse) | Author |
|
if the Datasource does not have an entry in config, then
set it to be a empty dictionary rather than None.
Also remove places that did this elsewhere.
|
|
|
|
- Modified the code to look for customization specification file in
/var/run/vmware-imc/ directory instead of /tmp
- Fixed the 'seed file' issue. There was a regression in DataSourceOVF.py
file. Fixed it.
|
|
|
|
3 things here:
a.) do not raise exception, only warn when trying to apply a network
config for a distro that does not have an implementation.
This is important since debian/ubuntu is the only one *with* an
implementation at the moment
b.) apply network config in 'cloud-init --local' even if there is
no datasource found.
c.) do not write 70-persistent-net.rules
the code was writing both 70-persistent-net.rules and
/etc/systemd/network/50-cloud-init-*.link files
that would just be confusing.
|
|
|
|
a.) do not write systemd link files if we do not have a mac address.
the check is updated to check for value rather than just presense
(ie, 'mac_address': None)
b.) DataSourceNoCloudNet: search in the nocloud seed dir
this is important because NoCloud if dsmode is Net will look only
would pass by, expecting NoCloudNet to pick it up
but NoCloudNet would not look in /var/lib/cloud/seed/nocloud
and thus skip it.
c.) support the disabling of network configuration
via /var/lib/cloud/data/upgraded-network
This is what the package upgrader is writing.
|
|
|
|
This adds support for suppling network configuration on the
kernel command line in 2 ways:
a.) kernel command line includes 'network-config=<base64>'
value of that parameter is base64 encoded json (or yaml)
it is taken as network config yaml.
In order to save space on kernel command line, it can be
base64 encoded gzipped json also.
b.) ip= paired with files authored by klibc's ipconfig tool
When network devices are brought up in the initramfs, klibc's
ipconfig tool writes files are named /run/net-<DEVNAME>.conf.
The best documentation available on that tool is
/usr/share/doc/libklibc/README.ipconfig.gz.
Also changes util.get_cmdline() to return the command line of
pid 1 if it is in a container. That is to make it consistent with
The systemd generator, and allow passing a command line to lxd,
as lxd does not mask /proc/cmdline.
|
|
|
|
This follows behavior of systemd/cloud-init-generator.
This way you can feed a command line into lxc container.
|
|
OpenStack clouds may provide network_data.json information via the
MetadataService in ConfigDrive.
Teach ConfigDrive to read, store and convert the data into network_config
yaml format. Making this available allows cloud-init to read network
config from OpenStack and use the distro.apply_network_config() method to
render the network_config from OpenStack into a distro network
configuration file.
|
|
net: add render_route comment to document why we added || true to route
statements
DataSourceConfigDrive: Only convert network_json to network_config when
caller reads network_config attr. Cache the conversion.
|
|
|
|
Changing this interface to allow for easy change later.
The thing that this will enable is:
a.) maas datasource to look at the system config and see if it
is configured with the same consumer_key
b.) datasource config could allow setting a variable that it
would look at.
|
|
|
|
add tests to show this functional.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Wesley's loader returned network state, so that got me updating
it, and i implemented as such. Then realized that actually
ipconfig (klibc) has no support for ipv6. So even though
i painfully generalized that, its pointless. next commit will
drop it.
|
|
|
|
|
|
|
|
Enabled NICS even in failure case.
Used util.del_dir() instead of shutil.rmtree.
|
|
|
|
|
|
Tested now with the generated fallback config in an lxc container.
Had to change to return a config rather than a network state.
Also this makes nocloud look in nocloud-net's seed dir.
This way it will read the seed and clame the datasource but
not do anything other than apply networking and the init_modules early.
It is a change in behavior of the time that boothooks woudl run to do
this. May need to change that back.
|
|
|
|
there is no data source that has a populated network_config()
so at this point this doesn't do anything.
|
|
|
|
|
|
on interfaces with characters between their numbers
|
|
I plan to re-use these methods later. They stand alone even if they
dont end up getting used, though.
|
|
'version' keys
|
|
- Removed systemd .link file generation, as it is not needed right now
- Changed return of generate_fallback_config to be just ns dict
- In distros.debian don't attempt to write .link file
|
|
|
|
configuration to be run if there is no network configuration provided by the
datasource.
NOTE: the code added here will not behave correctly if a net datasource has
network configuration. this code is temporary and should be reverted once
support for network configuration for net datasources after retrieving
config is in place.
based on: http://paste.ubuntu.com/15443576/
With this in place cloud-init properly chooses a fallback interface, configures
it and brings it online
|
|
not to attempt renaming the network interface to the default interface. Default
interface is controleld by net.DEFAULT_PRIMARY_INTERFACE and is currently set
to eth0 for legacy reasons. By default cloud-init will not attempt to rename
the device as this does not work in some situtations depending on the backing
driver of the device.
|
|
|
|
|
|
try/except blocks because there are sometimes read errors on the files and this
should not cause a stacktrace
|
|
|
|
|
|
|
|
|
|
distros base, and apply_fallback_network to distros to call
_write_network_fallback. Note that since _write_network_fallback is only
implemented for debian and ubuntu a check is needed to ensure that it does not
break behaviour for other distros.
Added function to disable .cfg files to util, since it may be useful elsewhere
|