Age | Commit message (Collapse) | Author |
|
After reboot cloud-init would fail as the previously pickled object
would have a check_instance_id signature but it didn't match expected
LP: #1575055
|
|
LP: #1576273
|
|
It could be that there are also 'dhclient6.leases' files in /var/lib/dhcp
when DHCPv6 is used next to DHCPv4.
This patch makes sure we only read from DHCPv4 lease files
|
|
When ip= on the kernel command line defines the networking, set
those network devices to be manually controlled, instead of 'auto'.
The reason for this is that if they're marked as 'auto':
a.) a second attempt will be made to ifup them.
b.) they'll be brought down on shutdown
'b' is problematic on network root filesystem.
Also this picks up 2 changes from curtin's net module:
- Cleanup newline logic so we always have a clean '\n\n' between stanza
- Add a unittest to validate bonding network config render, specifically
when to emit auto $iface for dependent bond slaves.
LP: #1568637
|
|
|
|
when reading the initramfs configurewd devices and turning them
into network config, we change to not have 'auto' control (or allow=auto).
The reason for this is that if the device was still up:
a.) it would try to bring it up again (due to bug 1570142)
b.) it would be brought down.
'b' is problematic if there is an iscsi or network root filesystem.
Note, that ifupdown does now support 'no-auto-down' which means
that the nic should not be brought down on 'ifdown -a'.
LP: #1568637
|
|
This picks up newline cleanup and some bond fixes from curtin at rev 374.
- Cleanup newline logic so we always have a clean '\n\n' between stanza
- Add a unittest to validate bonding network config render, specifically
when to emit auto $iface for dependent bond slaves.
|
|
Do not apply networking configuration whenever a previous datasource
has been loaded from disk and found to be valid (via positive
return 'check_instance_id' or user configuration of manual_cache_clean).
This effectively means that we apply fallback networking only once
per instance rather than every boot on any datasource with
'check_instance_id' implemented.
LP: #1571004
|
|
|
|
This attempts to only apply the networking once per instance
by doing so only if the datasource was restored from disk.
This will work by default for datasources with a functioning
check_instance_id or if the user has set manual_cache_clean to true.
|
|
Ubuntu cloud images in created a file during build that
would interfere with cloud-init's discovered or rendered networking.
To avoid the issues, cloud-init was deleting
/etc/network/interfaces.d/eth0.cfg .
The build process no longer creates this file.
However, to address any existing files cloud-init will still remove
the file if it has known content and warn otherwise.
LP: #1563487
|
|
Just skip devices that are named veth*.
The fix here is to ignore lxd created devices, but any other veth
device that is created at this point in boot is probably not the
right interface to dhcp on.
LP: #1569064
|
|
This simply allows the phone_home template to pass the systems fully
qualified domain name.
LP: #1566824
|
|
Now, validation_key is always a path to a file, as it is in
chef's client.rb syntax.
validation_cert is always the *content* of that file that should
be written. However, if validation_cert is the string "system",
then we do not write that value, but rather assume the file exists.
LP: #1568940
|
|
It does not make sense to consider bridges when searching for fallback
networking. If the system is configured with a bridge, then its probably
for some purpose other than to get to a metadata service.
Considering the bridge could make cloud-init pick the wrong device on reboot.
LP: #1569974
|
|
The rh_subscription config module would attempt to connect to the RHN servers
even when no config is provided.
Now, instead check to make sure that valid config is provided first.
That consists of username and password or a activation key.
LP: #1536706
|
|
In Cloudsigma, the datasource would warn if no product id was availble.
SmartOS would log exception. This fixes both of those, changing
the warning to a debug message.
LP: #1569469
|
|
A system that had booted, upgraded, and then rebooted would show
a cloud-init stack trace as it attempted to run new code
with the old pickled object. The old object would not have the
seed_dirs attribute. So we check and fallback correctly if that
is not present.
LP: #1568150
|
|
|
|
Now, validation_key is always a path to a file, as it is in
chef's client.rb syntax.
validation_cert is always the *content* of that file that should
be written. However, if validation_cert is the string "system",
then we do not write that value, but rather assume the file exists.
LP: #1568940
|
|
It exposes the most useful debconf keys as cloud-init configuration keys.
|
|
- use util.del_file rather than os.remove
- raise exception if debconf-communicate is not present
- add a trailing newline into debconf-communicate input
|
|
|
|
|
|
debconf logic to a function
|
|
|
|
Instead of passing the raw object and expecting the write_file to work
automatically make sure we explicitly pass the string version of it so
that the write_file routine can correctly encode/decode it as needed.
LP: #1479988
|
|
|
|
The rh_subscription config module would attempt to connect to the RHN servers
even when no config is provided.
Now, instead check to make sure that valid config is provided first.
That consists of username and password or a activation key.
LP: #1536706
|
|
revision 1179 regressed adding a user that did not have a 'groups'
entry present in cloud-config.
This handles that correctly, making 'add_user' able to take:
a.) groups="group1,group2"
b.) groups=["group1", "group2"]
c.) groups=None
d.) no groups parameter
Additionally, if a primary group is specified it will also be created.
End result is that this is functional:
#cloud-config
groups: ["sudo"]
users:
- name: sysop
primary-group: sysop
groups: "sudo,adm"
shell: /bin/bash
- name: user1
primary-group: users
groups: sudo
- name: foo1
- name: bar
gecos: Bar
groups: ["bargroup"]
Resulting in:
$ groups sysop
sysop : sysop adm sudo
$ groups user1
user1 : users sudo
$ groups foo1
foo1 : foo1
$ groups bar
bar : bar bargroup
LP: #1562918
|
|
|
|
When provided with gzipped data, an exception would be raised
because of a conversion to string.
This fixes the issue and adds a test for write_files.
LP: #1565638
|
|
syslog.target is obsolete in debian, this fixes a lintian warning.
LP: #1536964
|
|
Installation from gems was previously always broken. This
fixes the order or parameters calling install_chef_from_gems.
LP: #1553345
|
|
Send the --force flag to mkfs or other filesystems when target
is a block device. This fixes a general code flow issue where
we were setting the --force flag.
LP: #1548772
|
|
Now if you log in with unsupported locale, you'll see:
The unknown environment variables are:
LC_CTYPE=en_GB.utf-8 LC_MESSAGES=en_GB.utf-8 LC_ALL=en_GB.utf-8
LP: #1558069
|
|
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.
|
|
- Implement set_passwd
- Implement set_timezone
- support installing packages
- Use /bin/tcsh as default user shell (FreeBSD default)
- Change default username to freebsd
- Enable set-passwords, package-update-upgrade-install and timezone modules
|
|
|
|
|
|
revision 1179 regressed adding a user that did not have a 'groups'
entry present. This should handle that correctly, making 'add_user'
able to take:
a.) groups="group1,group2"
b.) groups=["group1", "group2"]
c.) groups=None
d.) no groups parameter
LP: #1562918
|
|
- 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. This means that the fallback datasource has
to get things right.
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.
|
|
|
|
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.
|
|
Instead of sleep and check loop, use 'udevadm settle' to wait.
since we run from a udev event, this is sufficient.
udev settle will exit when either of
a.) the file exists
b.) the udev event queue has all been processed.
c.) timeout is reached.
Since cloud-init-wait is being run as a udev event, 'b' cannot
be satisfied until it finishes. Thus, this essentially becomes a
inotify based wait for the file /run/cloud-init/network-config-ready
and no loops are needed.
|
|
since we run from a udev event, this is sufficient.
udev settle will exit when either of
a.) the file exists
b.) the udev event queue has all been processed.
Since cloud-init-wait is being run as a udev event, 'b' cannot
be satisfied until it finishes. Thus, this essentially becomes a
inotify based wait for the file /run/cloud-init/network-config-ready
and no loops are needed.
|
|
this allows 'cloud-init --local' to fully run before networking comes up.
By doing so, we can now cleanly apply networking to the new system.
This adds support for reading ConfigDrive network configuration
and also from NoCloud. The support is only present for ubuntu/debian
at the current time. Other distros will follow.
Also ability to specify network configuration on kernel command line
via either ip= or network-config=<base64>.
|
|
|
|
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.
|