lp://staging/~jamesodhunt/upstart/upstream-job-visualisation

Created by James Hunt and last modified
Get this branch:
bzr branch lp://staging/~jamesodhunt/upstart/upstream-job-visualisation
Only James Hunt can upload to this branch. If you are James Hunt please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
James Hunt
Project:
upstart
Status:
Development

Recent revisions

1271. By James Hunt

* conf/rc-sysinit.conf: Added emits stanza.
* util/initctl.c:
  - New functions:
    - allow_job(): Determine if specified job is erroneous or not.
      Handles variables (such as instance variables).
    - allow_event(): Determine if specified event is erroneous or not.
      Handles globbing.
  - eval_expr_tree():
    - Added calls to allow_job() and allow_event().
    - Slight simplification of operand-handling code.

1270. By James Hunt

* Added --warn option to "initctl check-config" command:
  - util/tests/test_initctl.c: test_check_config(): New test for --warn.
  - util/initctl.c:
    - Added --warn / -w options.
    - Added check_config_warn variable.
    - eval_expr_tree(): Consider check_config_warn variable.
  - util/man/initctl.8: Documented --warn / -w option.

1269. By James Hunt

* util/tests/test_initctl.c:
  - RUN_COMMAND: Cleaned up variable names.
  - START_UPSTART(): Replaced upstart_open(), which uses the system bus
    (whereas we care about the session bus) with D-Bus method for
    determining if Upstart is initialised. Don't loop forever waiting for
    Upstart to initialise. Removed "--debug" as this confuses the log output.
  - test_show_config(): Placed tests for expected number of lines of
    output *after* checking expected line values. This ensures that if
    problems are encountered (for example D-Bus issues), the person
    viewing the log has a hope of working out what went wrong :-)
  - test_check_config(): As test_show_config().
  - dbus_configured(): New function that performs a highly rudimentary
    check to see if D-Bus appears to be configured for the environment
    the tests run in.
  - main(): Improved test for running tests within a chroot: we do now
    run all tests assuming that D-Bus is found to be working within a
    chroot environment.
  - in_chroot(): New function to detect if in chroot environment.
  - main(): Call in_chroot() to work around bug lp:728988.

1268. By James Hunt

* util/initctl.c: display_check_errors(): use _() to allow translations.

1267. By James Hunt

* Added short option '-i' for "--ignore-events":

1266. By James Hunt

* util/initctl.h: Doc changes.

1265. By James Hunt

* contrib/utils/initctl2dot.py: Removed stray debug line.

1264. By James Hunt

* contrib/bash_completion/upstart: Updated for new initctl show-config
  command.
* contrib/utils/init-checkconf.sh: Added '-i' option to specify path to
  init daemon (for test builds). Ensure conf file exists.
* contrib/utils/initctl2dot.py: Updated for changed initctl show-config output.
* util/Makefile.am: Added missing initctl.h to initctl_SOURCES.
* util/initctl.c:
  - New functions to handle new check-config command.
    - check_config_action: Handler for new check-config command-line
      option.
    - ignored_events_setter(): handler for '--ignore-events' command-line
      option for check-config command.
    - eval_expr_tree(): Evaluate expression tree.
    - check_condition(): High-level function to handle checking start
      on/stop on conditions.
    - tree_filter(): Used for filtering expression tree nodes.
    - display_check_errors():
  - Removed ENSURE_ROOT() macros since this would conflict with user
    sessions.
* util/initctl.h:
  - New macros:
    - GET_JOB_NAME(): Determine if specified token refers to a job and
      return it if true.
    - IS_INIT_EVEN(): Determine if specified event is an internally
      generated event.
    - MAKE_EXPR_NODE(): Create an ExprNode object.
    - MAKE_JOB_CONDITION(): Create a JobCondition object.
  - New types required for check-config command:
    - CheckConfigData
    - JobCondition
    - ConditionHandlerData
    - ExprNode
* util/man/initctl.8:
  - Updated for show-config section showing new "--enumerate" format output.
  - Added section for check-config command.
* util/tests/test_initctl.c:
  - START_UPSTART(): Improved test to ensure Upstart has actually
    started.
  - STOP_UPSTART(): Improved test to ensure Upstart has actually
    stopped.
  - test_show_config(): Updated for new show-config --enumerate syntax.
  - test_check_config(): New function to test check-config command.

1263. By James Hunt

* contrib/utils/init-check.sh renamed to init-checkconf.sh.
* contrib/utils/initct2dot.py:
  - updated to call "initctl show-config"
  - Added options to allow specification of all colo(u)rs.
  - Added a '--restrict-to-jobs' option to allow a sub-set of all jobs
    to be viewed (along with their associated jobs and events).
  - Code refactored.
* init/main.c:
  - Added new options '--startup-event' and '--no-startup-event'.
* init/man/init.8: Updated for "initctl show-status".
* util/initctl.c:
  - Reworked code so that rather than utilizing existing 'list' and
    'status' commands, we now have a new command: 'show-status'. This is
    more logical since it is obvious what it is doing and it also
    doesn't pollute the dynamic data returned by 'status' and 'list' with
    purely static info.
  - upstart_open(): Improved dbus_bus_type usage (now only default to
    system bus).
  - show_config_action(): New function to handle 'show-config' command.
  - job_class_parse_events(): Fixed uninitialized variable issue and
    removed IS_JOB() macro in favour of the ultimately reliable
    IS_JOB_EVENT() macro.
* util/initctl.h: Only enable stack debugging if DEBUG_STACK defined.
  This ensures that "make check" doesn't fail due to stack DEBUG output.
* util/man/initctl.8: Updated for new 'show-config' command.
* util/tests/test_initctl.c:
  - Improved START_UPSTART() and STOP_UPSTART() macros.
  - Renamed test_status_and_list_action_detail() to
    test_show_config_action() to reflect the new command under test.
  - test_show_config_action(): Removed all (now-redundant) tests calling
    "initctl status" and "initctl list" and updated for new 'show-config'
    command.

1262. By James Hunt

* contrib/bash_completion/upstart: Update for job visualisation.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp://staging/upstart
This branch contains Public information 
Everyone can see this information.

Subscribers