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:
- Create cluster using '...'
- Install Akri with the Helm command '...'
- '...'
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
orjournalctl -u snap.microk8s.daemon-kubelet
if you are using a MicroK8s cluster.
Additional context
Add any other context about the problem here.