Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
|
|
|
|
This adds a check in cloud-init to see if the existing (cached)
datasource is still valid. It relies on support from the Datasource
to implement 'check_instance_id'. That method should quickly determine
(if possible) if the instance id found in the datasource is still valid.
This means that we can still notice new instance ids without
depending on a network datasource on every boot.
I've also implemented check_instance_id for the superclass and for
sources:
DataSourceAzure (check dmi data)
DataSourceConfigDrive (check dmi data)
DataSourceNocloud (check the seeded data or kernel command line)
DataSourceOpenstack (check dmi data)
LP: #1553815
|
|
|
|
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
|
|
This adds a check in cloud-init to see if the existing (cached)
datasource is still valid. It relies on support from the Datasource
to implement 'check_instance_id'. That method should quickly determine
(if possible) if the instance id found in the datasource is still valid.
This means that we can still notice new instance ids without
depending on a network datasource on every boot.
I've also implemented check_instance_id for the superclass and for
3 classes:
DataSourceAzure (check dmi data)
DataSourceOpenstack (check dmi data)
DataSourceNocloud (check the seeded data or kernel command line)
LP: #1553815
|
|
on in the event that no network configuration was provided to cloud-init
- Devices in /sys/class/net aside from loopback devices are scanned
- Each device is tested to determine if it has a carrier using
/sys/class/net/DEV/carrier, devices which do are preferred as they are most
likely connected to the outside world
- Devices which do not have a carrier but which might still be connected due
to being in a dormant or down state are used as fallbacks in case no
devices are found which have a carrier
- A network state dictionary is generated to be passed to
render_network_state to write ENI
- A systemd link file is generated that will rename the chosen device to eth0
|
|
|
|
|
|
|
|
this might work. And if it does means we could generally test this
as the file that the cloud-init-wait will wait for will actually get
created.
|
|
I had left this in to commit it, it was my first pass at
cloud-init doing the naming itself. That design was then
replaced with the idea for cloud-init to instead write systemd.rules
files.
|
|
Note, still broken as cloud-init local is not going to ever touch the
CI_NET_READY file (/run/cloud-init/network-config-ready).
So as this is , it will actually just block for 60 seconds and go on.
|
|
|
|
atomic_write_file just does less and easily utilized
for the same purpose that atomic_write_json served.
|
|
python3 support was moved out of pyflakes into python3-pyflakes.
Adjust the package to build on trusty where python3-pyflakes was
not present and also on xenial where it is.
Note, this does mean that sbuild now requires '--resolve-alternatives'.
That is how it is used on launchpad but is not the default in sbuild.
|
|
Added code to customize timezone.
Added few utility functions to send events to the VMware hypervisor.
Re-factored the code little bit.
Added code to send SUCCESS event when customization succeeds.
Added code to send FAILED event if any error occurs during customization.
|
|
parsing the command line parameters returned a dictionary
but _merge_new_seed was expecting a string to be yaml loaded.
Change is to make _merge_new_seed take either string or dict.
|
|
|
|
Add option checking for ssh_pwauth to bring behavior inline with the
description cloud-config.txt example.
Previously, setting 'ssh_pwauth' to 'unchanged' or '' would result
in an empty value for PasswordAuthentication when it should have
simply not been modified.
|
|
|
|
|
|
|
|
|
|
|
|
generator:
* write to directory /run/cloud-init/ rather than /run
* read from /proc/1/cmdline for the command line if inside a container
cloud-init-local.service: now run fully before any networking comes up.
cloud-init.service: run before network-online.target and after
networking.service. This ends up meaning other things that require
network-online.target will run after cloud-init.service, but
cloud-init.service will still have networking.
The 'networking.service' is ifupdown specific. Further changes would
be needed for other networking systems (networkd for example)
|
|
Previously we returned a string of "." the same length as the dmi field.
That seems confusing to the user as "." would seem like a valid response
when in fact this value should not be considered valid.
So now, in this case, return empty string.
|
|
|
|
|
|
|
|
Previously we returned a string of "." the same length as the dmi field.
That seems confusing to the user as "." would seem like a valid response
when in fact this value should not be considered valid.
So now, in this case, return empty string.
|
|
- Changed the really long 'from ... import ...' statements.
|
|
|
|
functional
|
|
|
|
- Now my branch is identical to trunk.dist
|
|
|
|
this adds the consumption of 'network-config' to the datasourcenocloud.
There is an implementation of the network rendering taht is untested
in distros/debian.
|
|
it is not uncommon to find dmi data in /sys full of 'ff'. utf-8
decoding of those would fail, causing warning and stacktrace.
Return '.' instead of \xff. This is what dmidecode would return.
$ dmidecode --string system-product-name
|