Skip to content

Commit

Permalink
feat: [sc-117743] preflight check: ensure valid nameservers in /etc/r…
Browse files Browse the repository at this point in the history
…esolv.conf (#1665)
  • Loading branch information
nvanthao authored Dec 30, 2024
1 parent 7661094 commit 8a95fbc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/preflights/host-preflight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,17 @@ spec:
- pass:
when: "false"
message: "Neither 'nameserver localhost' nor 'nameserver 127.0.01' is present in resolv.conf"
- textAnalyze:
checkName: Nameserver Configuration
fileName: host-collectors/run-host/resolv.conf.txt
regex: '(?m)^nameserver\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s*$'
outcomes:
- fail:
when: "false"
message: "No nameservers are configured in resolv.conf. Update resolv.conf to include at least one nameserver."
- pass:
when: "true"
message: "Nameservers are configured in resolv.conf."
- filesystemPerformance:
checkName: Filesystem Write Latency
collectorName: filesystem-write-latency-etcd
Expand Down

0 comments on commit 8a95fbc

Please sign in to comment.