project-akri / akri

A Kubernetes Resource Interface for the Edge

Home Page:https://docs.akri.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OPC discovery handler duplicates the endpoint path

harrison-tin opened this issue · comments

Describe the bug
This PR #570 fixes the issue when the OPC server returns a URL that is not resolvable by the broker/discovery handler by patching the IP address that user passes in. For example, user passes in opc.tcp://192.168.0.1:50000, and the server returns opc.tcp://unresolvable-hostname:50000/OPCUA/Simulation, then OPC Discovery Handler will pass in opc.tcp://192.168.0.1:50000/OPCUA/Simulation to the broker instead.

However, if the user also specifies the endpoint opc.tcp://192.168.0.1:50000/OPCUA/Simulation, then the OPC Discovery Handler will patch the URL to opc.tcp://192.168.0.1:50000/OPCUA/Simulation/OPCUA/Simulation.

Output of kubectl get pods,akrii,akric -o wide

Kubernetes Version: [e.g. Native Kubernetes 1.19, MicroK8s 1.19, Minikube 1.19, K3s]

To Reproduce
Steps to reproduce the behavior:

  1. Create cluster using '...'
  2. Install Akri with the Helm command '...'
  3. '...'

Expected behavior
A clear and concise description of what you expected to happen.

Logs (please share snips of applicable logs)

  • To get the logs of any pod, run kubectl logs <pod name>
  • To get the logs of a pod that has already terminated, kubectl get logs <pod name> --previous
  • If you believe that the problem is with the Kubelet, run journalctl -u kubelet or journalctl -u snap.microk8s.daemon-kubelet if you are using a MicroK8s cluster.

Additional context
Add any other context about the problem here.