Ian Main
2009-May-29 22:14 UTC
[Ovirt-devel] [PATCH server] Also print reconnect message in log.
It seems people were getting confused by the message that taskomatic was disconnected and not logging a reconnect message. This patch makes it log on reconnect as well. Signed-off-by: Ian Main <imain at redhat.com> --- src/task-omatic/taskomatic.rb | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb index 71432d2..1b4d83b 100755 --- a/src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -842,14 +842,19 @@ class TaskOmatic end def mainloop() + was_disconnected = false loop do if not @broker.connected? - @logger.error("Cannot implement tasks, not connected to broker. Sleeping.") + @logger.info("Cannot implement tasks, not connected to broker. Sleeping.") sleep(@sleeptime * 3) + was_disconnected = true next end + @logger.info("Reconnected, resuming task checking..") if was_disconnected + was_disconnected = false + tasks = Array.new begin tasks = Task.find(:all, :conditions => -- 1.6.0.6
Jason Guiditta
2009-May-29 22:18 UTC
[Ovirt-devel] [PATCH server] Also print reconnect message in log.
Good timing, I'll test this monday On Fri, May 29, 2009 at 6:14 PM, Ian Main <imain at redhat.com> wrote:> It seems people were getting confused by the message that taskomatic was > disconnected and not logging a reconnect message. This patch makes it > log on reconnect as well. > > Signed-off-by: Ian Main <imain at redhat.com> > --- > src/task-omatic/taskomatic.rb | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb > index 71432d2..1b4d83b 100755 > --- a/src/task-omatic/taskomatic.rb > +++ b/src/task-omatic/taskomatic.rb > @@ -842,14 +842,19 @@ class TaskOmatic > end > > def mainloop() > + was_disconnected = false > loop do > > if not @broker.connected? > - @logger.error("Cannot implement tasks, not connected to broker. > Sleeping.") > + @logger.info("Cannot implement tasks, not connected to broker. > Sleeping.") > sleep(@sleeptime * 3) > + was_disconnected = true > next > end > > + @logger.info("Reconnected, resuming task checking..") if > was_disconnected > + was_disconnected = false > + > tasks = Array.new > begin > tasks = Task.find(:all, :conditions => > -- > 1.6.0.6 > > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-devel >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090529/00f6772e/attachment.htm>
Maybe Matching Threads
- [PATCH server] Make taskomatic not do tasks if not connected to qpidd.
- [PATCH] Use volume key instead of path to identify volume.
- [PATCH server] Don't set VM state to shut down in task.
- [PATCH] Set up ovirt-agent so it starts as a daemon
- [PATCH server] Update daemons to use new QMF.