misc: should be able to generate dependency relation diagrams for jobs

Bug #203417 reported by John Dong
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Fix Released
Wishlist
James Hunt

Bug Description

While writing upstart jobs for my system, I found at times the best logic debugging tool was to have Graphviz plot out the dependency diagram of my bootup. Right now I'm just rudimentarily parsing the "start on" condition but that in itself has let me spot obvious errors in my logic that looking through flat textfiles could not reveal.

I think Upstart should come with some sort of ability to print out its job dependency information.

For reference, here's my example Python script that takes in a path to event.d and generates a dotfile:
http://jdong.mit.edu/~jdong/macbook/depchart/depchart.py

And its output:
http://jdong.mit.edu/~jdong/macbook/depchart/upstart-dep.png

Changed in upstart:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This will be easier with the move to a "while"-based syntax

Changed in upstart:
status: Confirmed → Triaged
summary: - Upstart should be able to generate dependency relation diagrams for jobs
+ misc: should be able to generate dependency relation diagrams for jobs
Revision history for this message
kiwanami (m-sakurai) wrote :

I wrote a diagraming script in Ruby. This script generates a dot file that illustrates the upstart dependency, connecting 'start on', 'stop on' and 'emits' entries with conf files in the directory /etc/init/.

 http://github.com/kiwanami/ruby-upstart-diagram/blob/master/depchart.rb

Here is an output image on my Ubuntu 10.04 desktop.

 https://cacoo.com/diagrams/hIXXBtEFbUyuRhL6-BB76C.png

Can I contribute this script to this project?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 203417] Re: misc: should be able to generate dependency relation diagrams for jobs

On Fri, 2010-08-06 at 13:36 +0000, kiwanami wrote:

> Can I contribute this script to this project?
>
To be included Upstream, I'd rather not introduce a ruby dependency

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?

Revision history for this message
James Hunt (jamesodhunt) wrote :

Upstart in Natty now provides this facility (initctl2dot).

Changed in upstart:
assignee: nobody → James Hunt (jamesodhunt)
status: Triaged → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Scott James Remnant (scott) wrote :

Please don't change upstream tasks to Fix Committed unless the code is in trunk (lp:upstart) or Fix Released unless the code is in a released tarball.

To track changes to Upstart in Natty, add an Ubuntu "Task" to the bug.

Changed in upstart:
status: Fix Committed → In Progress
James Hunt (jamesodhunt)
Changed in upstart:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.