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

COCOS-100 - Isolate the algorithm execution from Agent #120

Closed

Conversation

danko-miladinovic
Copy link
Contributor

What type of PR is this?

This PR fixes the following issues:
#100
#65

What does this do?

This PR creates a Linux Namespace for the algorithm executable so that it cannot interfere with the Agent or the kernel.

Which issue(s) does this PR fix/relate to?

Resolves:
#100
#65

Have you included tests for your changes?

The tests will be included.

Did you document any new/modified feature?

The documentation will be updated in a separate PR to the cocos-docs repository.

Notes

agent/service.go Outdated
Comment on lines 321 to 348
// if err := syscall.Mount("proc", "/proc", "proc", 0, ""); err != nil {
// fmt.Println("failed to mount /proc: ", err)
// os.Exit(1)
// }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

agent/service.go Outdated
@@ -51,6 +52,10 @@ var (
errStateNotReady = errors.New("agent not expecting this operation in the current state")
// errHashMismatch provided algorithm/dataset does not match hash in manifest.
errHashMismatch = errors.New("malformed data, hash does not match manifest")

// new root directory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@danko-miladinovic danko-miladinovic changed the title DRAFT - Isolate the algorithm execution from Agent COCOS - 100 - Isolate the algorithm execution from Agent May 15, 2024
@danko-miladinovic danko-miladinovic changed the title COCOS - 100 - Isolate the algorithm execution from Agent COCOS-100 - Isolate the algorithm execution from Agent May 15, 2024
@danko-miladinovic danko-miladinovic marked this pull request as ready for review May 15, 2024 14:51
Copy link
Contributor

@dborovcanin dborovcanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one ready?

@danko-miladinovic
Copy link
Contributor Author

Is this one ready?

There is a problem with initramfs. It cannot perform the operation pivot_root. I am checking for a solution.

@dborovcanin dborovcanin marked this pull request as draft June 14, 2024 15:19
@drasko
Copy link
Contributor

drasko commented Jul 6, 2024

Closed in favor of Docker and Wasm runtimes

@drasko drasko closed this Jul 6, 2024
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

Successfully merging this pull request may close these issues.

3 participants