Skip to content

Fix Content-Length header missing + enable ping testing#7

Open
matteopozza wants to merge 2 commits intomainfrom
CCCP-5225
Open

Fix Content-Length header missing + enable ping testing#7
matteopozza wants to merge 2 commits intomainfrom
CCCP-5225

Conversation

@matteopozza
Copy link
Copy Markdown

We noticed that AlmaLinux server stopped returning the Content-Length header,
which the tool uses to make some checks. Turns out this is due to python
requests including gzip as an Accept-Encoding, which is then chosen by
AlmaLinux server as the encoding used for the reply. The commit fixes the issue
declaring to accept only deflate as encoding. When deflate is chosen,
Content-Length header is returned among the headers of the reply.

Currently, when we run the tool as a container, we pass the environment
variable IMAGEBUILDER_DISABLE_PINGING. If the variable is actually not defined
in the environment running the container, the result is that the variable
IMAGEBUILDER_DISABLE_PINGING gets defined and it is passed as an empty string.
As a result, pinging tests are never executed. The commit fixes the problem by
checking if the variable is either None or matches and empty string.

We noticed that AlmaLinux server stopped returning the Content-Length header,
which the tool uses to make some checks. Turns out this is due to python
requests including gzip as an Accept-Encoding, which is then chosen by
AlmaLinux server as the encoding used for the reply. The commit fixes the issue
declaring to accept only deflate as encoding. When deflate is chosen,
Content-Length header is returned among the headers of the reply.

Currently, when we run the tool as a container, we pass the environment
variable IMAGEBUILDER_DISABLE_PINGING. If the variable is actually not defined
in the environment running the container, the result is that the variable
IMAGEBUILDER_DISABLE_PINGING gets defined and it is passed as an empty string.
As a result, pinging tests are never executed. The commit fixes the problem by
checking if the variable is either None or matches and empty string.
@matteopozza
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant