Closed Bug 635254 Opened 13 years ago Closed 13 years ago

Provide the __heartbeat__ and __debug__ screen [identity]

Categories

(Cloud Services :: Server: Identity, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tarek, Assigned: jrconlin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Those are the standard views for displaying debug info + heartbeating
Summary: Provide the __heartbeat__ and __debug__ screen → Provide the __heartbeat__ and __debug__ screen [identity]
Assignee: nobody → jrconlin
Committed as part of 635294
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Sorry I am kind of lost in the commit that contains many other stuff. Could you point me to the relevant part I should review ? thanks !
Sure.

For the __debug__ page, I added the following lines to oidserver/wsgapi.py:

 class OIDApp(SyncServerApp):
     """OID application"""
     def __init__(self, urls, controllers, config, auth_class):
         """ Main storage """
         self.storage = get_storage(config, 'oidstorage')
         super(OIDApp, self).__init__(urls, controllers, config, auth_class)
+        self.debug_page = '__debug__'

For the __heartbeat__ page, I'm using the default heartbeat page defined in SyncServerApp.
You don't have to do this, as SyncServerApp looks for global.debug_page in the config. 

In fact it's even a security issue because with this change anyone that runs your server will get the debug page without a way to deactivate it. The idea is that is deactivated by default and activated only via an explicit configuration.

See: http://docs.services.mozilla.com/server-devguide/configuration.html#global

So IOW your app code already has what was required, and you just need to provide the config for Ops in the cfg file
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Per Tarek's comment, removing the hardcoded __debug__. Also including doc pointer to config information. 

(Note: diff includes patch for 654730)
one line fix committed to 67:4d973a53a5be
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
(In reply to comment #5)
> Created attachment 530110 [details] [diff] [review] [review]
> removed __debug__ hardcode
> 
> Per Tarek's comment, removing the hardcoded __debug__. Also including doc
> pointer to config information. 
> 
> (Note: diff includes patch for 654730)

The patch for bug 654730 is still being discussed. I guess it's simpler not to have a diff covering several bugs/issues
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: