<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/net, branch current</title>
<subtitle> (mirror of https://github.com/marekm72/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=current</id>
<link rel='self' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=current'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/'/>
<updated>2022-02-08T14:49:00+00:00</updated>
<entry>
<title>Fix IPv6 netmask format for sysconfig (#1215)</title>
<updated>2022-02-08T14:49:00+00:00</updated>
<author>
<name>Harald</name>
<email>hjensas@redhat.com</email>
</author>
<published>2022-02-08T14:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=b97a30f0a05c1dea918c46ca9c05c869d15fe2d5'/>
<id>urn:sha1:b97a30f0a05c1dea918c46ca9c05c869d15fe2d5</id>
<content type='text'>
This change converts the IPv6 netmask from the network_data.json[1]
format to the CIDR style, &lt;IPv6_addr&gt;/&lt;prefix&gt;.

Using an IPv6 address like ffff:ffff:ffff:ffff:: does not work with
NetworkManager, nor networkscripts.

NetworkManager will ignore the route, logging:
  ifcfg-rh: ignoring invalid route at \
    "::/:: via fd00:fd00:fd00:2::fffe dev $DEV" \
    (/etc/sysconfig/network-scripts/route6-$DEV:3): \
    Argument for "::/::" is not ADDR/PREFIX format

Similarly if using networkscripts, ip route fail with error:
  Error: inet6 prefix is expected rather than \
    "fd00:fd00:fd00::/ffff:ffff:ffff:ffff::".

Also a bit of refactoring ...

cloudinit.net.sysconfig.Route.to_string:
* Move a couple of lines around to reduce repeated code.
* if "ADDRESS" not in key -&gt; continute, so that the
  code block following it can be de-indented.
cloudinit.net.network_state:
* Refactors the ipv4_mask_to_net_prefix, ipv6_mask_to_net_prefix
  removes mask_to_net_prefix methods. Utilize ipaddress library to
  do some of the heavy lifting.

LP: #1959148</content>
</entry>
<entry>
<title>bsd/resolv.d/ avoid duplicated entries (#1163)</title>
<updated>2022-01-04T20:04:09+00:00</updated>
<author>
<name>Gonéri Le Bouder</name>
<email>goneri@lebouder.net</email>
</author>
<published>2022-01-04T20:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=fef532d7d6e8932b1b91eb0fc811335d55a79257'/>
<id>urn:sha1:fef532d7d6e8932b1b91eb0fc811335d55a79257</id>
<content type='text'>
Ensure we don't add duplicated nameserver or searchdomains.
This can happen on OpenBSD because of dhcpleased.</content>
</entry>
<entry>
<title>openbsd: properly restart the network on 7.0 (#1150)</title>
<updated>2022-01-04T17:50:31+00:00</updated>
<author>
<name>Gonéri Le Bouder</name>
<email>goneri@lebouder.net</email>
</author>
<published>2022-01-04T17:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=d4bea4a44a0405aaf0d181d4bffff6c07d2fb5ba'/>
<id>urn:sha1:d4bea4a44a0405aaf0d181d4bffff6c07d2fb5ba</id>
<content type='text'>
OpenBSD 7.0 comes with a new service called dhcpleased to manage the DHCP
requests.</content>
</entry>
<entry>
<title>Adopt Black and isort (SC-700) (#1157)</title>
<updated>2021-12-16T02:16:38+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-16T02:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf'/>
<id>urn:sha1:bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf</id>
<content type='text'>
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
</content>
</entry>
<entry>
<title>Add miraclelinux support (#1128)</title>
<updated>2021-12-07T14:23:45+00:00</updated>
<author>
<name>Haruki TSURUMOTO</name>
<email>fortune.rocket42@gmail.com</email>
</author>
<published>2021-12-07T14:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=0ed00ad9cdebc2d4dabd8bd6d7c901584963def5'/>
<id>urn:sha1:0ed00ad9cdebc2d4dabd8bd6d7c901584963def5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cloudinit/net: handle two different routes for the same ip (#1124)</title>
<updated>2021-12-06T17:34:26+00:00</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
<email>eesposit@redhat.com</email>
</author>
<published>2021-12-06T17:34:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=0e25076b34fa995161b83996e866c0974cee431f'/>
<id>urn:sha1:0e25076b34fa995161b83996e866c0974cee431f</id>
<content type='text'>
If we set a dhcp server side like this:
$ cat /var/tmp/cloud-init/cloud-init-dhcp-f0rie5tm/dhcp.leases
lease {
...
option classless-static-routes 31.169.254.169.254 0.0.0.0,31.169.254.169.254
    10.112.143.127,22.10.112.140 0.0.0.0,0 10.112.140.1;
...
}
cloud-init fails to configure the routes via 'ip route add' because to there are
two different routes for 169.254.169.254:

$ ip -4 route add 192.168.1.1/32 via 0.0.0.0 dev eth0
$ ip -4 route add 192.168.1.1/32 via 10.112.140.248 dev eth0

But NetworkManager can handle such scenario successfully as it uses "ip route append".
So change cloud-init to also use "ip route append" to fix the issue:

$ ip -4 route append 192.168.1.1/32 via 0.0.0.0 dev eth0
$ ip -4 route append 192.168.1.1/32 via 10.112.140.248 dev eth0

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;

RHBZ: #2003231</content>
</entry>
<entry>
<title>Reorganize unit test locations under tests/unittests (#1126)</title>
<updated>2021-12-03T20:11:46+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2021-12-03T20:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51'/>
<id>urn:sha1:039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51</id>
<content type='text'>
This attempts to standardize unit test file location under test/unittests/
such that any source file located at cloudinit/path/to/file.py may have a
corresponding unit test file at test/unittests/path/to/test_file.py.

Noteworthy Comments:
====================
Four different duplicate test files existed:
test_{gpg,util,cc_mounts,cc_resolv_conf}.py
Each of these duplicate file pairs has been merged together. This is a
break in git history for these files.

The test suite appears to have a dependency on test order. Changing test
order causes some tests to fail. This should be rectified, but for now
some tests have been modified in
tests/unittests/config/test_set_passwords.py.

A helper class name starts with "Test" which causes pytest to try
executing it as a test case, which then throws warnings "due to Class
having __init__()".  Silence by changing the name of the class.

# helpers.py is imported in many test files, import paths change
cloudinit/tests/helpers.py -&gt; tests/unittests/helpers.py

# Move directories:
cloudinit/distros/tests -&gt; tests/unittests/distros
cloudinit/cmd/devel/tests -&gt; tests/unittests/cmd/devel
cloudinit/cmd/tests -&gt; tests/unittests/cmd/
cloudinit/sources/helpers/tests -&gt; tests/unittests/sources/helpers
cloudinit/sources/tests -&gt; tests/unittests/sources
cloudinit/net/tests -&gt; tests/unittests/net
cloudinit/config/tests -&gt; tests/unittests/config
cloudinit/analyze/tests/ -&gt; tests/unittests/analyze/

# Standardize tests already in tests/unittests/
test_datasource -&gt; sources
test_distros -&gt; distros
test_vmware -&gt; sources/vmware
test_handler -&gt; config        # this contains cloudconfig module tests
test_runs -&gt; runs</content>
</entry>
<entry>
<title>Fix exception when no activator found (#1129)</title>
<updated>2021-12-03T04:36:37+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-03T04:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=ffa6fc88249aa080aa31811a45569a45e567418a'/>
<id>urn:sha1:ffa6fc88249aa080aa31811a45569a45e567418a</id>
<content type='text'>
Given that there are additional network management tools that we haven't
yet supported with activators, we should log a warning and continue
without network activation here, especially since this was a no-op for
years.

LP: #1948681</content>
</entry>
<entry>
<title>Fix for set-name bug in networkd renderer (#1100)</title>
<updated>2021-11-09T19:41:03+00:00</updated>
<author>
<name>Andrew Kutz</name>
<email>101085+akutz@users.noreply.github.com</email>
</author>
<published>2021-11-09T19:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=fff6de4a18fa4eca709870e995de99c543a4ac1c'/>
<id>urn:sha1:fff6de4a18fa4eca709870e995de99c543a4ac1c</id>
<content type='text'>
This patch address an issue where the use of the "set-name"
directive caused the networkd renderer to fail.

LP: #1949407</content>
</entry>
<entry>
<title>Fix set-name/interface DNS bug (#1058)</title>
<updated>2021-10-08T17:49:58+00:00</updated>
<author>
<name>Andrew Kutz</name>
<email>101085+akutz@users.noreply.github.com</email>
</author>
<published>2021-10-08T17:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=ca0da042e73d1cf078435befa02a6e09d004b62d'/>
<id>urn:sha1:ca0da042e73d1cf078435befa02a6e09d004b62d</id>
<content type='text'>
This patch addresses an issue caused when the v2 network config
directive "set-name" was used in conjunction with interface-
specific DNS settings. The patch adds a test to validate the fix.

For more information please see bug 1946493 as well as the issue
https://github.com/kubernetes-sigs/image-builder/issues/712.

LP: #1946493</content>
</entry>
</feed>
