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 (backport #876) #993

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

tayterz2
Copy link
Contributor

@tayterz2 tayterz2 commented Feb 25, 2025

Problem:
#725 introduces a bug wherein if an automated deployment (after a binaries-only installation) using user-data 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 user-data file on an attached CDROM or USB stick, 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

Copy link
Member

@starbops starbops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that the PR works on both unattended install and normal installation paths for v1.4.

Copy link
Contributor

@mingshuoqiu mingshuoqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on my own setup. LGTM. Thanks

@starbops starbops merged commit 6f87f15 into harvester:v1.4 Feb 27, 2025
7 checks passed
@tayterz2 tayterz2 deleted the v1.4-dhcp-backport branch March 3, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants