fluidos-project / node

FLUIDOS Node and its essential components
https://fluidos-project.github.io/node/
Apache License 2.0
3 stars 7 forks source link

Error when creating Reservation #52

Open stefano81 opened 5 months ago

stefano81 commented 5 months ago

I am seeing this error when manually creating a Reservation:

E0503 06:55:19.628850       1 reservation_controller.go:77] Error when getting PeeringCandidate fluidos/reservation-sample before reconcile: PeeringCandidate.advertisement.fluidos.eu "peeringcandidate-fluidos.eu-k8s-fluidos-fa8bdf95" not found
2024-05-03T06:55:19Z    ERROR   Reconciler error        {"controller": "reservation", "controllerGroup": "reservation.fluidos.eu", "controllerKind": "Reservation", "Reservation": {"name":"reservation-sample","namespace":"fluidos"}, "namespace": "fluidos", "name": "reservation-sample", "reconcileID": "00eb1568-0281-4dd5-b613-5674f988005d", "error": "PeeringCandidate.advertisement.fluidos.eu \"peeringcandidate-fluidos.eu-k8s-fluidos-fa8bdf95\" not found"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.1/pkg/internal/controller/controller.go:324
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.1/pkg/internal/controller/controller.go:265
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.1/pkg/internal/controller/controller.go:226
E0503 06:55:19.654411       1 reservation_controller.go:77] Error when getting PeeringCandidate fluidos/reservation-sample before reconcile: PeeringCandidate.advertisement.fluidos.eu "peeringcandidate-fluidos.eu-k8s-fluidos-fa8bdf95" not found
2024-05-03T06:55:19Z    ERROR   Reconciler error        {"controller": "reservation", "controllerGroup": "reservation.fluidos.eu", "controllerKind": "Reservation", "Reservation": {"name":"reservation-sample","namespace":"fluidos"}, "namespace": "fluidos", "name": "reservation-sample", "reconcileID": "df59614a-84b4-44c8-ba6a-da05b885b3af", "error": "PeeringCandidate.advertisement.fluidos.eu \"peeringcandidate-fluidos.eu-k8s-fluidos-fa8bdf95\" not found"}

Note that the peering candidate exists:

% kubectl get -n fluidos peeringcandidates                                                                                     
NAME                                               AGE
peeringcandidate-fluidos.eu-k8s-fluidos-fa8bdf95   2m54s

And that is the content of the reservation manifest:

apiVersion: reservation.fluidos.eu/v1alpha1
kind: Reservation
metadata:
  name: reservation-sample
spec:
  solverID: solver-sample
  # Retrieve from configmap
  buyer:
    domain: fluidos.eu
    ip: 172.18.0.4:30000
    nodeID: xbjnoc2npb
  seller:
    domain: fluidos.eu
    ip: 172.18.0.6:30001
    nodeID: tn3ndwttnh
  partition:
    architecture: amd64
    cpu: "1000m"
    memory: "1Gi"
    pods: "50"
  # Set it to reserve
  reserve: true
  purchase: false
  peeringCandidate:
    name: peeringcandidate-fluidos.eu-k8s-fluidos-fa8bdf95

spec.seller and spec.buyer information are retrieved from the Discovery and ConfigMap, respectively.

Am I missing something?

fracappa commented 5 months ago

Hi @stefano81 . Did you also change the .spec.peeringCandidate.namevalue according to the PeeringCandidate you're trying to connecto to?

fracappa commented 5 months ago

OK I see you did. That's strange as you should be able to see the peering candidate after the discovery. Do the .spec.seller information match the one available into the PeeringCandidate CR?