Bug 759269 - Empty MOTD causes tracebacks in server-errors.log
Summary: Empty MOTD causes tracebacks in server-errors.log
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 0.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: 0.14.2
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard: ImplementationQuality
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-01 20:15 UTC by Derrich Hafemann
Modified: 2013-11-07 01:47 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-11-07 01:47:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Derrich Hafemann 2011-12-01 20:15:22 UTC
Description of problem:

When there's no MOTD that needs to be displayed, the contents of /etc/beaker/motd.xml are set to :

<!-- span>Uncomment and add the MOTD here</span -->

This produces tracebacks in server-errors.log:

2011-11-15 20:43:35,404 bkr.server.motd ERROR Unable to read motd
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bkr/server/motd.py", line 17, in <module>
    the_motd = etree.tostring(tree.getroot())
  File "lxml.etree.pyx", line 2632, in lxml.etree.tostring (src/lxml/lxml.etree.c:49164)
TypeError: Type 'NoneType' cannot be serialized.


Version-Release number of selected component (if applicable): beaker-0.8.0-17.el6eso


How reproducible: 100%


Steps to Reproduce:
1. Set MOTD as described earlier
2. Bounce httpd & beakerd
3. Note traceback in log
  
Actual results:

Traceback is thrown when an MOTD without a message to display is used

Expected results:

No MOTD displayed on the Web UI, and no traceback in the logs.

Additional info:

If there's something else we should be putting in the file, we're open to suggestions.

Comment 3 Dan Callaghan 2013-07-29 01:53:40 UTC
On Gerrit: http://gerrit.beaker-project.org/2126

Comment 5 xjia 2013-08-06 06:11:21 UTC
Verify:

[root@beaker beaker]# cat /etc/beaker/motd.xml
<!-- span>The QE environment says hello</span-->
[root@beaker beaker]# service beakerd restart
Stopping beakerd:                                          [  OK  ]
Starting beakerd:                                          [  OK  ]
[root@beaker beaker]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

there's no error in the log, and doesn't show the message on the Web.

[root@beaker beaker]# cat /etc/beaker/motd.xml
<span>The QE environment says hello</span>
[root@beaker beaker]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@beaker beaker]# service beakerd restart
Stopping beakerd:                                          [  OK  ]
Starting beakerd:                                          [  OK  ]

There's no error in the log, and show the message on the Web:
Message of the day The QE environment says hello

Comment 6 Nick Coghlan 2013-10-03 02:29:16 UTC
Beaker 0.15 has been released.

Comment 7 Raymond Mancy 2013-10-23 01:56:54 UTC
This change has been nominated to be back ported to the 0.14 branch, to be released as part of the next maintenance release 0.14.2.

Comment 8 Nick Coghlan 2013-10-25 06:36:22 UTC
Adjusting target milestone to make the changes backported to 0.14.2 easier to identify. 0.15.0 has enough significant regressions that it shouldn't be used, so the change means that 0.15.1 can be effectively reidentified as the union of that tag and the 0.14.2 target milestone.

Comment 10 xjia 2013-10-29 04:54:50 UTC
Verify:

[root@beaker beaker]# cat /etc/beaker/motd.xml
<!-- span>Uncomment and add the MOTD here</span-->
[root@beaker beaker]# service beakerd restart
Stopping beakerd:                                          [  OK  ]
Starting beakerd:                                          [  OK  ]
[root@beaker beaker]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

there's no error in the log, and doesn't show the message on the Web.

[root@beaker beaker]# cat /etc/beaker/motd.xml
<span>Uncomment and add the MOTD here</span>
[root@beaker beaker]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@beaker beaker]# service beakerd restart
Stopping beakerd:                                          [  OK  ]
Starting beakerd:                                          [  OK  ]

There's no error in the log, and show the message on the Web:
Message of the day Uncomment and add the MOTD here

Comment 11 Nick Coghlan 2013-11-07 01:47:20 UTC
Closing as addressed in Beaker 0.14.2.


Note You need to log in before you can comment on or make changes to this bug.