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

Unable to change to a static IP address on a single-node k3s cluster. #1274

Open
liushan9981 opened this issue Nov 27, 2024 · 4 comments
Open

Comments

@liushan9981
Copy link

What happened:
Created an NNCP resource to configure a static IP address, routing, and DNS. After a while, the NNCP status shows as Degraded.
Error message after running "kubectl describe nncp ip1":

Warning  ReconcileFailed  10m   <myhostname>.nmstate-handler  error reconciling NodeNetworkConfigurationPolicy on node <myhostname> at desired state apply: "",
 rolling back desired state configuration: failed runnig probes after network changes: failed runnig probe 'api-server' with after network reconfiguration -> currentState: hostname:

What you expected to happen:
Changing to a static IP should be successful, including the k3s services, and all pods should function normally.

How to reproduce it (as minimally and precisely as possible):

  • Install k3s on a single machine as a single-node k3s cluster
  • Using the manifest to create a nncp
  • Watch the status of the nncp we created above.

nncp manifest:

apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: ip1
spec:
  nodeSelector:
    kubernetes.io/hostname: k3s-server
  desiredState:
    interfaces:
    - name: eth0
      type: ethernet
      state: up
      ipv4:
        enabled: true
        dhcp: false
        address:
        - ip: 10.1.1.55
          prefix-length: 24
    routes:
      config:
        - destination: 0.0.0.0/0
          next-hop-address: 10.1.1.1
          next-hop-interface: eth0
          metric: 100
          source: 10.1.1.55
    dns-resolver:
      config:
        search:
        - .
        server:
        - 8.8.4.4

Anything else we need to know?:

Environment:

  • nmstate-operator version: v0.83.0
  • OS: SUSE micro SLE 5.5
  • k3s version: v1.31.1+k3s1
@qinqon
Copy link
Member

qinqon commented Dec 3, 2024

Can you dump the whole error ?

@liushan9981
Copy link
Author

The log file is too large, please see the attachment.

  • The file nmstate-handler-qmgxs.log contains the logs from the pod nmstate-handler-qmgxs.
  • The file nncp-describe.txt contains the output of the command kubectl describe nncp <obj_name>.

nncp-describe.txt
nmstate-handler-qmgxs.log

@qinqon
Copy link
Member

qinqon commented Dec 5, 2024

So api-server probe is failing at

"failed to creating new custom client","error":"Get \"https://10.195.0.1:443/api?timeout=32s\": dial tcp 10.195.0.1:443: connect: no route to host"

And the routing table looks like

routes:                                                                         
  running:                                                                      
  - destination: 0.0.0.0/0                                                      
    next-hop-interface: eth0                                                    
    next-hop-address: 10.1.1.1                                                  
    metric: 100                                                                 
    table-id: 254                                                               
    source: 10.1.1.55                                                           
  config:                                                                       
  - destination: 0.0.0.0/0                                                      
    next-hop-interface: eth0                                                    
    next-hop-address: 10.1.1.1                                                  
    metric: 100                                                                 
    table-id: 254                                                               
    source: 10.1.1.55                   

@qinqon
Copy link
Member

qinqon commented Dec 5, 2024

I think is not able to access 10.1.1.1, like the node is not receiving the ARP to resolve the mac of tha address.

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

No branches or pull requests

2 participants