Jonathan Maw [Thu, 9 Aug 2012 13:13:26 +0000 (14:13 +0100)]
Rename all com.contiautomotive to org.genivi
Jonathan Maw [Thu, 9 Aug 2012 12:26:45 +0000 (13:26 +0100)]
Expand description of the NodeStartupControllerService
Expands the description to explain what it does when it receives the
"handle-begin-lucregistration", "handle-register-with-luc" and
"handle-finish-lucregistration" signals.
Jonathan Maw [Thu, 9 Aug 2012 10:14:16 +0000 (11:14 +0100)]
Expand description of the LAHandlerService
Includes a step-by-step description of what happens when it receives a
method call.
Francisco Redondo Marchena [Thu, 9 Aug 2012 15:34:11 +0000 (16:34 +0100)]
Expand description for TargetStartupMonitor
Francisco Redondo Marchena [Thu, 9 Aug 2012 10:31:02 +0000 (11:31 +0100)]
Expand description of the LUCStarter
Includes a step-by-step description of how to start the Last User
Context.
Jonathan Maw [Wed, 8 Aug 2012 16:13:53 +0000 (17:13 +0100)]
Expand documentation for JobManager
Francisco Redondo Marchena [Thu, 9 Aug 2012 14:40:47 +0000 (15:40 +0100)]
Remove the list of units and create D-Bus proxy only for wanted targets
Remove the list of units which is not longer used.
When the TargetStarterMonitor receives a "job-removed" signal it
creates a D-Bus proxy to monitor the unit and check if the state
changes to "active". If it does the TargetStartupMonitor sets the node
state.
The TargetStarterMonitor is only interested in monitoring
"focussed.target", "unfocussed.target" and "lazy.target" units. To
avoid creating the D-Bus proxy for unneeded units, it should check in
target_startup_monitor_job_removed if the unit is a unit which has to be
monitored.
Jonathan Maw [Wed, 8 Aug 2012 16:42:03 +0000 (17:42 +0100)]
Add callbacks that log when bus names are acquired or lost
Callbacks added to both the Node Startup Controller and the NSM Dummy
Francisco Redondo Marchena [Wed, 8 Aug 2012 16:34:23 +0000 (17:34 +0100)]
Update log messages in the TargetStartupMonitor test case docs
Replace the old DLT messages in the TargetStartupMonitor test case
documetnation with the ones we currently use.
Jonathan Maw [Wed, 8 Aug 2012 14:59:51 +0000 (15:59 +0100)]
Edit docs for NodeStartupControllerApplication to be more elaborate
Rewrites the description of the NodeStartupControllerApplication to
be more explicit in what it contains and what it does.
Jonathan Maw [Wed, 8 Aug 2012 14:53:08 +0000 (15:53 +0100)]
Fix minor bugs in NodeStartupControllerApplication's SIGINT handler
The SIGINT handler did not cancel the LUCStarter, it does now.
The SIGINT handler made the application quit, but the asynchronous
call to deregister its shutdown consumer from the Node State Manager
does that when it is finished.
Francisco Redondo Marchena [Wed, 8 Aug 2012 12:54:53 +0000 (13:54 +0100)]
Fix segmentation faults and remove an unused variable
Fix a segmentation fault in target_startup_monitor_finalize caused by
freeing the data of a list item instead of the actual unit list we want
to free.
Fix another possible segmentation fault in
la_handler_service_handle_consumer_lifecycle_request_finish caused by
logging a message using the wrong GError.
Remove an unused variable in la_handler_service_handle_register.
Francisco Redondo Marchena [Wed, 8 Aug 2012 07:54:01 +0000 (08:54 +0100)]
Add documentation for the GLib extension functions
Jonathan Maw [Tue, 7 Aug 2012 16:09:06 +0000 (17:09 +0100)]
Document the NodeStartupControllerService class
Jannis Pohlmann [Wed, 8 Aug 2012 10:47:42 +0000 (11:47 +0100)]
In README, point to building.xml for build deps and instructions
Francisco Redondo Marchena [Tue, 7 Aug 2012 10:01:02 +0000 (11:01 +0100)]
Remove empty lines in node-startup-controller-application.c
Jonathan Maw [Wed, 8 Aug 2012 09:54:39 +0000 (10:54 +0100)]
Document arguments and remove old function prototype of LAHandlerService
Previous documentation of the LAHandlerService omitted explaining
the @service arguments.
A function prototype existed in the header for the LAHandlerService and
was included in the documentation, but was never used or defined.
Francisco Redondo Marchena [Tue, 7 Aug 2012 16:10:38 +0000 (17:10 +0100)]
Document the LUCStarter class
Jonathan Maw [Tue, 7 Aug 2012 15:51:10 +0000 (16:51 +0100)]
Add documentation to the ShutdownClient class
Francisco Redondo Marchena [Tue, 7 Aug 2012 10:01:02 +0000 (11:01 +0100)]
Add documentation for the NodeStartupControllerApplication class
Jannis Pohlmann [Tue, 7 Aug 2012 14:19:14 +0000 (15:19 +0100)]
License the reference manual under Creative Commons CC0 1.0 Universal
Add a dedicated COPYING.docs file for this. The license is also
mentioned again in the reference manual itself.
Jannis Pohlmann [Tue, 7 Aug 2012 14:03:59 +0000 (15:03 +0100)]
Improve WatchdogClient documentation a bit
Jonathan Maw [Tue, 7 Aug 2012 12:24:34 +0000 (13:24 +0100)]
Add documentation for the WatchdogClient class
Jannis Pohlmann [Tue, 7 Aug 2012 13:51:46 +0000 (14:51 +0100)]
Improve class documentation a bit
Jonathan Maw [Tue, 7 Aug 2012 12:57:50 +0000 (13:57 +0100)]
Add documentation to the TargetStartupMonitor class
Jannis Pohlmann [Tue, 7 Aug 2012 13:44:11 +0000 (14:44 +0100)]
Fix name of the LAHandlerService class in the docs and in NEWS
Jonathan Maw [Tue, 7 Aug 2012 10:28:36 +0000 (11:28 +0100)]
Add docuumentation to the la-handler-service class
Jonathan Maw [Tue, 7 Aug 2012 09:02:37 +0000 (10:02 +0100)]
Add an explanation of the JobManagerCallback
Jonathan Maw [Tue, 7 Aug 2012 08:25:13 +0000 (09:25 +0100)]
Update NEWS regarding the JobManager documentation
Jonathan Maw [Tue, 7 Aug 2012 08:23:19 +0000 (09:23 +0100)]
Add documentation for JobManager's constructor
Jonathan Maw [Mon, 6 Aug 2012 16:21:26 +0000 (17:21 +0100)]
Document purpose and start/stop methods of job manager
Jonathan Maw [Tue, 7 Aug 2012 08:36:40 +0000 (09:36 +0100)]
Fix minor alignment issue in glib-extensions.c
g_variant_string_array_has_string was partly aligned using tabs, which
only looks good when tab width is set to two spaces. Tabs have now been
replaced with spaces.
Francisco Redondo Marchena [Tue, 7 Aug 2012 10:39:39 +0000 (11:39 +0100)]
Simplify g_variant_lookup_value_with_int_key
An implementation custom-tailored towards "{ias}" dictionaries is
sufficient for us.
Jannis Pohlmann [Mon, 6 Aug 2012 15:31:44 +0000 (16:31 +0100)]
Update the NEWS file
Jonathan Maw [Mon, 6 Aug 2012 15:06:43 +0000 (16:06 +0100)]
Rewrite documentation for legacy app handler test
Removed the requirement to restart the system for each test, instead
just restart the node startup controller for each test. The downside of
this is that the dlt.log file is not reset so may become very large.
Reduced the number of DLT log messages to compare against the output.
Instead, only the most relevant lines are included for each test.
Added separate test that the Node Startup Controller registers itself.
Rewrote the descriptions for each test case to be more readable.
Numbered each test case.
Spelling and grammar fixes.
Francisco Redondo Marchena [Mon, 6 Aug 2012 15:03:59 +0000 (16:03 +0100)]
Remove the bus_name_id member from LAHandlerService
The bus_name_id member is not longer used in this class.
Jannis Pohlmann [Mon, 6 Aug 2012 15:15:09 +0000 (16:15 +0100)]
Update NEWS
Francisco Redondo Marchena [Mon, 6 Aug 2012 13:48:40 +0000 (14:48 +0100)]
Use a proper error code when unable to handle an unregister request
Send NSM_ERROR_STATUS_ERROR rather than -1 back to the caller when an
unregister request could not be handled successfully.
Jannis Pohlmann [Fri, 3 Aug 2012 16:30:00 +0000 (17:30 +0100)]
Release 0.9.1 - the first release candidate for 1.0.0
Jannis Pohlmann [Thu, 2 Aug 2012 15:05:32 +0000 (16:05 +0100)]
Update NEWS for the 0.9.1 release
Jannis Pohlmann [Mon, 6 Aug 2012 13:37:11 +0000 (14:37 +0100)]
Apply minor fixes for building the reference manual
Jannis Pohlmann [Mon, 6 Aug 2012 13:18:23 +0000 (14:18 +0100)]
Make sure to set GTKDOC_CFLAGS/GTKDOC_LIBS properly
Jannis Pohlmann [Mon, 6 Aug 2012 12:06:43 +0000 (13:06 +0100)]
Unregister all shutdown consumers when receiving SIGTERM
systemd uses SIGTERM to stop its units. We want to cleanly shut down
the NSC when receiving this signal. Part of that is to unregister all
shutdown consumers. If we don't do this, the NSM will later during its
shutdown phase call all shutdown consumers registered by the NSC. And
if the NSC was no longer running, this would cause the NSM to wait for a
timeout for every single one of these shutdown consumers. Obviously,
that is not desirable.
Francisco Redondo Marchena [Mon, 6 Aug 2012 11:51:53 +0000 (12:51 +0100)]
Add a type check to avoid a proxy to skeleton cast to fail
We use the "consumer" property of the ShutdownClient class to store a
proxy in the NSC code and a skeleton in the NSM dummy code. When
releasing the consumer in shutdown_client_finalize(), we may therefor
not cast to a ShutdownConsumerSkeleton unconditionally; otherwise
the NSM dummy will segfault when releasing ShutdownClient objects.
Francisco Redondo Marchena [Fri, 3 Aug 2012 16:10:58 +0000 (17:10 +0100)]
Fix Test legacy app handling purpose, error in logs and commands
Fix in Test legacy app handling documentation the purpose, some
error logs and some commands.
Fix duplicate will in about.xml
Jannis Pohlmann [Fri, 3 Aug 2012 14:55:46 +0000 (15:55 +0100)]
Fix a markup error in building.xml
Jannis Pohlmann [Fri, 3 Aug 2012 14:49:44 +0000 (15:49 +0100)]
Document the --enable-gtk-doc configure option in the manual
Jonathan Maw [Fri, 3 Aug 2012 14:42:04 +0000 (15:42 +0100)]
Use passive language in test-test-environment-setup.xml
Changes the single instance of "we" in this file.
Minor grammatical fixes.
Jonathan Maw [Fri, 3 Aug 2012 14:15:14 +0000 (15:15 +0100)]
Grammatical fix to test-nsm-dummy.xml
It now uses passive language throughout.
Other minor grammatical fixes
Jannis Pohlmann [Fri, 3 Aug 2012 14:24:53 +0000 (15:24 +0100)]
Make the description of the NSM dummy more clear to unfamiliar readers
Francisco Redondo Marchena [Fri, 3 Aug 2012 13:42:59 +0000 (14:42 +0100)]
Fix the link to test-luc-finish-only
Jannis Pohlmann [Fri, 3 Aug 2012 14:13:45 +0000 (15:13 +0100)]
Revert "Depend on systemd 37 to be able to build on Fedora 16"
This reverts commit
5dfb47b1b80d3aa91b8493491050b9d70c31c57b.
Jannis Pohlmann [Fri, 3 Aug 2012 14:13:02 +0000 (15:13 +0100)]
Finish documentation of build commands
Jannis Pohlmann [Fri, 3 Aug 2012 13:38:52 +0000 (14:38 +0100)]
Fix conflicting part/refentry IDs to make the building page show up
Jannis Pohlmann [Fri, 3 Aug 2012 13:33:00 +0000 (14:33 +0100)]
Add required command line utilities to build dependency docs
Jannis Pohlmann [Fri, 3 Aug 2012 13:07:35 +0000 (14:07 +0100)]
Add library dependencies for building to the docs
Jannis Pohlmann [Fri, 3 Aug 2012 13:07:12 +0000 (14:07 +0100)]
Depend on systemd 37 to be able to build on Fedora 16
Jannis Pohlmann [Fri, 3 Aug 2012 13:44:11 +0000 (14:44 +0100)]
Add parentheses in the shutdown mode rejection conditionals
Jonathan Maw [Fri, 3 Aug 2012 13:31:57 +0000 (14:31 +0100)]
Make shutdown mode registration similar in NSC and helper binary
The shutdown mode checker in the Node Startup Controller now uses the
same logging message as the legacy app handler helper binary.
The shutdown mode checker in the helper binary now uses the condition
statement from the Node Startup Controller
Jonathan Maw [Fri, 3 Aug 2012 13:09:06 +0000 (14:09 +0100)]
Make legacy app handler refuse invalid shutdown modes
Added code to the register signal handler to refuse any register signal
which is not a combination of NSM_SHUTDOWN_TYPE_NORMAL and
NSM_SHUTDOWN_TYPE_FAST and log an error.
Francisco Redondo Marchena [Fri, 3 Aug 2012 13:20:15 +0000 (14:20 +0100)]
Fix the title of the Test legacy application handler.
Replace the previous title by "Tests for legazy application handling".
Fix some paragraphs.
Jonathan Maw [Fri, 3 Aug 2012 12:20:59 +0000 (13:20 +0100)]
Better test case titles and always set the node state in TSM tests
Test titles are made more descriptive by including the name of the node
state which is being set.
A link is included to the enum which defines the NSMNodeState.
Tests are changed to always set the node state. This is done by
starting the unit twice in most cases. In addition, the less-important
lines in the DLT log output are no longer specified.
Capitalization in titles has been cleaned up somewhat.
Francisco Redondo Marchena [Fri, 3 Aug 2012 11:30:42 +0000 (12:30 +0100)]
Add the documentation for legacy app handling tests
Add the documentation for legacy app handling tests.
The following tests are provided:
1. Register a normal and a fast shutdown consumer.
- Check that node-startup-controller.service registers itself
as a shutdown consumer.
- Check that the registration for the shutdown consumer are ok.
- Check that in the process of shutting down the fast consumers
shutting down first and the normal consumers second.
- Check that the shutdown consumers are unregister as a shutdown
consumers when they have been shutting down.
- Check that node-startup-controller.service unregisters itself
as a shutdown consumer when it has been shutting down.
2. Register two normal shutdown consumers
- Check that in the process of shutting down the consumers are
shutting down in reverse order of registration.
3. Register a shutdown consumer twice within different modes and timeouts
- Check that the re-registration modify the final mode to a combination
of both modes (normal and fast) and the timeout has been set to the
last registration value of timeout.
- Check that in the process of shutting down the consumer is shutting down
for the both modes.
4. Register a shutdown consumer with invalid arguments
- Check that register a consumer without unit name fails.
- Check that register a consumer within mode 0 fails
- Check that register a consumer with a negative timeout fails.
Francisco Redondo Marchena [Fri, 3 Aug 2012 09:27:27 +0000 (10:27 +0100)]
Document that timeout is non-mandatory parameter and its default value
Modify in the documentation for legacy app handler that timeout is a
non-mandatory legacy app handler argument and its default value is
1000 milliseconds.
Jannis Pohlmann [Fri, 3 Aug 2012 11:55:51 +0000 (12:55 +0100)]
Add NSM dummy documentation page
Jonathan Maw [Fri, 3 Aug 2012 10:33:58 +0000 (11:33 +0100)]
Restructure and number the Target Startup Monitoring tests
Tests are restructured in the same way as the previous commit
Jonathan Maw [Fri, 3 Aug 2012 09:57:33 +0000 (10:57 +0100)]
Number and restructure luc management test cases
Test cases are restructured into:
* Description
* Test Commands
* Desired behaviour and Output
Jannis Pohlmann [Fri, 3 Aug 2012 10:57:10 +0000 (11:57 +0100)]
Add missing XML files to the reference manual Makefile.am
Jannis Pohlmann [Fri, 3 Aug 2012 09:56:03 +0000 (10:56 +0100)]
Work on documentation of functional scope and interfaces
Also fix a mistyped systemd command.
Jannis Pohlmann [Thu, 2 Aug 2012 17:42:22 +0000 (18:42 +0100)]
Rework reference manual a bit, start reworking test case layout
Jonathan Maw [Thu, 2 Aug 2012 14:20:51 +0000 (15:20 +0100)]
Split test scenarios into separate pages, add legacy app skeleton
Each test scenario (i.e. luc, legacy app, tsm) has been split into a
separate file.
Setup steps which have to be performed for every scenario are moved into
test-general-setup.xml
Cross-references are used so that the test overview links to each test
case, and the "Testing" page links to the general setup and also each
test.
test-example has been removed because it is no longer necessary.
Jonathan Maw [Thu, 2 Aug 2012 08:44:33 +0000 (09:44 +0100)]
Add test scenarios for the Last User Context handling
The following test scenarios are added to the documentation:
* Registration of a simple dictionary
* Registration does not happen on an isolated RegisterWithLUC() call
* An isolated FinishLUCRegistration() call will not change the LUC
* Registration of a complex dictionary
* Registration can happen with a series of RegisterWithLUC() calls
* Repeated registration of an app changes the order in the LUC
Jonathan Maw [Wed, 1 Aug 2012 13:08:41 +0000 (14:08 +0100)]
Specify difference between NSM and NSM dummy in docmentation
Explicitly states the difference between the Node State Manager Dummy
and the real Node State Manager, i.e.
* The NSM dummy toggles between successfully setting the node state
and failing to set the node state.
* The NSM dummy toggles between the LUC being required, and the LUC
not being required.
* The NSM dummy will shut down its fast shutdown clients, then its
normal shutdown clients, on receiving the SIGHUP signal
Jonathan Maw [Wed, 1 Aug 2012 12:30:59 +0000 (13:30 +0100)]
Add TSM test and improve layout of test document
The improvements to the layout of the test document are that the
individual tests will now show up on the table of contents.
The Target Startup Monitor (TSM) tests check that the following cases
attempt to change the node state:
* The Node Startup Controller starting
* focussed.target starting
* unfocussed.target starting
* lazy.target starting
The following case should not attempt to change the node state:
* focussed.target stopping
Jonathan Maw [Wed, 1 Aug 2012 09:22:54 +0000 (10:22 +0100)]
Add testing skeleton
Lays out the structure of the test document XML
Jannis Pohlmann [Thu, 2 Aug 2012 14:15:55 +0000 (15:15 +0100)]
Change required version of systemd from 37 to 183
Jannis Pohlmann [Thu, 2 Aug 2012 14:14:03 +0000 (15:14 +0100)]
Fix build instructions to include creating the m4 directory
Jonathan Maw [Thu, 2 Aug 2012 10:10:49 +0000 (11:10 +0100)]
Unregister exported D-Bus objects on finalization
Adds unregistration to the following services:
* legacy app handler
* shutdown client
* node startup controller
* nsm dummy lifecycle control
* nsm dummy consumer
Jannis Pohlmann [Wed, 1 Aug 2012 16:31:50 +0000 (17:31 +0100)]
Rework log messages a bit to make them more readable
Jannis Pohlmann [Wed, 1 Aug 2012 15:47:50 +0000 (16:47 +0100)]
Use DLT_LOG_INFO rather than DLT_LOG_DEBUG for everything
We can't get DLT to log our debug messages, setting LoggingLevel to 7
(LOG_DEBUG) in /etc/dlt.conf does not work as expected. So for now we'll
have to resort to logging all debug messages as info messages.
Jannis Pohlmann [Wed, 1 Aug 2012 15:04:02 +0000 (16:04 +0100)]
Adjust DLT log levels (info -> debug, some warnings, some errors)
Jannis Pohlmann [Wed, 1 Aug 2012 14:48:35 +0000 (15:48 +0100)]
Exclusively use DLT facilities to build log strings
We used to build the log strings using g_strdup_printf() but this
results in a certain amount of overhead and extra code.
Jannis Pohlmann [Wed, 1 Aug 2012 12:48:09 +0000 (13:48 +0100)]
Fix the name used for the LUCStarter::node-startup-controller property
Jannis Pohlmann [Wed, 1 Aug 2012 11:37:08 +0000 (12:37 +0100)]
Replace g_debug/g_warning calls with DLT logging
Jannis Pohlmann [Wed, 1 Aug 2012 11:26:29 +0000 (12:26 +0100)]
Unregister the NSM dummy DLT connection at exit
Jannis Pohlmann [Tue, 31 Jul 2012 18:17:18 +0000 (19:17 +0100)]
Fix small issues in Makefiles to make "make distcheck" happy
Jannis Pohlmann [Tue, 31 Jul 2012 18:06:03 +0000 (19:06 +0100)]
Rename all remaining bits and pieces
Jannis Pohlmann [Tue, 31 Jul 2012 17:41:33 +0000 (18:41 +0100)]
Rename service files and boot-manager binary
Jannis Pohlmann [Tue, 31 Jul 2012 17:36:44 +0000 (18:36 +0100)]
Rename BMGR DLT app ID to NSC, rename MGR context to CTRL
Jannis Pohlmann [Tue, 31 Jul 2012 17:32:30 +0000 (18:32 +0100)]
Rename BootManagerApplication to NodeStartupControllerApplication
Jannis Pohlmann [Tue, 31 Jul 2012 17:15:06 +0000 (18:15 +0100)]
Rename boot manager D-Bus interface and BootManagerService class
Jannis Pohlmann [Tue, 31 Jul 2012 16:45:10 +0000 (17:45 +0100)]
First step of renaming the Boot Manager to Node Startup Controller
This includes mostly files, directories and the package/tarball name.
The classes and D-Bus interfaces will be renamed in the next step.
Francisco Redondo Marchena [Tue, 31 Jul 2012 15:52:06 +0000 (16:52 +0100)]
Query the "active-state" property of units in the "job-removed" handler
Our previous attempt to fix the TargetStartupMonitor failed because when
a target is stopped, systemd drops the unit from the system bus and the
proxies we created in TargetStartupMonitor were no longer associated
with these unit objects that previously existed on the bus. When such a
target is started again, the proxy will no longer receive property
change signals from systemd.
This commit tries to implement the TargetStartupMonitor in yet another
way, which is to listen to systemd's "job-removed" signal again. In
response to receiving "job-removed" signals, we now create a SystemdUnit
for the affected unit and query that for its current "active-state"
value. Perhaps this will work.
Francisco Redondo Marchena [Tue, 31 Jul 2012 15:17:07 +0000 (16:17 +0100)]
Avoid a segmentation fault by fixing a GVariant format string
Francisco Redondo Marchena [Tue, 31 Jul 2012 14:55:51 +0000 (15:55 +0100)]
Retrieve invalidated properties before emitting "g-properties-changed"
It seems like the "active-state" property might be part of the
invalidated properties, not the changed ones. By passing
G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES to the proxy constructor
we force GDBusProxy to retrieve the new "active-state" value before
calling "g-properties-changed".
Hopefully this will fix TargetStartupMonitor for real.
Francisco Redondo Marchena [Tue, 31 Jul 2012 14:34:23 +0000 (15:34 +0100)]
Try the units' "g-properties-changed" signal to monitor the active state
For some reason the cached "active-state" property of the SystemdUnit
objects was NULL even when the "notify::active-state" signal had been
emitted.
Francisco Redondo Marchena [Tue, 31 Jul 2012 13:55:35 +0000 (14:55 +0100)]
Remove the assertion for an unused parameter
Apparently the callback for g_dbus_proxy_new() does not receive a
GDBusConnection as the first parameter, so this assertion fails.
However, since we don't need the parameter, we can just drop the
assertion.
Jannis Pohlmann [Tue, 31 Jul 2012 15:12:24 +0000 (16:12 +0100)]
Rework small bits of the legacy-app-handler documentation
Jonathan Maw [Tue, 31 Jul 2012 14:57:40 +0000 (15:57 +0100)]
Document the legacy app handler API
Jannis Pohlmann [Tue, 31 Jul 2012 12:20:06 +0000 (13:20 +0100)]
Rewrite TargetStartupMonitor to monitor ActiveState properties of units