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

Fix Default Route check when not using DHCP #876

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tayterz2
Copy link

@tayterz2 tayterz2 commented Nov 2, 2024

Problem:
#725 introduces a bug wherein if an automated deployment using userdata.yaml is initiated and does not use DHCP, the installation fails with the error "No default route found. Please check the router setting on the DHCP server" regardless of the "Gateway" settings. This is because the check is performed before a static network is set up.

Solution:
Add a couple of "if" checks to determine if this is a DHCP installation. If not, skip the default route check.

Related Issue:
#725 #734

Test plan:
Using this userdata.yaml file on a second ISO or PXE, successfully perform an automated install:

#cloud-config
token: token
os:
  ssh_authorized_keys:
    - ssh-rsa ...        # replace with your public key
  password: p@ssword   # replace with a your password
  ntp_servers:
    - 0.suse.pool.ntp.org
    - 1.suse.pool.ntp.org
install:
  mode: create
  automatic: true
  networks:
  management_interface:
    interfaces:
      - name: ens0
      - name: ens3
    method: static
    ip: 1.2.3.4
    gateway: 1.2.3.1
    subnet_mask: 255.255.255.0
  vipMode: static
  vip: 2.3.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant