[Merge] lp:~jamesodhunt/upstart/serialise-remaining-objects into lp:upstart
James Hunt
james.hunt at canonical.com
Thu May 9 13:54:26 UTC 2013
James Hunt has proposed merging lp:~jamesodhunt/upstart/serialise-remaining-objects into lp:upstart.
Requested reviews:
Upstart Reviewers (upstart-reviewers)
For more details, see:
https://code.launchpad.net/~jamesodhunt/upstart/serialise-remaining-objects/+merge/163151
This monster MP includes fixes for two bugs:
= bug 1124384 =
This bug has seemingly existed for a long time and only came to light when users of cloud-init attempted to overcome the inotify limitations of overlayfs (see bug 882147) by invoking 'initctl reload-configuration' in early boot to make Upstart consider newly-created jobs.
The issue has nothing to do with early boot though - potentially, whenever 'initctl reload-configuration' gets called and events are "in flight", the bug could be seen. However, since most filesystems have sane inotify semantics (thus negating the need for ever calling 'initctl reload-configuration), it is unsurprising this problem has only come to light recently.
The fix involved deferring the destruction of the original ConfFile object coupled with code to allow the newly-created (post-reload) JobClass to reference any relevant events before the original ConfFile and JobClass are destroyed. This allows the event reference count to stay positive across a reload.
= bug 1103881 =
This is an issue with stateful re-exec: the original approach was to serialise the start/stop on conditions as a logically identical representation of the original string from the .conf file. However, this meant that required EventOperator data was not available on deserialisation. This resulted in the possibility that events would be destroyed too early since their reference counts could drop to zero as the EventOperator references to those evens would not be re-instated post-re-exec.
The new approach is to:
1) Serialise the start/stop on conditions as full EventOperator trees.
2) Serialise all objects, regardless of whether they are currently being referenced by running jobs.
New objects being serialised are:
- ConfSource
- ConfFile
- EventOperator
Since all objects are now being serialised, chroot sessions can now be supported. These changes would also support upstart-in-initramfs (although further work is required for that - see init/state.h).
--
https://code.launchpad.net/~jamesodhunt/upstart/serialise-remaining-objects/+merge/163151
Your team Upstart Reviewers is requested to review the proposed merge of lp:~jamesodhunt/upstart/serialise-remaining-objects into lp:upstart.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 361756 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20130509/09295a59/attachment-0001.diff>
More information about the upstart-devel
mailing list