Hello community,
here is the log from the commit of package icecream
checked in at Thu Jul 13 11:15:34 CEST 2006.
--------
--- KDE/icecream/icecream.changes 2006-07-08 21:22:35.000000000 +0200
+++ icecream/icecream.changes 2006-07-12 09:40:57.000000000 +0200
@@ -2 +2 @@
-Sat Jul 8 21:22:35 CEST 2006 - mls@suse.de
+Wed Jul 12 09:40:49 CEST 2006 - coolo@suse.de
@@ -4 +4,4 @@
-- converted neededforbuild to BuildRequires
+- 0.7.5 (r561480):
+ - Don't block while looking for a scheduler over broadcast search.
+ - Fix logrotate
+ - immediately kick broken daemon connections
Old:
----
icecc-0.7.4.tar.bz2
New:
----
icecc-0.7.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ icecream.spec ++++++
--- /var/tmp/diff_new_pack.BkN27m/_old 2006-07-13 11:14:37.000000000 +0200
+++ /var/tmp/diff_new_pack.BkN27m/_new 2006-07-13 11:14:37.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package icecream (Version 0.7.4)
+# spec file for package icecream (Version 0.7.5)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -22,7 +22,7 @@
%endif
Prereq: /usr/sbin/useradd /usr/sbin/groupadd
Requires: gcc-c++
-Version: 0.7.4
+Version: 0.7.5
Release: 1
Source0: ftp://ftp.suse.com/pub/projects/icecream/icecc-%{version}.tar.bz2
Source1: %name-manpages.tar.bz2
@@ -139,8 +139,11 @@
%_libdir/pkgconfig/icecc.pc
%changelog -n icecream
-* Sat Jul 08 2006 - mls@suse.de
-- converted neededforbuild to BuildRequires
+* Wed Jul 12 2006 - coolo@suse.de
+- 0.7.5 (r561480):
+- Don't block while looking for a scheduler over broadcast search.
+- Fix logrotate
+- immediately kick broken daemon connections
* Sat Jul 08 2006 - coolo@suse.de
0.7.4:
- Add -fpreprocessed argument
++++++ icecc-0.7.4.tar.bz2 -> icecc-0.7.5.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/NEWS new/icecream/NEWS
--- old/icecream/NEWS 2006-07-08 18:27:08.000000000 +0200
+++ new/icecream/NEWS 2006-07-12 09:07:53.000000000 +0200
@@ -1,3 +1,8 @@
+0.7.5 (r561480):
+ - Don't block while looking for a scheduler over broadcast search.
+ - Fix logrotate
+ - immediately kick broken daemon connections
+
0.7.4 (r559927):
- Add -fpreprocessed argument
- Fix daemons getting stuck after a while with 100% CPU
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/configure.in new/icecream/configure.in
--- old/icecream/configure.in 2006-07-08 20:01:05.000000000 +0200
+++ new/icecream/configure.in 2006-07-12 09:07:53.000000000 +0200
@@ -4,7 +4,7 @@
AC_INIT(client/main.cpp)
-AM_INIT_AUTOMAKE(icecc, "0.7.4")
+AM_INIT_AUTOMAKE(icecc, "0.7.5")
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/daemon/main.cpp new/icecream/daemon/main.cpp
--- old/icecream/daemon/main.cpp 2006-07-08 18:12:16.000000000 +0200
+++ new/icecream/daemon/main.cpp 2006-07-11 11:31:53.000000000 +0200
@@ -313,7 +313,6 @@
signal(SIGTERM, &dcc_daemon_terminate);
signal(SIGINT, &dcc_daemon_terminate);
- signal(SIGHUP, &dcc_daemon_terminate);
signal(SIGALRM, &dcc_daemon_terminate);
}
@@ -458,7 +457,7 @@
int current_load;
int num_cpus;
MsgChannel *scheduler;
- time_t last_connect;
+ DiscoverSched *discover;
string netname;
string schedname;
@@ -474,7 +473,7 @@
current_load = - 1000;
num_cpus = 0;
scheduler = 0;
- last_connect = 0;
+ discover = 0;
}
void reannounce_environments(const string &envbasedir, const string &nodename);
@@ -527,6 +526,8 @@
delete scheduler;
scheduler = 0;
+ delete discover;
+ discover = 0;
clear_children();
}
@@ -1100,6 +1101,13 @@
FD_SET( scheduler->fd, &listen_set );
if ( max_fd < scheduler->fd )
max_fd = scheduler->fd;
+ } else if ( discover && discover->get_fd() >= 0) {
+ /* We don't explicitely check for discover->get_fd() being in
+ the selected set below. If it's set, we simply will return
+ and our call will make sure we try to get the scheduler. */
+ FD_SET( discover->get_fd(), &listen_set);
+ if ( max_fd < discover->get_fd() )
+ max_fd = discover->get_fd();
}
tv.tv_sec = MIN_SCHEDULER_PING;
@@ -1189,15 +1197,21 @@
bool Daemon::reconnect()
{
- if ( scheduler || time( 0 ) < last_connect )
+ if ( scheduler )
return true;
trace() << "reconn " << dump_internals() << endl;
- scheduler = connect_scheduler (netname, 2000, schedname);
+ if (!discover
+ || discover->timed_out())
+ {
+ delete discover;
+ discover = new DiscoverSched (netname, 3000, schedname);
+ }
+
+ scheduler = discover->try_get_scheduler ();
if ( !scheduler ) {
- log_warning() << "no scheduler found. Sleeping.\n";
- last_connect = time( 0 );
+ log_warning() << "scheduler not yet found.\n";
return false;
}
sockaddr_in name;
@@ -1232,7 +1246,6 @@
close_scheduler();
}
}
-
}
int main( int argc, char ** argv )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/debian/changelog new/icecream/debian/changelog
--- old/icecream/debian/changelog 2006-07-04 00:05:08.000000000 +0200
+++ new/icecream/debian/changelog 2006-07-09 10:03:41.000000000 +0200
@@ -1,10 +1,18 @@
+icecc (0.7.4-1) unstable; urgency=low
+
+ * New upstream version.
+
+ * Patches are applied upstream (rename from icecream to icecc).
+
+ -- Andre Woebbeking Sun, 09 Jul 2006 10:01:12 +0200
+
icecc (0.7.3-4) unstable; urgency=low
* Also create a group icecc for the user icecc.
* Build with -O2.
- -- Andre Woebbeking Mon, 03 Jun 2006 23:50:12 +0200
+ -- Andre Woebbeking Mon, 03 Jul 2006 23:50:12 +0200
icecc (0.7.3-3) unstable; urgency=low
@@ -12,13 +20,13 @@
* Simplified debian files.
- -- Andre Woebbeking Sun, 02 Jun 2006 19:00:51 +0200
+ -- Andre Woebbeking Sun, 02 Jul 2006 19:00:51 +0200
icecc (0.7.3-2) unstable; urgency=low
* Made icecc --build-native work.
- -- Andre Woebbeking Sat, 01 Jun 2006 21:30:51 +0200
+ -- Andre Woebbeking Sat, 01 Jul 2006 21:30:51 +0200
icecc (0.7.3-1) unstable; urgency=low
@@ -26,7 +34,7 @@
* /usr/bin/create-env is now /usr/lib/icecc/icecc-create-env
- -- Andre Woebbeking Sat, 01 Jun 2006 20:36:15 +0200
+ -- Andre Woebbeking Sat, 01 Jul 2006 20:36:15 +0200
icecc (0.6.1-1) unstable; urgency=low
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/debian/patches/configure-package-name.diff new/icecream/debian/patches/configure-package-name.diff
--- old/icecream/debian/patches/configure-package-name.diff 2006-07-01 21:32:31.000000000 +0200
+++ new/icecream/debian/patches/configure-package-name.diff 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-Index: icecream/configure.in
-===================================================================
---- icecream/configure.in (revision 556860)
-+++ icecream/configure.in (working copy)
-@@ -4,7 +4,7 @@
-
- AC_INIT(client/main.cpp)
-
--AM_INIT_AUTOMAKE(icecream, "0.7.3a")
-+AM_INIT_AUTOMAKE(icecc, "0.7.3a")
- AM_CONFIG_HEADER(config.h)
- AC_CANONICAL_HOST
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/debian/patches/library-name.diff new/icecream/debian/patches/library-name.diff
--- old/icecream/debian/patches/library-name.diff 2006-07-08 12:38:14.000000000 +0200
+++ new/icecream/debian/patches/library-name.diff 1970-01-01 01:00:00.000000000 +0100
@@ -1,53 +0,0 @@
-Index: icecream/client/Makefile.am
-===================================================================
---- icecream/client/Makefile.am (revision 556877)
-+++ icecream/client/Makefile.am (working copy)
-@@ -3,7 +3,7 @@
- bin_PROGRAMS = icecc
- pkglib_SCRIPTS = icecc-create-env
- icecc_SOURCES = main.cpp arg.cpp cpp.cpp local.cpp remote.cpp util.cpp md5.c safeguard.cpp
--icecc_LDADD = ../services/libicecream.la
-+icecc_LDADD = ../services/libicecc.la
-
- CLEANFILES = icecc++
-
-Index: icecream/daemon/Makefile.am
-===================================================================
---- icecream/daemon/Makefile.am (revision 556877)
-+++ icecream/daemon/Makefile.am (working copy)
-@@ -3,4 +3,4 @@
-
- sbin_PROGRAMS = iceccd
- iceccd_SOURCES = ncpus.c main.cpp serve.cpp workit.cpp environment.cpp load.cpp
--iceccd_LDADD = ../services/libicecream.la
-+iceccd_LDADD = ../services/libicecc.la
-Index: icecream/services/Makefile.am
-===================================================================
---- icecream/services/Makefile.am (revision 559754)
-+++ icecream/services/Makefile.am (working copy)
-@@ -1,18 +1,18 @@
- INCLUDES = -I$(srcdir)/../minilzo
-
--lib_LTLIBRARIES = libicecream.la
-+lib_LTLIBRARIES = libicecc.la
-
--libicecream_la_SOURCES = job.cpp comm.cpp getifaddrs.cpp logging.cpp tempfile.c
--libicecream_la_LIBADD = ../minilzo/libminilzo.la
--libicecream_la_CFLAGS = -fPIC -DPIC
--libicecream_la_CXXFLAGS = -fPIC -DPIC
-+libicecc_la_SOURCES = job.cpp comm.cpp getifaddrs.cpp logging.cpp tempfile.c
-+libicecc_la_LIBADD = ../minilzo/libminilzo.la
-+libicecc_la_CFLAGS = -fPIC -DPIC
-+libicecc_la_CXXFLAGS = -fPIC -DPIC
-
- ice_HEADERS = job.h comm.h
--icedir = $(includedir)/icecream
-+icedir = $(includedir)/icecc
-
- sbin_PROGRAMS = scheduler
- scheduler_SOURCES = scheduler.cpp
--scheduler_LDADD = libicecream.la
-+scheduler_LDADD = libicecc.la
-
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = icecream.pc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/debian/patches/pkgconfig-name.diff new/icecream/debian/patches/pkgconfig-name.diff
--- old/icecream/debian/patches/pkgconfig-name.diff 2006-07-02 19:00:22.000000000 +0200
+++ new/icecream/debian/patches/pkgconfig-name.diff 1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-Index: icecream/services/icecream.pc.in
-===================================================================
---- icecream/services/icecream.pc.in (revision 556877)
-+++ icecream/services/icecream.pc.in (working copy)
-@@ -1,14 +1,14 @@
--# icecream pkg-config file
-+# icecc pkg-config file
-
- prefix=@prefix@
- exec_prefix=@exec_prefix@
- libdir=@libdir@
- includedir=@includedir@
-
--Name: icecream
--Description: icecream is a library for connecting to icecream schedulers
-+Name: icecc
-+Description: icecc is a library for connecting to icecc schedulers
- Version: @VERSION@
- Requires:
- Conflicts:
--Libs: -L${libdir} -licecream
-+Libs: -L${libdir} -licecc
- Cflags: -I${includedir}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/debian/rules new/icecream/debian/rules
--- old/icecream/debian/rules 2006-07-04 00:05:08.000000000 +0200
+++ new/icecream/debian/rules 2006-07-09 10:03:41.000000000 +0200
@@ -123,7 +123,6 @@
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
(cd $(CURDIR)/debian/tmp/usr/sbin ; mv scheduler icecc-scheduler)
- (cd $(CURDIR)/debian/tmp/usr/lib/pkgconfig ; mv icecream.pc icecc.pc)
dh_install --sourcedir=debian/tmp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/services/comm.cpp new/icecream/services/comm.cpp
--- old/icecream/services/comm.cpp 2006-07-02 14:55:54.000000000 +0200
+++ new/icecream/services/comm.cpp 2006-07-11 11:28:34.000000000 +0200
@@ -982,63 +982,65 @@
return true;
}
-MsgChannel *
-connect_scheduler (const string &_netname, int timeout, const string &schedname)
+DiscoverSched::DiscoverSched (const std::string &_netname,
+ int _timeout,
+ const std::string &_schedname)
+ : netname(_netname), schedname(_schedname), timeout(_timeout), ask_fd(-1),
+ sport(8765)
{
- const char *get = 0;
+ time0 = time (0);
if (schedname.empty())
- get = getenv( "USE_SCHEDULER" );
- else
- get = schedname.c_str();
- string hostname;
- unsigned int sport = 8765;
- char buf2[BROAD_BUFLEN];
+ {
+ const char *get = getenv( "USE_SCHEDULER" );
+ if (get)
+ schedname = get;
+ }
- string netname = _netname;
if (netname.empty())
netname = "ICECREAM";
- if (get)
- {
- hostname = get;
- netname = "";
- }
+ if (!schedname.empty())
+ netname = ""; // take whatever the machine is giving us
else
+ ask_fd = open_send_broadcast ();
+}
+
+DiscoverSched::~DiscoverSched ()
+{
+ if (ask_fd >= 0)
+ close (ask_fd);
+}
+
+bool
+DiscoverSched::timed_out ()
+{
+ return (time (0) - time0 >= (timeout / 1000));
+}
+
+MsgChannel *
+DiscoverSched::try_get_scheduler ()
+{
+ if (schedname.empty())
{
- int ask_fd;
struct sockaddr_in remote_addr;
socklen_t remote_len;
- time_t time0 = time (0);
bool found = false;
+ char buf2[BROAD_BUFLEN];
- ask_fd = open_send_broadcast ();
-
- do
- {
- bool first = true;
- /* Read/test all arriving packages. */
- while (!found
- && get_broad_answer (ask_fd, first ? timeout : 0, buf2,
- &remote_addr, &remote_len))
- {
- first = false;
- if (strcasecmp (netname.c_str(), buf2 + 1) == 0)
- found = true;
- }
- if (found)
- break;
- }
- while (time (0) - time0 < (timeout / 1000));
- close (ask_fd);
+ /* Read/test all packages arrived until now. */
+ while (!found
+ && get_broad_answer (ask_fd, 0/*timeout*/, buf2,
+ &remote_addr, &remote_len))
+ if (strcasecmp (netname.c_str(), buf2 + 1) == 0)
+ found = true;
if (!found)
return 0;
- hostname = inet_ntoa (remote_addr.sin_addr);
+ schedname = inet_ntoa (remote_addr.sin_addr);
sport = ntohs (remote_addr.sin_port);
netname = buf2 + 1;
}
-
- log_info() << "scheduler is on " << hostname << ":" << sport << " (net " << netname << ")\n";
- return Service::createChannel( hostname, sport, 0); // 0 == no timeout
+ log_info() << "scheduler is on " << schedname << ":" << sport << " (net " << netname << ")\n";
+ return Service::createChannel( schedname, sport, 0/*timeout*/);
}
list<string>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/services/comm.h new/icecream/services/comm.h
--- old/icecream/services/comm.h 2006-06-19 15:18:26.000000000 +0200
+++ new/icecream/services/comm.h 2006-07-11 11:28:34.000000000 +0200
@@ -199,12 +199,24 @@
static MsgChannel *createChannel( int remote_fd, struct sockaddr *, socklen_t );
};
-/* Connect to a scheduler waiting max. TIMEOUT milliseconds.
- * schedname can be the hostname of a box running a scheduler, to avoid
- * broadcasting. */
-MsgChannel *connect_scheduler (const std::string &netname = std::string(),
- int timeout = 2000,
- const std::string &schedname = std::string());
+class DiscoverSched {
+ std::string netname, schedname;
+ int timeout;
+ int ask_fd;
+ time_t time0;
+ unsigned int sport;
+public:
+ /* Connect to a scheduler waiting max. TIMEOUT milliseconds.
+ schedname can be the hostname of a box running a scheduler, to avoid
+ broadcasting. */
+ DiscoverSched (const std::string &_netname = std::string(),
+ int _timeout = 2000,
+ const std::string &_schedname = std::string());
+ ~DiscoverSched();
+ bool timed_out();
+ int get_fd() const { return ask_fd; }
+ MsgChannel *try_get_scheduler();
+};
/* Return a list of all reachable netnames. We wait max. WAITTIME
milliseconds for answers. */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/services/logging.cpp new/icecream/services/logging.cpp
--- old/icecream/services/logging.cpp 2006-06-19 11:50:09.000000000 +0200
+++ new/icecream/services/logging.cpp 2006-07-10 12:35:48.000000000 +0200
@@ -31,8 +31,8 @@
ostream *logfile_info = 0;
ostream *logfile_warning = 0;
ostream *logfile_error = 0;
-ofstream logfile_null( "/dev/null" );
-ofstream logfile_file;
+static ofstream logfile_null( "/dev/null" );
+static ofstream logfile_file;
static string logfile_filename;
void reset_debug( int );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/services/scheduler.cpp new/icecream/services/scheduler.cpp
--- old/icecream/services/scheduler.cpp 2006-07-05 22:39:41.000000000 +0200
+++ new/icecream/services/scheduler.cpp 2006-07-12 09:08:15.000000000 +0200
@@ -48,7 +48,7 @@
#include "job.h"
#include "config.h"
-#define DEBUG_SCHEDULER 2
+#define DEBUG_SCHEDULER 0
/* TODO:
* leak check
@@ -827,19 +827,21 @@
{
trace() << "send ping " << ( *it )->nodename << endl;
( *it )->max_jobs *= -1; // better not give it away
- if(( *it )->send_msg( PingMsg() )) {
+ if(( *it )->send_msg( PingMsg() ))
+ {
// give it a few seconds to answer a ping
- ( *it )->last_talk = time( 0 ) - MAX_SCHEDULER_PING + MIN_SCHEDULER_PING;
- }
- }
- else
- { // R.I.P.
- trace() << "removing " << ( *it )->nodename << endl;
- CS *old = *it;
- ++it;
- handle_end (old, 0);
- continue;
- }
+ ( *it )->last_talk = time( 0 ) - MAX_SCHEDULER_PING
+ + MIN_SCHEDULER_PING;
+ ++it;
+ continue;
+ }
+ }
+ // R.I.P.
+ trace() << "removing " << ( *it )->nodename << endl;
+ CS *old = *it;
+ ++it;
+ handle_end (old, 0);
+ continue;
}
else
min_time = min (min_time, MAX_SCHEDULER_PING - now + ( *it )->last_talk);
@@ -857,7 +859,6 @@
++it;
}
-
/**
* check the jobs that were not cared about even though they are done
* (one in a million ;( */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/suse/init.icecream new/icecream/suse/init.icecream
--- old/icecream/suse/init.icecream 2006-06-01 09:54:31.000000000 +0200
+++ new/icecream/suse/init.icecream 2006-07-09 11:57:43.000000000 +0200
@@ -65,7 +65,7 @@
if test -n "$ICECREAM_MAX_JOBS"; then
maxjobs="-m $ICECREAM_MAX_JOBS"
fi
- startproc /usr/sbin/iceccd -d "$logfile" $nice $scheduler $netname -u icecream -b "$ICECREAM_BASEDIR" $maxjobs
+ startproc /usr/sbin/iceccd -d $logfile $nice $scheduler $netname -u icecream -b "$ICECREAM_BASEDIR" $maxjobs
rc_status -v
;;
stop)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/suse/logrotate new/icecream/suse/logrotate
--- old/icecream/suse/logrotate 2006-06-01 09:54:31.000000000 +0200
+++ new/icecream/suse/logrotate 2006-07-10 12:33:54.000000000 +0200
@@ -2,6 +2,7 @@
compress
dateext
maxage 30
+ rotate 99
missingok
notifempty
size +4096k
++++++ icecream-manpages.tar.bz2 ++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...