Opened 5 years ago

Closed 5 years ago

#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):


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

$ echo "raise Exception()" | ./ 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.
Traceback (most recent call last):
  File "<console>", line 1, in <module>

>>> >>> STATUS: 0

(Actually, it would be better to use something like ./ 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.)

Change History (5)

comment:1 Changed 5 years ago by matze

  • Blocked By 2186 added

comment:2 Changed 5 years ago by matze

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

comment:3 Changed 5 years ago by matze

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

comment:4 Changed 5 years ago by matze

  • Blocking 2187 added

comment:5 Changed 5 years ago by matze

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.