Project

Profile

Help

Issue #7230

closed

Problem using pbindings with django web server

Added by daviddavis over 4 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Dev Environment
Sprint:
Quarter:

Description

Steps to reproduce

  1. Install pulpcore with -e.
  2. Run pulp with django-admin runserver
  3. Generate some bindings (eg pbindings pulp_rpm python)

This will fail most of the time. The problem is that django's webserver autoreloads when it detects changes:

pulp: django.utils.autoreload:INFO: /usr/local/lib/pulp/lib/python3.7/site-packages/pulpcore/__init__.py changed, reloading.

While this reload happens, the bindings tries hit some urls but fails:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                                     
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                       
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0                                                                                                      
curl: (56) Recv failure: Connection reset by peer                                                                                                                                   
                                                                                                                                                                                    
http: error: ConnectionError: HTTPConnectionPool(host='localhost', port=24817): Max retries exceeded with url: /pulp/api/v3/status/ (Caused by NewConnectionError('<urllib3.connecti
on.HTTPConnection object at 0x7f10013f8c18>: Failed to establish a new connection: [Errno 111] Connection refused')) while doing a GET request to URL: http://localhost:24817/pulp/a
pi/v3/status/                                                                                                                                                                       
                                                                                                                                                                                    
[error] The spec file is not found: /local/api.json                                                                                                                                 
[error] Check the path of the OpenAPI spec and try again.                                                                                                                           

I'm not sure what modifies __init__.py? One solution is to run the django web server with --noreload but that's rather inconvenient.

Actions #1

Updated by daviddavis over 4 years ago

  • Description updated (diff)
Actions #2

Updated by daviddavis over 4 years ago

  • Description updated (diff)
Actions #3

Updated by daviddavis over 4 years ago

  • Description updated (diff)
Actions #4

Updated by daviddavis over 4 years ago

Maybe adding a sleep or retry would fix the problem?

Actions #5

Updated by daviddavis over 4 years ago

  • Tags Dev Environment added

Added by daviddavis over 4 years ago

Revision 64685531 | View on GitHub

Add a check that server is up during bindings generation

fixes #7230

Added by daviddavis over 4 years ago

Revision 64685531 | View on GitHub

Add a check that server is up during bindings generation

fixes #7230

Actions #6

Updated by pulpbot over 4 years ago

  • Status changed from NEW to POST
Actions #7

Updated by daviddavis over 4 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by daviddavis over 4 years ago

  • Category set to Installer - Moved to GitHub issues
Actions #9

Updated by ttereshc about 4 years ago

  • Sprint/Milestone set to 3.8.0
Actions #10

Updated by ttereshc about 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF