#Private Daggerverse Module Issue - [dumb-init] No such file or directory

1 messages · Page 1 of 1 (latest)

late axle
#

Hi

I'm getting an issue with my Dagger module when I've pulled it from a private repo on Github.
The module seems to work fine in terms of being pulled, but I get the following error when trying to work on a Docker Container it pulls down (Ubuntu based container I created)
✘ Container.withExec(args: ["ls", "-ls"]): Container! 0.3s ┃ [dumb-init] : No such file or directory ✘ exec ls -ls 0.3s ! process " ls -ls" did not complete successfully: exit code: 2 ✘ Container.stdout: String! 0.3s ! process " ls -ls" did not complete successfully: exit code: 2

The following is my debug function code
@function async def debug(self, source: dagger.Directory) -> str: """General debugging function for testing the module""" # read some variables from a config text file await self.read_config() messages = "" try: messages = ( #Get the Docker container to work in await self.get_image() .with_mounted_directory("/src", source) .with_workdir(f"/src{self.work_path}") # .terminal() .with_exec(["ls", "-ls"]) .stdout() ) except Exception as e: logging.error(f"Failed to run debug: {e}") return messages

The same code works fine when the module is local to my machine.

Also if I change my code so I run terminal at the point before the problem I can do all the commands fine (ls -ls, pwd, cmake --version)

Can anyone help me fix this issue?

alpine radish
#

I'm also wondering if by some reason work_path might be different also when you're using the module from the private repo. That'd result in ls being executed in a non existing folder

#

I don't think with_workdir fails if the directory doesn't exist

late axle
#

@function def get_image(self) -> dagger.Container: """Get the Docker image from the registry and create a Container object""" container = dag.container().from_(f"{self.registry_url}") return container
This looks to be working OK though as if I uncomment the terminal() command in the debug function I can run commands like cmake --version from inside the container which works OK and see the contents of the container OK with ls etc.

#

Also when using terminal it opens at the work_path folder too

alpine radish
#

@late axle I have some time to check this out now. Would you like to jump into #911305510882513037 and check it out together?

alpine radish
alpine radish
#

@late axle is there a way you might be hitting a code path where the container being returned to your debug function is pulling an incorrect built image via self.registry_url?

This is a way I've found to reproduce your issue:

@object_type
class Lala:
    @function
    def test(self) -> dagger.Container:
        return dag.container().from("image_without_ls").with_exec(["ls", "-ls"])
late axle
#

Sorry just seen the notifications.
It's possible but I'm confused as to why it would work when I enter the container with terminal and all the commands work OK, but when I try the with_exec command from code it doesn't work

alpine radish
late axle
#

That would be great. Give me about 5 or 10 minutes

alpine radish
late axle
#

OK, I think it's setup to debug further now

alpine radish
#

not sure I follow, sorry

late axle
#

Sorry, I'm ready to join the dev-audio. Not done that before so not clear what to do

alpine radish
#

ok, let's go there

alpine radish
#

we found the issue, a missing engineVersion in dagger.json was causing issues. Just to confirm @lusty oriole , if engineVersion is missing, the engine will/should fallback to the latest compat mode?

#

as it in this case it seemed like if the engine was running a different verison of the python runtime than the latest

late axle
#

For info, I've only got the 0.13.5 dagger engine Docker image on my machine

alpine radish
late axle
#

Thanks for the support @alpine radish . I also tested removing the entrypoint modifications we made and it still worked with the remote module 😄

alpine radish
#

when you run the module locally, it correctly uses the latest engine version

#

when you add -m, seems to be picking the minimum version Justin is referencing.

#

@late axle mind opening an issue if you have the time? I have to run now. Otherwise, I can tackle that later 🙏

late axle
#

Let me know if you need anything else