Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-29670

500 Internal Server Error when trying to access published URl of kickstart repo after it has been synced

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • pulpcore-3.49.25
    • 0
    • Phoenix - Content, Rocket
    • Important
    • To Do
    • Yes

      Description of problem:

      Getting 500 Internal Server Error when trying to access published URl of kickstart repo after it has been synced

       

      How reproducible:

      Always

       

      Is this issue a regression from an earlier version:

      Yes

       

      Steps to Reproduce:

      1. Install a satellite 6.16

      2. Enable a kickstart repo  ( baseos kickstart 9.5 )

      3. Open the repo from WebUI and try accessing it's Published At URL

      4. Sync the repo 

      5. Repeat Step 3. 

       

      Actual behavior:

      No issues at Step 3. 

      500 Internal Server Error in the browser at Step 5.

       

      The following pulp messages are logged :

       

      Nov 25 18:56:37 rhsat616r8 pulpcore-content[1689]: [25/Nov/2024:13:26:37 +0000] "GET /pulp/content/RedHat/Library/content/dist/rhel9/9.5/x86_64/baseos/kickstart/treeinfo HTTP/1.1" 200 289 "-" "pulpcore/3.49.19 (cpython 3.11.10-final0, Linux x86_64) (aiohttp 3.9.4)"
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]: [2024-11-25 13:26:41 +0000] [1689] [ERROR] Error handling request
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]: Traceback (most recent call last):
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/asgiref/sync.py", line 486, in thread_handler
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    raise exc_info[1]
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/asgiref/sync.py", line 486, in thread_handler
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    raise exc_info[1]
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/content/handler.py", line 619, in _match_and_stream
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    await publication.published_artifact.aget(relative_path=index_path)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 649, in aget
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    return await sync_to_async(self.get)(*args, **kwargs)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/asgiref/sync.py", line 448, in __call__
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    ret = await asyncio.wait_for(future, timeout=None)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib64/python3.11/asyncio/tasks.py", line 452, in wait_for
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    return await fut
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib64/python3.11/concurrent/futures/thread.py", line 58, in run
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    result = self.fn(*self.args, **self.kwargs)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/asgiref/sync.py", line 490, in thread_handler
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    return func(*args, **kwargs)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 637, in get
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    raise self.model.DoesNotExist(
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]: pulpcore.app.models.publication.PublishedArtifact.DoesNotExist: PublishedArtifact matching query does not exist.
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]: During handling of the above exception, another exception occurred:
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]: Traceback (most recent call last):
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib64/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    resp = await request_handler(request)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib64/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    resp = await handler(request)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib64/python3.11/site-packages/aiohttp/web_middlewares.py", line 114, in impl
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    return await handler(request)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/content/authentication.py", line 48, in authenticate
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    return await handler(request)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/content/instrumentation.py", line 230, in middleware
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    resp = await handler(request)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/cache/cache.py", line 352, in cached_function
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    response = await self.make_entry(
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:               ^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/cache/cache.py", line 395, in make_entry
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    response = await handler(*args, **kwargs)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/content/handler.py", line 257, in stream_content
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    return await self._match_and_stream(path, request)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/content/handler.py", line 636, in _match_and_stream
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    body=self.render_html(
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:         ^^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/pulpcore/content/handler.py", line 438, in render_html
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    return template.render(
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:           ^^^^^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/jinja2/environment.py", line 1304, in render
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    self.environment.handle_exception()
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/jinja2/environment.py", line 939, in handle_exception
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    raise rewrite_traceback_stack(source=source)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "<template>", line 15, in top-level template code
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:  File "/usr/lib/python3.11/site-packages/jinja2/filters.py", line 697, in do_filesizeformat
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:    bytes = float(value)
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]:            ^^^^^^^^^^^^
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]: ValueError: could not convert string to float: 'None\n'
      Nov 25 18:56:42 rhsat616r8 pulpcore-content[1689]: [25/Nov/2024:13:26:38 +0000] "GET /pulp/content/RedHat/Library/content/dist/rhel9/9.5/x86_64/baseos/kickstart/ HTTP/1.1" 500 335 "https://rhsat616r8.example.com/products/79/repositories/165" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"

       

       

      Expected behavior:

      No such errors

       

      Business Impact / Additional info:

      Bad UI experience for the end-users

       

              Unassigned Unassigned
              rhn-support-sadas Satyajit Das
              Sayan Das
              Amol Patil Amol Patil
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 seconds