Project

Profile

Help

Issue #2700

closed

Crane crashes on start-up if "debug" config option isn't present

Added by Ichimonji10 almost 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version - Crane:
Platform Release:
Target Release - Crane:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

Description

Let's say that you install crane (in my case, from the nightly RPM build) and create the following /etc/crane.conf:

[general]
data_dir: /var/lib/published/docker
endpoint: localhost:5000

In this case, Crane will fail to start:

[root@fedora-24-pulp-2-13 ~]# python2 -c 'from crane.app import create_app; create_app().run()'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/crane/app.py", line 29, in create_app
    config.load(app)
  File "/usr/lib/python2.7/site-packages/crane/config.py", line 59, in load
    read_config(app, parser)
  File "/usr/lib/python2.7/site-packages/crane/config.py", line 81, in read_config
    app.config['DEBUG'] = parser.getboolean(SECTION_GENERAL, KEY_DEBUG)
  File "/usr/lib64/python2.7/ConfigParser.py", line 368, in getboolean
    v = self.get(section, option)
  File "/usr/lib64/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'debug' in section: 'general'

This isn't expected. The documentation states that debug defaults to "false", meaning that the debug option should be optional.

This affects the nightly builds of Crane for Pulp 2.12 and 2.13.

Also available in: Atom PDF