Age | Commit message (Collapse) | Author |
|
At least (currently) for rhel7 the argparse package does
not get installed (even though rpm say it is installed by
the python core package) and this causes things that mention
argparse in there requirements to not believe that argparse
is installed (even though it is) so to avoid this whole mess
we can just avoid depending on argparse in python versions
where we don't need to (since it was included in the stdlib
in python 2.7+)
|
|
Its not needed since its a built-in for these
versions so we can just skip it for any newer
rpm building in the first place.
LP: #1603533
|
|
Some improvements here, and some bug fixes.
- bring curtin revno 394's to support post-up for interface aliases.
- sort attributes per interface for nicer order and consistent rendering
- use arrays for each 'section' rather than content += . This allows
better separation of the sections and also will perform better as long
strings with += are slow.
- improve how 'lo' is handled. If a network state that was being rendered
had an entry for 'lo', then the rendered ENI would have 2 'lo'
sections.
- no longer skip 'lo' sections when loading an ENI in parse_deb_config
- fix inet value for subnets, don't add interface attributes to alias
(LP: #1588547)
Also add some tests of reading yaml and rendering ENI.
|
|
|
|
Previous commit inadvertently disabled the consumption of 'injected' files
in configdrive (openstack server boot --file=/target/file=local-file)
unless the datasource was in 'pass' mode. The default mode is 'net' so
that was not likely to happen.
Also here are:
a.) some comments to apply_network_config
b.) add backwards compatibility for distros that do not yet implement
apply_network_config by converting the network config into ENI format
and calling apply_network.
This is required because prior to the previous commit, those distros
would have had 'apply_network' called with the openstack provided
ENI file. But after this change they will have apply_network_config
called by cloudinit's main.
c.) add network_state_to_eni for converting net config to eni
it supports the not-actually-correct 'hwaddress' field in ENI
LP: #1602373
|
|
|
|
we could do this more simply by mocking fbsd.apply_network
and checking it's inputs. but this pushes it through the whole
path that the other test does.
|
|
fixes mcollective when used with python3 and also adds a unit test.
LP: #1597699
|
|
|
|
|
|
* StringIO from six doesn't act as 'binary stream' in Python 3.
This patch changes StringIO to BytesIO to have code compatible with
Python 3 and Python 2.
* Add try/except for IOError in case when server.cfg doesn't exists. This is
necessary for unit tests or cases when server.cfg is not included to package
* Add UnitTest for cc_mcollective.py
LP: #1597699
|
|
|
|
|
|
this merges in the render_hwaddress support.
newly added tests still run, so hwaddress seems correctly getting in.
|
|
|
|
|
|
Previous commit disabled the consumption of 'injected' files in
configdrive (openstack server boot --file=/target/file=local-file)
unless the datasource was in 'pass' mode. The default mode is 'net'
so that would never happen.
Also here are:
a.) a fix for 'links_path_prefix' string from debian, to finally
disable the rendering of systemd.link files (LP: #1594546)
b.) some comments to apply_network_config
c.) implement a backwards compatibility for for distros that do
not yet implement apply_network_config by converting the network
config into ENI format and calling apply_network.
This is required because prior to the previous commit, those distros
would have had 'apply_network' called with the openstack provided
ENI file. But after this change they will have apply_network_config
called by cloudinit's main.
d.) a network_state_to_eni helper for converting net config to eni
it supports the not-actually-correct 'hwaddress' field in ENI.
LP: #1602373
|
|
|
|
|
|
|
|
|
|
There are a few new files that are missing from being
included in the rpm specification file (which if missing
causes rpmbuild to die) so make sure we add them in.
|
|
This fixes a small case of a leftover
dict comprehension being found that stops cloud-init
from working on centos6/rhel6 (which still use py2.6)
|
|
|
|
These new files were not getting picked up during
packaging (and they need to, otherwise rpm building
fails).
- 66-azure-ephemeral.rules
- cloud-init-generator
|
|
Under revno 1243 a failed attempt was made to not render systemd.link
files into /etc/systemd/network/ . The 'config' that was passed in was
incorrect though, and resulted in link files still getting rendered.
(original bug was LP: #1594546).
|
|
On upgrade and reboot, if datasource restored from obj.pkl did not have
a dsmode attribute, then 'init --local' would fail due to stack trace.
LP: #1596690
|
|
when user-data was not decodable, cloud-init would raise exception.
This also changes the signature of user_data.convert_string.
The 'headers' argument was never used, and woudl have been broken
if it was, as it was expected to be a dictionary but then was
passed in with *headers.
LP: #1532072
|
|
|
|
when user-data was not decodable, cloud-init would raise exception.
LP: #1532072
|
|
if no permissions were given in a write_files stanza, then
a warning would be emitted.
The fix here is just to special case handling of None.
|
|
|
|
|
|
|
|
[copied from curtin revno 390]
Apply two separate fixes for configuring bonding with ip aliases.
Curtin re-used the interface's inet value for each subnet that might
be configured. In the case where the configuration included an ipv4
address after an ipv6 one resulted in emitting 'inet6' for ipv4 address
which is not correct. Resolve this issue by calculating the inet
value independent of the current status of the iface, using the subnet
config instead.
When rendering a network_config which includes ip alias interfaces
do not emit any attributes, like MTU, or bond/bridge options Including
these values is almost always wrong or will result in confusing
behavior on the target system.
LP: #1588547
|
|
|
|
|
|
Fix the lack of per-interface routes, and add an example to yaml.
in revno 394 in curtin, we added post-up for interface aliases.
bring that commit here.
|
|
cleaned up tests a bit. still they raise exception, but print out
the files rendered and all use the _render_and_read helper.
|
|
|
|
|
|
|
|
test runs to the point where it did, think I got most of the changes
incorporated.
|
|
When fixing bug 1579130, we made cloud-init rename devices itself,
rather than relying on the systemd.link files to do that.
That was necessary to
- rename devices in a container
- rename devices on first boot or in any situation when the
link files in the initramfs were stale.
However, cloud-init was still writing .link files like:
/etc/systemd/network/50-cloud-init-ens2.link
That leads to just a confusing situation as cloud-init will trump
any renaming systemd does in all cases.
Also added here is a header into the rendered ENI file:
/etc/network/interfaces.d/50-cloud-init.cfg
that describes how to disable cloud-init networking.
LP: #1594546
|
|
|
|
These are unnecessary, as cloud-init is renaming the nics
that should be renamed itself.
|
|
|
|
This intends to add support for rendering of network data under sysconfig
distributions (centos and rhel). The end result will be support for
network configuration via ConfigDrive or NoCloud on these OS.
|
|
|
|
|