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

Management System need to be updated #360

Closed
kingxiaofire opened this issue May 9, 2024 · 3 comments
Closed

Management System need to be updated #360

kingxiaofire opened this issue May 9, 2024 · 3 comments

Comments

@kingxiaofire
Copy link
Contributor

Issue 1: Unable to Start cadvisor Container Due to "mountpoint for cpu not found" Error.

Description:

When running csle ls --all, I encountered an issue where cadvisor failed to start in Docker. The Docker logs reported the error "mountpoint for cpu not found". I found a solution documented on GitHub: cadvisor Issue #1943. However, due to network or other reasons, I was unable to docker pull gcr.io/cadvisor/cadvisor. Instead, I found an alternative image: gcr.nju.edu.cn/cadvisor/cadvisor:v0.49.1.

Solution

After modifying csle/management-system/run_c_advisor.sh with the following content, cadvisor started successfully:

docker run -dt --volume=/:/rootfs:ro --volume=/var/run:/var/run:ro --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --publish=8080:8080 --name=cadvisor gcr.nju.edu.cn/cadvisor/cadvisor:v0.49.1

Issue 2:

Description: Management-system cannot deploy.

Additionally, the file csle_mgmt_webapp.sh in csle/management-system/ references csle_moniter, which does not exist. It should be modified to reference the csle-mgmt-webapp folder instead.

Solution

Despite manually running npm run build and python server/server.py, I still couldn't access management-system at localhost:7777. However, testing with npm start within the management-system folder was successful. I am currently considering how to resolve this issue.

@Limmen
Copy link
Owner

Limmen commented May 9, 2024

Hi @kingxiaofire , thanks for the feedback. Regarding the c_advisor and mgmt bash scripts, you are right, I have updated the scripts on master now. I barely use those scripts anymore which is why this went unnoticed. When CSLE is installed completely you can start/stop everything via the csle CLI which runs the commands for you, without invoking the scripts. For example the cadvisor bug that you mentioned is already changed here: https://github.com/Limmen/csle/blob/master/simulation-system/libs/csle-common/src/csle_common/constants/constants.py#L935

Regarding the npm run build. I have had issues with that as well on certain platforms, it seems that node.js operate differently on different systems. Try the command export NODE_OPTIONS=--openssl-legacy-provider that is mentioned in the docs: https://limmen.dev/csle/docs/installing/

@Limmen
Copy link
Owner

Limmen commented May 9, 2024

@kingxiaofire
Copy link
Contributor Author

Hi @Limmen ,thank you very much for your response. Due to network issues, I'm unable to install all components directly via Ansible, especially encountering difficulties with Docker image downloads. Consequently, I've resorted to manual installation methods.

Regarding the npm issue, I've ensured that serverIp.js is correct and have executed export NODE_OPTIONS=--openssl-legacy-provider, but to no avail. Nonetheless, that's alright; I mean, I can give these issues another shot.

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