Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inteface level DNS and search information is not getting added to ifcfg file #5845

Open
ani-sinha opened this issue Oct 28, 2024 · 2 comments
Labels
bug Something isn't working correctly new An issue that still needs triage

Comments

@ani-sinha
Copy link
Contributor

I have reported this here:
#4756 (comment)

With a config like this:

              config:
                - name: eth0
                  subnets:
                    - address: 10.0.2.2/24
                      gateway: 10.0.2.1
                      type: static
                  type: physical
                - type: nameserver
                  interface: eth0
                  address:
                    - 8.8.8.8
                    - 4.4.4.4
                  search:
                    - example.com
              version: 1

We do not see interface level DNS and search information in ifcfg file:

[cloud-user@provisioner ~]$ cat /etc/resolv.conf 
# Generated by NetworkManager
search ocp.openstack.lab
[cloud-user@provisioner ~]$  nmcli -f NAME,FILENAME c show
NAME         FILENAME                                               
System eth0  /etc/sysconfig/network-scripts/ifcfg-eth0              
lo           /run/NetworkManager/system-connections/lo.nmconnection 
[cloud-user@provisioner ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 
# Created by cloud-init automatically, do not edit.
#
AUTOCONNECT_PRIORITY=120
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
GATEWAY=10.0.2.1
IPADDR=10.0.2.2
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no

Log file is attached:
cloud-init.log

We may need to modify sysconfig renderer?

@ani-sinha ani-sinha added bug Something isn't working correctly new An issue that still needs triage labels Oct 28, 2024
@ani-sinha
Copy link
Contributor Author

@TheRealFalcon for your attention.

@ani-sinha
Copy link
Contributor Author

Looking at https://cloudinit.readthedocs.io/en/21.1/topics/network-config-format-v1.html#nameserver, only difference I see is that in config we have an additional interface: eth0 under type: nameserver . Is this not allowed in v1 @TheRealFalcon ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly new An issue that still needs triage
Projects
None yet
Development

No branches or pull requests

1 participant