nephio-project / nephio

Nephio is a Kubernetes-based automation platform for deploying and managing highly distributed, interconnected workloads such as 5G Network Functions, and the underlying infrastructure on which those workloads depend.
Apache License 2.0
101 stars 53 forks source link

free5gc-operator: AMF, SMF, UPF - mismatched ConfigMap name #309

Closed johnbelamaric closed 1 year ago

johnbelamaric commented 1 year ago

So close! The container won't create quite yet:

ubuntu@nephio-r1-e2e:~$ k --kubeconfig regional-kubeconfig -n free5gc-amf describe pod/amf-example-regional-549c86497c-8k9tj
Name:             amf-example-regional-549c86497c-8k9tj
Namespace:        free5gc-amf
Priority:         0
Service Account:  default
Node:             regional-md-0-zng8g-655c4f54d8xwc8nq-kkbmv/172.18.0.5
Start Time:       Fri, 16 Jun 2023 00:29:17 +0000
Labels:           name=amf-example-regional
                  pod-template-hash=549c86497c
Annotations:      k8s.v1.cni.cncf.io/networks:
                    [
                     {
                      "name": "amf-example-regional-n2",
                      "interface": "n2",
                      "ips": ["172.1.0.254/24"],
                      "gateways": ["172.1.0.1"]
                     }
                    ]
                  workload.nephio.org/configMapVersion: 4720
Status:           Pending
IP:               
IPs:              <none>
Controlled By:    ReplicaSet/amf-example-regional-549c86497c
Containers:
  amf:
    Container ID:  
    Image:         docker.io/nephio/free5gc-amf:3.2.1
    Image ID:      
    Port:          8805/UDP
    Host Port:     0/UDP
    Command:
      ./amf
    Args:
      -c
      ../config/amfcfg.yaml
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Limits:
      cpu:     300m
      memory:  256Mi
    Requests:
      cpu:        300m
      memory:     256Mi
    Environment:  <none>
    Mounts:
      /free5gc/config/ from amf-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-npsrb (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  amf-volume:
    Type:               Projected (a volume that contains injected data from multiple sources)
    ConfigMapName:      amf-example-regional-amf-configmap
    ConfigMapOptional:  <nil>
  kube-api-access-npsrb:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Guaranteed
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason       Age                   From               Message
  ----     ------       ----                  ----               -------
  Normal   Scheduled    5m45s                 default-scheduler  Successfully assigned free5gc-amf/amf-example-regional-549c86497c-8k9tj to regional-md-0-zng8g-655c4f54d8xwc8nq-kkbmv
  Warning  FailedMount  95s (x10 over 5m45s)  kubelet            MountVolume.SetUp failed for volume "amf-volume" : configmap "amf-example-regional-amf-configmap" not found
  Warning  FailedMount  85s (x2 over 3m42s)   kubelet            Unable to attach or mount volumes: unmounted volumes=[amf-volume], unattached volumes=[amf-volume kube-api-access-npsrb]: timed out waiting for the condition
ubuntu@nephio-r1-e2e:~$ k --kubeconfig regional-kubeconfig -n free5gc-amf get all
NAME                                        READY   STATUS              RESTARTS   AGE
pod/amf-example-regional-549c86497c-8k9tj   0/1     ContainerCreating   0          6m21s

NAME                           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
service/amf-example-regional   ClusterIP   10.137.41.225   <none>        80/TCP    7h24m

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/amf-example-regional   0/1     1            0           6m21s

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/amf-example-regional-549c86497c   1         1         0       6m21s
ubuntu@nephio-r1-e2e:~$ k --kubeconfig regional-kubeconfig -n free5gc-amf get all,cm
NAME                                        READY   STATUS              RESTARTS   AGE
pod/amf-example-regional-549c86497c-8k9tj   0/1     ContainerCreating   0          6m29s

NAME                           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
service/amf-example-regional   ClusterIP   10.137.41.225   <none>        80/TCP    7h24m

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/amf-example-regional   0/1     1            0           6m29s

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/amf-example-regional-549c86497c   1         1         0       6m29s

NAME                             DATA   AGE
configmap/amf-example-regional   1      7h24m
configmap/kube-root-ca.crt       1      7h24m
ubuntu@nephio-r1-e2e:~$ 
johnbelamaric commented 1 year ago

Example above is for AMF, but I see the same for SMF and UPF.

johnbelamaric commented 1 year ago

/assign @tliron

johnbelamaric commented 1 year ago

@henderiw is this a package specialization issue or an operator issue?

johnbelamaric commented 1 year ago

I am thinking it must be an operator issue since it creates the ConfigMap, actually.

Since @tliron and @n2vo are out maybe @denysaleksandrov or @Joshi4391 or @s3wong can take a look? I can look tomorrow if necessary. Probably a small fix.

denysaleksandrov commented 1 year ago

https://github.com/nephio-project/free5gc/pull/34

johnbelamaric commented 1 year ago

Thanks @denysaleksandrov