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

PR: gh-819 fixes for k3s-base-sanity intermittently failing #821

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/k3s-base-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,12 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- run: curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb --disable-cloud-controller --kubelet-arg cloud-provider=external" K3S_KUBECONFIG_MODE="644" sh -
- run: curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb" K3S_KUBECONFIG_MODE="644" sh -
- run: |
sleep 10
kubectl "${{ env.KUBECONFIG }}" taint nodes --all node.cloudprovider.kubernetes.io/uninitialized=false:NoSchedule-
sleep 60
sleep 80
kubectl "${{ env.KUBECONFIG }}" get nodes
kubectl "${{ env.KUBECONFIG }}" get pods -A
wget https://github.com/loxilb-io/loxi-ccm/raw/master/manifests/loxi-ccm-k3s.yaml
kubectl "${{ env.KUBECONFIG }}" apply -f ./loxi-ccm-k3s.yaml
sleep 60
kubectl "${{ env.KUBECONFIG }}" get pods -A
sleep 20
- run: |
cd cicd/k3s-base-sanity/
./config.sh "${{ env.KUBECONFIG }}"
Expand Down
9 changes: 3 additions & 6 deletions cicd/k3s-base-sanity/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,15 @@ else

# Install k3s without external cloud-manager and disabled servicelb
#curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.22.9+k3s1 INSTALL_K3S_EXEC="server --disable traefik --disable servicelb --disable-cloud-controller --kubelet-arg cloud-provider=external" K3S_KUBECONFIG_MODE="644" sh -
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb --disable-cloud-controller --kubelet-arg cloud-provider=external" K3S_KUBECONFIG_MODE="644" sh -
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb" K3S_KUBECONFIG_MODE="644" sh -

sleep 10
sleep 20

# Check kubectl works
kubectl $KUBECONFIG get pods -A

# Remove taints in k3s if any (usually happens if started without cloud-manager)
kubectl $KUBECONFIG taint nodes --all node.cloudprovider.kubernetes.io/uninitialized=false:NoSchedule-

# Start loxi-ccm as k3s daemonset
kubectl $KUBECONFIG apply -f https://github.com/loxilb-io/loxi-ccm/raw/master/manifests/loxi-ccm-k3s.yaml
# kubectl $KUBECONFIG taint nodes --all node.cloudprovider.kubernetes.io/uninitialized=false:NoSchedule-

echo "End K3s installation"
fi
Expand Down
3 changes: 2 additions & 1 deletion pkg/loxinet/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,14 @@ func (r *RtH) RtAdd(Dst net.IPNet, Zone string, Ra RtAttr, Na []RtNhAttr) (int,
for i := 0; i < nhLen; i++ {
// FIXME - Need to sort before comparing
if !Na[i].NhAddr.Equal(rt.NhAttr[i].NhAddr) {
rtMod = false
rtMod = true
break
}
}
}

if rtMod {
tk.LogIt(tk.LogDebug, "rt change - %s:%s detected\n", Dst.String(), Zone)
ret, _ := r.RtDelete(Dst, Zone)
if ret != 0 {
tk.LogIt(tk.LogError, "rt add - %s:%s del failed on mod\n", Dst.String(), Zone)
Expand Down
Loading