Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The dashboard can not be correctly started #34

Open
ryueran opened this issue Nov 29, 2024 · 2 comments
Open

The dashboard can not be correctly started #34

ryueran opened this issue Nov 29, 2024 · 2 comments

Comments

@ryueran
Copy link

ryueran commented Nov 29, 2024

Hi, I am a starter of Ankaios framework, I deployed the dashboard in the state.yaml for Amkaios Server, but after I started ank-server and ank-agent and ank --insecure get workloads I got error like following:
WORKLOAD NAME AGENT RUNTIME EXECUTION STATE ADDITIONAL INFO
Ankaios_Dashboard agent_B podman Pending(Initial)
databroker agent_A podman Running(Ok)
I ran "podman run --rm -p 5001:5001 ghcr.io/felixmoelders/ankaios-dashboard:latest" I got error like:
File "/ankaios-dashboard/main.py", line 1, in
import DashboardAPI as api
File "/ankaios-dashboard/DashboardAPI.py", line 23, in
ank_comm_service = AnkCommunicationService()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ankaios-dashboard/AnkCommunicationService.py", line 11, in init
self.ankaios = Ankaios()
^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ankaios_sdk/ankaios.py", line 173, in init
self._connect()
File "/usr/lib/python3.11/site-packages/ankaios_sdk/ankaios.py", line 210, in _connect
raise AnkaiosConnectionException(
ankaios_sdk.exceptions.AnkaiosConnectionException: Control interface input fifo does not exist.
I check the source code of sdk in ankaios.py and I found the error was triggered by:
if not os.path.exists(
f"{self.ANKAIOS_CONTROL_INTERFACE_BASE_PATH}/output"):
raise AnkaiosConnectionException(
"Control interface output fifo does not exist."
)
And the ANKAIOS_CONTROL_INTERFACE_BASE_PATH is "/run/ankaios/control_interface", the thing is after I ran "sudo systemctl start ank-server" I did not find "/run/ankaios/control_interface" in my system, may I ask what is the cause of this issue?

@FelixMoelders
Copy link
Owner

FelixMoelders commented Dec 5, 2024

Hi, thank you for reporting the issue. I somehow got the problem in the past too, when i forgot to allow controlinterface access in the state.yaml.

Try adding from (https://github.com/FelixMoelders/ankaios-dashboard?tab=readme-ov-file#how-to-use-the-dashboard-out-of-the-box):

´´´yaml
apiVersion: v0.1
workloads:
Ankaios_Dashboard:
....
controlInterfaceAccess:
allowRules:
- type: StateRule
operation: ReadWrite
filterMask:
- "desiredState"
- "workloadStates"

´´´
which version of ankaios and which version of the ankaios-dashboard do you use?

@ryueran
Copy link
Author

ryueran commented Dec 6, 2024

@FelixMoelders Hallo, thank you very much for your reply! I used the same yaml file as you posted in your answer, I think it was the latest version
Now I just made it run, this is how I solve this issue:

  1. Just copy only the content of dashboard yaml file to the state.yaml file
  2. Start Ankaois Server and start Ankaois Agent, after that I can see the dahsboard in the browser
  3. Add other Agents through separate yamk files and then start them though "ank -k apply", refresh the browser, then I am able to see the new Agents in dashboard

But when I write all the Agents in state.yaml file, it did not work, maybe it is because my Ubuntu version is 22.04, about that I am not quite sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants