[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] A couple of questions regarding running jobs with docker containers (Q2)



On Wed, May 5, 2021 at 5:13 PM Greg Thain <gthain@xxxxxxxxxxx> wrote:

On 5/5/21 4:38 PM, tpdownes@xxxxxxxxx wrote:
> Jose/Greg:
>
> Thanks for posting this since it contained enough information for me
> to follow a hunch. In the cloud, hostnames can get quite long to
> promote uniqueness. I believe a docker hostname exceeding 63
> characters will throw this message even though it would be potentially
> valid in a bare metal linux environment:
>
> Error response from daemon: OCI runtime create failed:
> container_linux.go:367: starting container process caused:
> process_linux.go:495: container init caused: sethostname: invalid
> argument: unknown
> Error: failed to start containers:
> 3db6ad0295255f0f9d3203a2d7fa26aae2f7a2fe8481be21a0f07603256f8d65
>
> Posting this for the Google hits. I'll follow up with a proper support
> ticket.
>
Tom:

Interesting. Is this also a problem with docker_network = host ?

-greg

If I mimic what the code is doing and add host networking:

docker create --network host --hostname wcwrbbdtrmtefsjzx1wn1eqz4s1eycnwjq10hqj.7s6mi1uxjiyog98xlj50ms6mi.1uxjiyog98xlj50ms6mi1uxjiyog98xlj50m python:latest
docker start $OUTPUT_OF_FIRST_COMMAND

I get the same error (on macOS). Since it's enforcing a 63 character limit, I think docker wants a short hostname for --hostname and a domain for --domainname. But MACHINE is the fully qualified name. On top of all that, I'd give a little consideration to the objective. If it's just to make an interactive shell prompt look pretty, maybe setting $PS1 would suffice?

Anyhow, there's a ticket and I'd like to avoid troubleshooting in two places. The obvious solution (shortening the hostname) works fine for now.

Tom