/srv/irclogs.ubuntu.com/2016/09/02/#cloud-init.txt

=== rangerpbzzzz is now known as rangerpb
rharpersmoser: http://paste.ubuntu.com/23124387/ -- looking at the event reporter output;  with the context manager, we get a start/finish for each manager;  however, for the stage runners, we don't seem to get the 'start' event;  in the paste, notice we have an extra finish, which is the other half of the 'start' of the module .. any idea why we don't get that first start event ?15:36
smoserhow did you give it the config you wanted ?15:38
smoserrharper, ^ ?15:40
smoseri think maybe it didn't know of the config until after it started/15:40
rharperthis is defaults15:41
rharperI'm parsing cloud-init.log output to recreate the records15:41
rharperif you look at cloudinit/cmds/main.py, it's the args.reporter which sets up the event stack with the name.15:41
rharperit does seem like the first event isn't "published" to the logger;  so maybe it's just getting chewed  somewhere in that util.log_time15:52
smoserrharper, try turning of rsyslog16:33
smoserin /etc/cloud/cloud.cfg.d/05_logging.cfg16:33
smosercomment out - [ *log_base, *log_syslog ]16:34
rharperok16:35
rharperI'll give that a shot16:35
=== rangerpb is now known as rangerpbzzzz
rharpersmoser: that didn't help; but I'll dig in and see what's up in main.py w.r.t the __enter__17:34
rharper2016-09-02 17:48:13,667 - util.py[DEBUG]: Cloud-init v. 0.7.7 running 'init-local' at Fri, 02 Sep 2016 17:48:13 +0000. Up 1.0 seconds.17:51
rharper2016-09-02 17:48:13,669 - util.py[DEBUG]: Writing to /var/log/cloud-init.log - ab: [420] 0 bytes17:51
rharpersmoser: I think that clobbers the log file right after we've published the start event17:51
rharperso we miss the start event for each stage invocation, if that's true17:52
rharperlet me remove that and see what it looks like17:52
smoserwell, it does say 'ab'17:59
smoserbut i guess quitei possibly athe first message was not flushed, and the filehandle probably still open17:59
rharperyeah;  still chasing it; it's just getting lost in logger;18:05
rharperI can see it getting published via the LogHandler and it's configured18:05
rharperwe don't have this issue with curtin, so something is different18:05
rharpersmoser: I don't understand how it can be fixed, but basically, since we don't "reconfigure reporting" until after the Init stage is created (and we call apply_reporting_config() with the initial cloud config ) then we lose the first set of reporting events (logging gets them but they're not ever emitted to /var/log/cloud-init.log)19:30
rharperit isn't terrible since not a log happens, but in terms of having matched pairs of events (start/finish); there's no point to starting the reporting event stack until after Init.stage2  is complete19:31
smoserrharper, yeah. i gues reconfigure_reporting could re-send the current one.19:34
rharpersmoser: I don't know how we'd be able to replay previous events;19:56

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!