ankaios
ankaios copied to clipboard
Unable to request whole CompleteState via the ControlInterface
Currently, it is not possible to fetch the whole CompleteState over the ControlInterface. On the workload site the empty CompleteState is received (workloads: None, workloadStates: None). Only parts of the CompleteState can be requested when the user sets an appropriate filter mask.
Current Behavior
Empty CompleteState received over the ControlInterface when requesting the whole CompleteState.
Expected Behavior
A workload shall be able to receive the whole CompleteState shall be received over the ControlInterface.
Steps to Reproduce
- Navigate to the control interface example folder inside the repository: cd
examples
- Modify the
create_request_for_complete_state
function body inside thepython_control_interface
example (adjust the filterMask to include the desiredState):
return control_api.ToAnkaios(
request=ank_base.Request(
completeStateRequest=ank_base.CompleteStateRequest(
fieldMask=["desiredState", "workloadStates"] # <-- the filter mask you must change to this
),
requestId=REQUEST_ID,
)
)
- Change the permissions of the
startConfig.yaml
file to allow the workload to request the whole CompleteState:
...
- type: StateRule
operation: Read
filterMask:
- "*" # change to wildcard to allow full read access
...
- Run the example:
ANK_BIN_DIR=/workspaces/ankaios/target/x86_64-unknown-linux-musl/debug ./run_example.sh python_control_interface
- Check the log output of the workload:
podman logs -f $(podman ps -a | grep control_interface | awk '{print $1}')
You should see an empty CompleteState:
Context (Environment)
Release v0.4.0 Linux All Control Interface examples and all workloads requesting the whole CompleteState over the Control Interface are affected
Logs
After checking the server logs (tail -f /tmp/ankaios-server.log
) there is an issue with the tagging when using flatten and enums:
Like in the picture the error string is a serde_yaml conversion error untagged and internally tagged enums do not support enum input
Additional Information
Final result
To be filled by the one closing the issue.