Various Issues Following OFC22 Tutorial
Proposers
- Stanislav Lange (NTNU)
Description
Trying to run the tests related to the OFC22 demo, I ran into multiple issues - some of which I managed to resolve, some not. Suggested additions to the tutorial as well as open issues are listed below.
- When executing the tests initially, imports did not work due to an undefined
$PYTHONPATH
-> runexport PYTHONPATH=/home/$USER/tfs-ctrl/src/
- Additionally, need to generate the python files related to the protobufs by running
proto/generate_code_python.sh
- Mismatched import in
src/tests/ofc22/tests/test_functional_bootstrap.py
- line 24 "
from context.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology
" should be "from common.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology
" - Same with
src/tests/ofc22/tests/Objects.py:24
- "
from context.proto.kpi_sample_types_pb2 import KpiSampleType
" -> "from common.proto.kpi_sample_types_pb2 import KpiSampleType
"
- "
- line 24 "
- Set node as master since some scripts rely on getting the node name via the role
kubectl get nodes --show-labels
kubectl label node YOURNODENAME node-role.kubernetes.io/master=true
Open issues
-
src/tests/ofc22/run_test_01_bootstrap.sh
doesn't include the definition of environment variables-
CONTEXTSERVICE_SERVICE_HOST, CONTEXTSERVICE_SERVICE_PORT_GRPC
and analogous for DEVICE and COMPUTE - In an old version of
run_test_01_bootstrap.sh
, those were defined as followsexport CONTEXTSERVICE_SERVICE_HOST=$(kubectl get node $K8S_HOSTNAME -o 'jsonpath={.status.addresses[?(@.type=="InternalIP")].address}')
export CONTEXTSERVICE_SERVICE_PORT_GRPC=$(kubectl get service contextservice-public --namespace $K8S_NAMESPACE -o 'jsonpath={.spec.ports[?(@.port==1010)].nodePort}')
- But (at least in my case)
- There is no "-public" version of the services
- The output json does not have a
nodePort
field, but onlyname, port, protocol
, andtargetPort
. Is targetPort the relevant one?
-