Skip to content

NO-JIRA: chore(tests/containers): report on nginx error messages in logs #916

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

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

jiridanek
Copy link
Member

@jiridanek jiridanek commented Feb 22, 2025

Description

Add a check for NGINX log messages in tests/containers.

How Has This Been Tested?

Added this at the end of codeserver/ubi9-python-3.11/nginx/httpconf/http.conf

#redirect port 80 http to 443 https
server{
    listen 8000;
    listen [::]:8000;
    #just for external access
    server_name hostname.external_domain;
    return 301 https://$host$request_uri;
}

# serve both http and https internally
server {
    listen 8000;
    listen 4430;
    listen [::]:8000;
    listen [::]:4430;

    server_name hostname hostname.internal_domain hostname.external_domain;
}

and started

poetry run pytest tests/containers --image quay.io/opendatahub/workbench-images:codeserver-ubi9-python-3.11-2024b_20250222 -k test_image_entrypoint_starts
ERROR:root:Unexpected keyword in the following message: '2025/02/22 20:53:42 [warn] 17#17: conflicting server name "hostname.external_domain" on 0.0.0.0:8000, ignored'
--------------------------------------------------------------------------------------------- live log logreport ---------------------------------------------------------------------------------------------
2025-02-22 21:53:48 ERROR Unexpected keyword in the following message: '2025/02/22 20:53:42 [warn] 17#17: conflicting server name "hostname.external_domain" on 0.0.0.0:8000, ignored'
ERROR:root:Unexpected keyword in the following message: 'nginx: [warn] conflicting server name "hostname.external_domain" on 0.0.0.0:8000, ignored'
2025-02-22 21:53:48 ERROR Unexpected keyword in the following message: 'nginx: [warn] conflicting server name "hostname.external_domain" on 0.0.0.0:8000, ignored'
ERROR:root:Unexpected keyword in the following message: '2025/02/22 20:53:42 [warn] 17#17: conflicting server name "hostname.external_domain" on [::]:8000, ignored'
2025-02-22 21:53:48 ERROR Unexpected keyword in the following message: '2025/02/22 20:53:42 [warn] 17#17: conflicting server name "hostname.external_domain" on [::]:8000, ignored'
ERROR:root:Unexpected keyword in the following message: 'nginx: [warn] conflicting server name "hostname.external_domain" on [::]:8000, ignored'
2025-02-22 21:53:48 ERROR Unexpected keyword in the following message: 'nginx: [warn] conflicting server name "hostname.external_domain" on [::]:8000, ignored'
DEBUG:root:Waived message: '2025/02/22 20:53:42 [error] 21#21: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.127.1, server: ${base_url}, request: "GET /codeserver/ HTTP/1.1", upstream: "http://127.0.0.1:8787/", host: "localhost:36321"'
DEBUG:root:Waived message: '2025/02/22 20:53:43 [error] 21#21: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.127.1, server: ${base_url}, request: "GET /codeserver/ HTTP/1.1", upstream: "http://127.0.0.1:8787/", host: "localhost:36321"'

tests/containers/workbenches/workbench_image_test.py::TestWorkbenchImage::test_image_entrypoint_starts[quay.io/opendatahub/workbench-images:codeserver-ubi9-python-3.11-2024b_20250222-sysctls0] [Checking the log in the workbench...] SUBFAILDEBUG:urllib3.connectionpool:http://localhost:None "POST /v1.41/containers/4cfbe5fc51add0605a2add12e2bed95634a406e491452ff8fb01d112396f9325/stop?t=0 HTTP/1.1" 204 0 

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@openshift-ci openshift-ci bot added size/s and removed size/s labels Feb 22, 2025
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

👍

@jiridanek
Copy link
Member Author

/override ci/prow/images
/approve

Copy link
Contributor

openshift-ci bot commented Feb 25, 2025

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/images

In response to this:

/override ci/prow/images
/approve

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor

openshift-ci bot commented Feb 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 3c581b5 into opendatahub-io:main Feb 25, 2025
7 checks passed
harshad16 pushed a commit to harshad16/odh-notebooks that referenced this pull request Jun 25, 2025
…lux/component-updates/component-update-odh-workbench-jupyter-tensorflow-rocm-py311-ubi9-n-v2-22

chore(deps): update odh-workbench-jupyter-tensorflow-rocm-py311-ubi9-n-v2-22 to 2be300a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants