Summary:
Adds a check to enhance clarity of error thrown when a container created with a name that is of a length greater than 64 characters will fail to start after creation:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: sethostname: invalid argument: unknown.
This is due to the internal hostname of the container being set to the container's name, which has an additional 64 character limit, causing the container to fail to start consistently.
Type of change
[ ] Bug fix
[x] Testbed and Framework(new/improvement)
[ ] Test case(new/improvement)
Back port request
[ ] 202012
[ ] 202205
[ ] 202305
[ ] 202311
[ ] 202405
Approach
What is the motivation for this PR?
To enhance error messaging for this particular edge case, as it was previously difficult to discern why the container would be created successfully, but then consistently fail to start.
How did you do it?
Adds a check to prevent containers from being created with name lengths greater than 64 characters, as these containers will not be able to start.
How did you verify/test it?
Ran the setup script, with both a valid name and an invalid name (valid is on the left, invalid is on the right):
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?
Description of PR
Summary: Adds a check to enhance clarity of error thrown when a container created with a name that is of a length greater than 64 characters will fail to start after creation:
This is due to the internal hostname of the container being set to the container's name, which has an additional 64 character limit, causing the container to fail to start consistently.
Type of change
Back port request
Approach
What is the motivation for this PR?
To enhance error messaging for this particular edge case, as it was previously difficult to discern why the container would be created successfully, but then consistently fail to start.
How did you do it?
Adds a check to prevent containers from being created with name lengths greater than 64 characters, as these containers will not be able to start.
How did you verify/test it?
Ran the setup script, with both a valid name and an invalid name (valid is on the left, invalid is on the right):
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?
N/A
Documentation
N/A