Skip to content

Sandbox does not ensure working environment #19

@gtristan

Description

@gtristan

There needs to be some accountability for ensuring that things work when running a sandbox.

For instance, when running a specific command in a sandbox, it should be the caller's responsibility to ensure that the command is in fact staged, and referred to by it's full path, or, has setup the PATH variable correctly.

However sandboxlib itself also runs some code in the sandbox, a side effect of not taking care of this is described in this comment on ybd issue 224:

devcurmudgeon/ybd#224 (comment)

In the above case, we find that when the python code itself fails to launch something, in this case it is because python received ENOENT (no such file or directory) for the program which the calling code asked to execute (in the above case, caller wanted to launch a shell, but did not provide a shell), then sandboxlib fails to deliver the error message / exception to the caller.

This is because sandboxlib does not take care of providing a suitable python environment for it's own code to run in the sandbox, in ybd issue 224; we have a case where the caller happened to stage python3, which caused sandboxlib to mostly work mostly by coincidence - except when it tries to report an error because of missing 'string-escape' encoding library expected to be built into python 2.7.

Surely in the above case, the caller is at fault for trying to invoke a shell which it did not provide, but sandboxlib must also be responsible for ensuring it's own runtime requirements in it's own sandbox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions