Project

General

Profile

Actions

Bug #44683

closed

nautilus: mgr/dashboard: "make check" fails in run-tox-mgr-dashboard: "HomeTest.test_home_default_lang: 'Status 404 Not Found does not match 200'"

Added by Ernesto Puerta about 4 years ago. Updated about 3 years ago.

Status:
Duplicate
Priority:
High
Category:
i18n
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Recently, nautilus branch has started to show failures in make check, specifically in the run-tox-mgr-dashboard test (see this PR or this other one):

=================================== FAILURES ===================================
_______________________ HomeTest.test_home_default_lang ________________________

self = <dashboard.tests.test_home.HomeTest testMethod=test_home_default_lang>

    def test_home_default_lang(self):
        self._get('/')
>       self.assertStatus(200)

tests/test_home.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../build/dashboard/py27-cov/local/lib/python2.7/site-packages/cheroot/test/webtest.py:392: in assertStatus
    self._handlewebError(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dashboard.tests.test_home.HomeTest testMethod=test_home_default_lang>
msg = 'Status 404 Not Found does not match 200'

    def _handlewebError(self, msg):
        print('')
        print('    ERROR: %s' % msg)

        if not self.interactive:
>           raise self.failureException(msg)
E           AssertionError: Status 404 Not Found does not match 200

../../../../build/dashboard/py27-cov/local/lib/python2.7/site-packages/cheroot/test/webtest.py:325: AssertionError
---------------------------- Captured stderr setup -----------------------------
INFO:cherrypy.error:[19/Mar/2020:12:39:18] ENGINE Listening for SIGUSR1.
INFO:cherrypy.error:[19/Mar/2020:12:39:18] ENGINE Listening for SIGTERM.
INFO:cherrypy.error:[19/Mar/2020:12:39:18] ENGINE Listening for SIGHUP.
INFO:cherrypy.test.helper:Python version used to run this test script: 2.7.17
INFO:cherrypy.test.helper:CherryPy version: 13.1.0
INFO:cherrypy.test.helper:HTTP server version: HTTP/1.1
INFO:cherrypy.test.helper:PID: 32024
INFO:dashboard:Initializing controller: HomeController -> /
DEBUG:dashboard:Mapped [/{path:.*}] to HomeController:__call__ restricted to GET
INFO:cherrypy.error:[19/Mar/2020:12:39:18] ENGINE Bus STARTING
INFO:cherrypy.error:[19/Mar/2020:12:39:18] ENGINE Serving on http://127.0.0.1:54583
INFO:cherrypy.error:[19/Mar/2020:12:39:18] ENGINE Bus STARTED
------------------------------ Captured log setup ------------------------------
_cplogging.py              223 INFO     [19/Mar/2020:12:39:18] ENGINE Listening for SIGUSR1.
_cplogging.py              223 INFO     [19/Mar/2020:12:39:18] ENGINE Listening for SIGTERM.
_cplogging.py              223 INFO     [19/Mar/2020:12:39:18] ENGINE Listening for SIGHUP.
helper.py                  201 INFO     Python version used to run this test script: 2.7.17
helper.py                  202 INFO     CherryPy version: 13.1.0
helper.py                  207 INFO     HTTP server version: HTTP/1.1
helper.py                  208 INFO     PID: 32024
__init__.py                592 INFO     Initializing controller: HomeController -> /
__init__.py                327 DEBUG    Mapped [/{path:.*}] to HomeController:__call__ restricted to GET
_cplogging.py              223 INFO     [19/Mar/2020:12:39:18] ENGINE Bus STARTING
_cplogging.py              223 INFO     [19/Mar/2020:12:39:18] ENGINE Serving on http://127.0.0.1:54583
_cplogging.py              223 INFO     [19/Mar/2020:12:39:18] ENGINE Bus STARTED
----------------------------- Captured stdout call -----------------------------

    ERROR: Status 404 Not Found does not match 200
----------------------------- Captured stderr call -----------------------------
DEBUG:dashboard:frontend language from headers: [u'en-us']
DEBUG:dashboard:Languages '[u'en-us']' not available, falling back to en-US
DEBUG:dashboard:serving static content: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/dist/en-US/index.html
INFO:cherrypy.access.140390063683792:127.0.0.1 - - [19/Mar/2020:12:39:18] "GET / HTTP/1.1" 404 513 "" "" 
------------------------------ Captured log call -------------------------------
home.py                     99 DEBUG    frontend language from headers: [u'en-us']
home.py                     81 DEBUG    Languages '[u'en-us']' not available, falling back to en-US
home.py                    108 DEBUG    serving static content: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/dist/en-US/index.html
_cplogging.py              310 INFO     127.0.0.1 - - [19/Mar/2020:12:39:18] "GET / HTTP/1.1" 404 513 "" "" 
___________________________ HomeTest.test_home_en_us ___________________________

self = <dashboard.tests.test_home.HomeTest testMethod=test_home_en_us>

    def test_home_en_us(self):
        self._get('/', headers=[('Accept-Language', 'en-US')])
>       self.assertStatus(200)

tests/test_home.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../build/dashboard/py27-cov/local/lib/python2.7/site-packages/cheroot/test/webtest.py:392: in assertStatus
    self._handlewebError(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dashboard.tests.test_home.HomeTest testMethod=test_home_en_us>
msg = 'Status 404 Not Found does not match 200'

    def _handlewebError(self, msg):
        print('')
        print('    ERROR: %s' % msg)

        if not self.interactive:
>           raise self.failureException(msg)
E           AssertionError: Status 404 Not Found does not match 200

../../../../build/dashboard/py27-cov/local/lib/python2.7/site-packages/cheroot/test/webtest.py:325: AssertionError
----------------------------- Captured stdout call -----------------------------

    ERROR: Status 404 Not Found does not match 200
----------------------------- Captured stderr call -----------------------------
DEBUG:dashboard:language preference: [('en-us', 1.0)]
DEBUG:dashboard:frontend language from headers: ['en-us']
DEBUG:dashboard:Languages '['en-us']' not available, falling back to en-US
DEBUG:dashboard:serving static content: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/dist/en-US/index.html
INFO:cherrypy.access.140390063683792:127.0.0.1 - - [19/Mar/2020:12:39:19] "GET / HTTP/1.1" 404 513 "" "" 
------------------------------ Captured log call -------------------------------
home.py                     71 DEBUG    language preference: [('en-us', 1.0)]
home.py                     99 DEBUG    frontend language from headers: ['en-us']
home.py                     81 DEBUG    Languages '['en-us']' not available, falling back to en-US
home.py                    108 DEBUG    serving static content: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/dist/en-US/index.html
_cplogging.py              310 INFO     127.0.0.1 - - [19/Mar/2020:12:39:19] "GET / HTTP/1.1" 404 513 "" "" 
____________________ HomeTest.test_home_non_supported_lang _____________________

self = <dashboard.tests.test_home.HomeTest testMethod=test_home_non_supported_lang>

    def test_home_non_supported_lang(self):
        self._get('/', headers=[('Accept-Language', 'NO-NO')])
>       self.assertStatus(200)

tests/test_home.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../build/dashboard/py27-cov/local/lib/python2.7/site-packages/cheroot/test/webtest.py:392: in assertStatus
    self._handlewebError(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dashboard.tests.test_home.HomeTest testMethod=test_home_non_supported_lang>
msg = 'Status 404 Not Found does not match 200'

    def _handlewebError(self, msg):
        print('')
        print('    ERROR: %s' % msg)

        if not self.interactive:
>           raise self.failureException(msg)
E           AssertionError: Status 404 Not Found does not match 200

../../../../build/dashboard/py27-cov/local/lib/python2.7/site-packages/cheroot/test/webtest.py:325: AssertionError
----------------------------- Captured stdout call -----------------------------

    ERROR: Status 404 Not Found does not match 200
----------------------------- Captured stderr call -----------------------------
DEBUG:dashboard:language preference: [('no-no', 1.0)]
DEBUG:dashboard:frontend language from headers: ['no-no']
DEBUG:dashboard:Languages '['no-no']' not available, falling back to en-US
DEBUG:dashboard:serving static content: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/dist/en-US/index.html
INFO:cherrypy.access.140390063683792:127.0.0.1 - - [19/Mar/2020:12:39:19] "GET / HTTP/1.1" 404 513 "" "" 
------------------------------ Captured log call -------------------------------
home.py                     71 DEBUG    language preference: [('no-no', 1.0)]
home.py                     99 DEBUG    frontend language from headers: ['no-no']
home.py                     81 DEBUG    Languages '['no-no']' not available, falling back to en-US
home.py                    108 DEBUG    serving static content: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/dist/en-US/index.html
_cplogging.py              310 INFO     127.0.0.1 - - [19/Mar/2020:12:39:19] "GET / HTTP/1.1" 404 513 "" "" 
==================== 3 failed, 274 passed in 70.55 seconds =====================

Surprisingly, this failure only happens on builder nodes of type "braggi", which features more powerful setup (David Galloway confirmed), but not in master/octopus or with other builders (like ubuntu or centos ones).

This unit test basically has a hard dependency on the filesystem (this has been fixed in master/octopus) and that might be cause for this. Why only in 'braggi' nodes? No clue yet.


Related issues 3 (0 open3 closed)

Related to Dashboard - Backport #45157: nautilus: mgr/dashboard: Refactor Python unittests and controllerResolvedVolker TheileActions
Has duplicate Dashboard - Bug #44640: run-tox-mgr-dashboard fails during make check for nautilus PRsDuplicateTatjana Dehler

Actions
Is duplicate of Dashboard - Backport #45157: nautilus: mgr/dashboard: Refactor Python unittests and controllerResolvedVolker TheileActions
Actions #1

Updated by Ernesto Puerta about 4 years ago

  • Priority changed from Normal to High
Actions #2

Updated by Lenz Grimmer about 4 years ago

  • Assignee set to Tatjana Dehler
Actions #3

Updated by Tatjana Dehler about 4 years ago

  • Has duplicate Bug #44640: run-tox-mgr-dashboard fails during make check for nautilus PRs added
Actions #4

Updated by Nathan Cutler about 4 years ago

  • Subject changed from nautilus: mgr/dashboard: "make check" fails: "HomeTest.test_home_default_lang: 'Status 404 Not Found does not match 200'" to nautilus: mgr/dashboard: "make check" fails in run-tox-mgr-dashboard: "HomeTest.test_home_default_lang: 'Status 404 Not Found does not match 200'"
Actions #5

Updated by Kefu Chai about 4 years ago

i reran this test twice on braggi14, but failed to reproduce it

$ git log
commit fc349b728f2e646b242378bf798691b46c68c6df (grafted, HEAD, origin/pr/34392/merge)
Author: Kefu Chai <tchaikov@gmail.com>
Date:   Fri Apr 3 14:27:25 2020 -0700

    Merge 9fb43f37a51b1bed61a0b860a0889f688887ff5d into c5c3c09ade3d8624fd470a8360fc344806cf1b89

the branch being tested was https://github.com/ceph/ceph/pull/34392

5: ___________________________________ summary ____________________________________
5:   py27-cov: commands succeeded
5:   py27-lint: commands succeeded
5:   py27-check: commands succeeded
5:   congratulations :)
1/1 Test #5: run-tox-mgr-dashboard ............   Passed  113.06 sec

The following tests passed:
    run-tox-mgr-dashboard
Actions #8

Updated by Volker Theile about 4 years ago

Maybe this issue can be fixed by https://github.com/ceph/ceph/pull/31165. We had the same problem at that time with master (which was octopus afaik).

Actions #9

Updated by Volker Theile about 4 years ago

  • Related to Backport #45157: nautilus: mgr/dashboard: Refactor Python unittests and controller added
Actions #10

Updated by Ernesto Puerta about 4 years ago

  • Status changed from New to Duplicate
Actions #11

Updated by Ernesto Puerta about 4 years ago

  • Is duplicate of Backport #45157: nautilus: mgr/dashboard: Refactor Python unittests and controller added
Actions #12

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 147 to i18n
Actions

Also available in: Atom PDF