Fix defenition of multiple static routes for network
Current logic was relying on iteration inside the template. However,
since config_template module was used to deliver network configuration
it was merging sections having same name together.
While this behaviour is correct one for config_template as all sections
must be unique from ConfigParser perspective and in order to apply
overrides properly, it was not suiting the way how routes should be
defined in networkd configuration.
To workaround the issue we place routes separately under <network>.d
directory, which should be supported by systemd [1]
Reviewed: https:/ /review. opendev. org/c/openstack /ansible- role-systemd_ networkd/ +/903754 /opendev. org/openstack/ ansible- role-systemd_ networkd/ commit/ a05e610cc53239f 0c62dc0aae64d00 f1d8e75be0
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.2
commit a05e610cc53239f 0c62dc0aae64d00 f1d8e75be0
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri Dec 8 18:47:35 2023 +0100
Fix defenition of multiple static routes for network
Current logic was relying on iteration inside the template. However,
since config_template module was used to deliver network configuration
it was merging sections having same name together.
While this behaviour is correct one for config_template as all sections
must be unique from ConfigParser perspective and in order to apply
overrides properly, it was not suiting the way how routes should be
defined in networkd configuration.
To workaround the issue we place routes separately under <network>.d
directory, which should be supported by systemd [1]
[1] https:/ /www.freedeskto p.org/software/ systemd/ man/latest/ systemd. network. html
Closes-Bug: #2045819 2d18dd52bcd4878 a9017fb6ead d0e333422fc4696 08795c70e4)
Change-Id: I01aa44dcdc85e3
(cherry picked from commit 70442c5efb34222