Skip to content

Ignore error log from ctrmgrd in test_k8s_config_patch_apply#12849

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:ignore_ctrmgrd_err_log_in_k8s_test
May 15, 2024
Merged

Ignore error log from ctrmgrd in test_k8s_config_patch_apply#12849
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:ignore_ctrmgrd_err_log_in_k8s_test

Conversation

@bingwang-ms
Copy link
Copy Markdown
Collaborator

Description of PR

Summary:
Test case test_k8s_config_patch_apply is error out because error logs in syslog. The error message is expected as DUT doesn't have public DNS access.

E               May 11 13:35:04.494371 sonic ERR ctrmgrd.py: Refer file /tmp/tmp8apufdr7kube_hints_ for troubleshooting tips
E               
E               May 11 13:35:04.495918 sonic ctrmgrd.py: Join failed: HTTPSConnectionPool(host='k8svip.ap.gbl', port=6443): Max retries exceeded with url: /api/v1/namespaces/default/configmaps/kube-root-ca.crt (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fdd64a9a250>: Failed to resolve 'k8svip.ap.gbl' ([Errno -2] Name or service not known)"))

This PR addressed the issue by ignoring the error log.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

This PR is to ignore error log from ctrmgrd in test_k8s_config_patch_apply.

How did you do it?

Add the expected log pattern into ignore list of LogAnalyzer.

How did you verify/test it?

Verified by running the test in a physical testbed. The test can pass now.

collected 1 item                                                                                                                                                                                      

generic_config_updater/test_kubernetes_config.py::test_k8s_config_patch_apply PASSED                                                                                                            [100%]

Any platform specific information?

No.

Supported testbed topology if it's a new test case?

Not a new test case.

Documentation

@lixiaoyuner
Copy link
Copy Markdown
Contributor

LGTM

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202311: #12858

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.

3 participants