<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/net/__init__.py, branch circinus-public-unmaintained</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=circinus-public-unmaintained</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=circinus-public-unmaintained'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/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/vyos/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>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/vyos/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>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/vyos/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>Add connectivity_url to Oracle's EphemeralDHCPv4 (#988)</title>
<updated>2021-09-17T18:04:07+00:00</updated>
<author>
<name>James Falcon</name>
<email>therealfalcon@gmail.com</email>
</author>
<published>2021-09-17T18:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=612e39087aee3b1242765e7c4f463f54a6ebd723'/>
<id>urn:sha1:612e39087aee3b1242765e7c4f463f54a6ebd723</id>
<content type='text'>
Add connectivity_url to Oracle's EphemeralDHCPv4

On bionic, when trying to bring up the EphemeralDHCPv4, it's possible
that we already have a route defined, which will result in an error when
trying to add the DHCP route. Use the connectivity_url to check if we
can reach the metadata service, and if so, skip the EphemeralDHCPv4.

The has_url_connectivity function has also been modified to take
a dict of kwargs to send to readurl.

LP: #1939603</content>
</entry>
<entry>
<title>Azure: Logging the detected interfaces (#968)</title>
<updated>2021-08-12T17:13:13+00:00</updated>
<author>
<name>Moustafa Moustafa</name>
<email>momousta@microsoft.com</email>
</author>
<published>2021-08-12T17:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=82a30e6d821dbaec90bed066e09613bfb28fd52a'/>
<id>urn:sha1:82a30e6d821dbaec90bed066e09613bfb28fd52a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update inconsistent indentation (#962)</title>
<updated>2021-08-10T18:18:56+00:00</updated>
<author>
<name>Andrew Kutz</name>
<email>101085+akutz@users.noreply.github.com</email>
</author>
<published>2021-08-10T18:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=c62cb3af59abc464380011c106b31879181e7c45'/>
<id>urn:sha1:c62cb3af59abc464380011c106b31879181e7c45</id>
<content type='text'>
This patch updates some indentation in a comment that prevented an
attempt to run the Black formatter (https://github.com/psf/black)
against the cloud-init codebase:

    $ find cloudinit -name '*.py' -type f | xargs black -l 79 --check
    ...
    Oh no! 💥 💔 💥
    262 files would be reformatted, 19 files would be left unchanged, 1 file would fail to reformat.

The one file that fails to format is cloudinit/net/__init__.py.

With this fix in place, the black command can successfully parse the
file into AST and back again:

    $ black -l 79 --check cloudinit/net/__init__.py
    would reformat cloudinit/net/__init__.py
    Oh no! 💥 💔 💥
    1 file would be reformatted.

Normally this patch would be part of such an overall effort, but since
this is the only location that interrupted running the black command,
this author felt it was worth addressing this discrepancy sooner than
later in the case there is subsequent desire to use a standard format
tool such as black.</content>
</entry>
<entry>
<title>add DragonFlyBSD support (#904)</title>
<updated>2021-06-14T19:39:05+00:00</updated>
<author>
<name>Gonéri Le Bouder</name>
<email>goneri@lebouder.net</email>
</author>
<published>2021-06-14T19:39:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=59a848c5929cbfca45d95860eb60dfebd0786c94'/>
<id>urn:sha1:59a848c5929cbfca45d95860eb60dfebd0786c94</id>
<content type='text'>
- Mostly based on FreeBSD, the main exception is that
  `find_devs_with_on_freebsd` does not work.
- Since we cannot get the CDROM or the partition labels,
  `find_devs_with_on_dragonflybsd()` has a more naive approach and
  returns all the block devices.</content>
</entry>
<entry>
<title>bringup_static_routes: fix gateway check (#850)</title>
<updated>2021-04-07T16:16:30+00:00</updated>
<author>
<name>Petr Fedchenkov</name>
<email>giggsoff@gmail.com</email>
</author>
<published>2021-04-07T16:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=15dd3601c484e189ea82917600322b7d0e25c088'/>
<id>urn:sha1:15dd3601c484e189ea82917600322b7d0e25c088</id>
<content type='text'>
When bringing up DHCP-provided static routes, we check for "0.0.0.0/0"
to indicate an unspecified gateway. However, when parsing the static
route in `parse_static_routes`, the gateway is never specified with
a net length, so the "/0" will never happen.

This change updates the gateway check to check only for "0.0.0.0".</content>
</entry>
<entry>
<title>net: exclude OVS internal interfaces in get_interfaces (#829)</title>
<updated>2021-03-08T17:50:57+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2021-03-08T17:50:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=121bc04cdf0e6732fe143b7419131dc250c13384'/>
<id>urn:sha1:121bc04cdf0e6732fe143b7419131dc250c13384</id>
<content type='text'>
`get_interfaces` is used to in two ways, broadly: firstly, to determine
the available interfaces when converting cloud network configuration
formats to cloud-init's network configuration formats; and, secondly, to
ensure that any interfaces which are specified in network configuration
are (a) available, and (b) named correctly.  The first of these is
unaffected by this commit, as no clouds support Open vSwitch
configuration in their network configuration formats.

For the second, we check that MAC addresses of physical devices are
unique.  In some OVS configurations, there are OVS-created devices which
have duplicate MAC addresses, either with each other or with physical
devices.  As these interfaces are created by OVS, we can be confident
that (a) they will be available when appropriate, and (b) that OVS will
name them correctly.  As such, this commit excludes any OVS-internal
interfaces from the set of interfaces returned by `get_interfaces`.

LP: #1912844</content>
</entry>
<entry>
<title>get_interfaces: don't exclude Open vSwitch bridge/bond members (#608)</title>
<updated>2020-10-29T13:38:56+00:00</updated>
<author>
<name>Lukas Märdian</name>
<email>luk@slyon.de</email>
</author>
<published>2020-10-29T13:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3c432b32de1bdce2699525201396a8bbc6a41f3e'/>
<id>urn:sha1:3c432b32de1bdce2699525201396a8bbc6a41f3e</id>
<content type='text'>
If an OVS bridge was used as the only/primary interface, the 'init'
stage failed with a "Not all expected physical devices present" error,
leaving the system with a broken SSH setup.

LP: #1898997</content>
</entry>
</feed>
