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

Error not shown when agent image can't be pulled #178

Open
eyalb181 opened this issue Oct 10, 2023 · 3 comments
Open

Error not shown when agent image can't be pulled #178

eyalb181 opened this issue Oct 10, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@eyalb181
Copy link
Member

Bug Description

A user reported that our image registry is blocked in their cluster, so the agent can't be created. However, the local process runs with no apparent problem - the error was detected only when the user tried to receive incoming traffic.

Steps to Reproduce

I think entering a fictional path in AGENT_IMAGE should do the trick

Backtrace

No response

Relevant Logs

No response

Your operating system and version

N/A

Local process

N/A

Local process version

No response

Additional Info

No response

@eyalb181 eyalb181 added the bug Something isn't working label Oct 10, 2023
@meowjesty
Copy link
Member

meowjesty commented Oct 16, 2023

I'm getting a different behavior.

When setting:

"agent": {
    "image": "invalid/mirrord-agent:latest"
},

The IDE freezes, until we get "mirrord process timed out", resulting in a very generic failure "Error running 'sample' mirrord failed" (don't see output from my sample project). Weird part is, this is also the behavior if you don't have a valid config (e.g. trailing comma).

All of this was tested with a java project.

Will try to simulate valid agent image, but no network access 🤔

@meowjesty
Copy link
Member

Looks like the hanging only occurs for java projects.

But alas, running with an invalid agent image setting produces an error (as expected), and doesn't run the sample app (again, as expected).

@meowjesty
Copy link
Member

Alright, I gave this a few more runs, here's what I got:

  • Disconnected my network interface (no internet access):
  1. running with default agent config, mirrord and the sample app both ran, but I got these logs
default agent logs
2023-10-18T21:26:53.711298Z  INFO ThreadId(01) mirrord_layer: Initializing mirrord-layer!
2023-10-18T21:26:53.718396Z  INFO ThreadId(03) mirrord_layer::socket::ops: in connect LazyLock(
    {
        8: UserSocket {
            id: SocketId(
                0,
            ),
            domain: 1,
            type_: 526337,
            protocol: 0,
            state: Initialized,
            kind: Tcp(
                526337,
            ),
        },
    },
)
2023-10-18T21:26:53.752191Z  INFO ThreadId(04) mirrord_layer::error: mirrord-layer: IPv6 can't be used with mirrord
2023-10-18T21:26:53.756835Z  INFO ThreadId(04) mirrord_layer::socket::ops: in connect LazyLock(
    {
        14: UserSocket {
            id: SocketId(
                8,
            ),
            domain: 2,
            type_: 1,
            protocol: 0,
            state: Initialized,
            kind: Tcp(
                1,
            ),
        },
    },
)
Hello World!
Program arguments: 
2023-10-18T21:26:53.781091Z  INFO ThreadId(04) mirrord_layer::error: libc error (doesn't indicate a problem) >> ResponseError(
    RemoteIO(
        RemoteIOError {
            raw_os_error: Some(
                111,
            ),
            kind: ConnectionRefused,
        },
    ),
)

I have a cached image, so it makes sense that this would work. What's happening here is probably an error in the agent when we try to detect which network interface to use, shouldn't be relevant for the missing agent issue though.

  1. If I have agent.image_pull_policy set to "Always", mirrord and the sample also fail, showing the warning "failed to update the mirrord binary java.net.ConnectionException";
  • With my network back in order:

I've set agent.image: "invalid/mirrord-agent:latest", and after a while we just get an error saying "Agent wasn't ready in time.", and the sample app doesn't run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants