Opened on 03/20/2015 at 07:46:53 AM

Closed on 03/22/2015 at 09:21:24 AM

#2185 closed defect (fixed)

Ensure Rietveld superuser creation errors are reported

Reported by: matze Assignee: matze
Priority: P3 Milestone:
Module: Infrastructure Keywords:
Cc: fhd Blocked By: #2186
Blocking: #2182, #2187 Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working:
Review URL(s):

http://codereview.adblockplus.org/6651739155464192

Description

When resource Exec['set_superuser'] from class rietveld fails, it does not trigger a Puppet error. This is caused by using manage.py shell, and can easily be reproduced with the following example:

$ echo "raise Exception()" | ./manage.py shell; echo "STATUS: $?"

The output is something like the following:

Python 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
Exception

>>> >>> STATUS: 0

(Actually, it would be better to use something like ./manage.py createsuperuser ... in the first place. But as far as I remember this does not allow specifying the password, not even via /dev/stdin. Still, it's worth a try.)

Attachments (0)

Change History (5)

comment:1 Changed on 03/20/2015 at 08:50:00 AM by matze

  • Blocked By 2186 added

comment:2 Changed on 03/20/2015 at 11:01:09 AM by matze

Update: Rather than fixing the Exec resource, we can use a simple database fixture after #2186 has been implemented.

comment:3 Changed on 03/20/2015 at 11:34:19 AM by matze

  • Cc fhd added
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed on 03/20/2015 at 11:46:42 AM by matze

  • Blocking 2187 added

comment:5 Changed on 03/22/2015 at 09:21:24 AM by matze

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from matze.
 
Note: See TracTickets for help on using tickets.