[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: icecream
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2012-07-16 11:19:37
Message-ID: 20120716111937.C33F8AC7A9 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1305965 by lunakl:
setting to avoid using hosts where the environment cannot be checked
Set ICECC_IGNORE_UNVERIFIED to avoid hosts where it cannot be checked
that the environment works there. Usable only with old icecream nodes
that cannot be upgraded.
M +1 -0 client/main.cpp
M +9 -2 client/remote.cpp
M +4 -0 client/util.cpp
M +1 -0 client/util.h
M +16 -0 doc/man-icecream.7.docbook
M +10 -0 services/comm.cpp
M +4 -3 services/comm.h
M +4 -0 services/scheduler.cpp
--- trunk/icecream/client/main.cpp #1305964:1305965
@@ -90,6 +90,7 @@
" ICECC_CXX set C++ compiler name (default g++).\n"
" ICECC_CLANG_REMOTE_CPP set to 1 or 0 to override remote precompiling with \
clang\n" " (requires clang -frewrite-includes \
option).\n" +" ICECC_IGNORE_UNVERIFIED if set, hosts where environment cannot be \
verified are not used.\n" "\n");
}
--- trunk/icecream/client/remote.cpp #1305964:1305965
@@ -356,6 +356,11 @@
}
}
+ if( !IS_PROTOCOL_31( cserver ) && ignore_unverified()) {
+ log_warning() << "Host " << hostname << " cannot be verified." << endl;
+ throw( 26 );
+ }
+
CompileFileMsg compile_file( &job );
{
log_block b("send compile_file");
@@ -630,7 +635,8 @@
fake_filename += get_absfilename( job.inputFile() );
GetCSMsg getcs (envs, fake_filename, job.language(), torepeat,
job.targetPlatform(), job.argumentFlags(),
- preferred_host ? preferred_host : string() );
+ preferred_host ? preferred_host : string(),
+ ignore_unverified());
if (!local_daemon->send_msg (getcs)) {
log_warning() << "asked for CS\n";
throw( 24 );
@@ -669,7 +675,8 @@
job.appendFlag( rand_seed, Arg_Remote );
GetCSMsg getcs (envs, get_absfilename( job.inputFile() ), job.language(), \
torepeat,
- job.targetPlatform(), job.argumentFlags(), preferred_host ? \
preferred_host : string() ); + job.targetPlatform(), \
job.argumentFlags(), preferred_host ? preferred_host : string(), + \
ignore_unverified());
if (!local_daemon->send_msg (getcs)) {
--- trunk/icecream/client/util.cpp #1305964:1305965
@@ -243,3 +243,7 @@
}
+bool ignore_unverified()
+{
+ return getenv("ICECC_IGNORE_UNVERIFIED");
+}
--- trunk/icecream/client/util.h #1305964:1305965
@@ -32,6 +32,7 @@
extern void colorify_output(const std::string &s_ccout);
extern bool colorify_wanted(const CompileJob &job);
extern bool colorify_possible();
+extern bool ignore_unverified();
extern bool dcc_unlock(int lock_fd);
extern bool dcc_lock_host(int &lock_fd);
--- trunk/icecream/doc/man-icecream.7.docbook #1305964:1305965
@@ -191,6 +191,22 @@
</refsect1>
<refsect1>
+<title>Avoiding old hosts</title>
+
+<para>It is possible that compilation on some hosts fails because they are too old
+(typically the kernel on the remote host is too old for the glibc from the local \
host). +Recent icecream versions should automatically detect this and avoid such \
hosts +when compilation would fail. If some hosts are running old icecream versions \
and +it is not possible to upgrade them for some reason, use
+
+<screen>
+ export ICECC_IGNORE_UNVERIFIED=1
+</screen>
+</para>
+
+</refsect1>
+
+<refsect1>
<title>Some Numbers</title>
<para>
--- trunk/icecream/services/comm.cpp #1305964:1305965
@@ -1269,7 +1269,15 @@
preferred_host = string();
if (IS_PROTOCOL_22(c))
*c >> preferred_host;
+ if (IS_PROTOCOL_31(c))
+ {
+ uint32_t ign;
+ *c >> ign;
+ ignore_unverified = ( ign != 0 );
}
+ else
+ ignore_unverified = false;
+}
void
GetCSMsg::send_to_channel (MsgChannel *c) const
@@ -1284,6 +1292,8 @@
*c << client_id;
if (IS_PROTOCOL_22(c))
*c << preferred_host;
+ if (IS_PROTOCOL_31(c))
+ *c << uint32_t( ignore_unverified );
}
void
--- trunk/icecream/services/comm.h #1305964:1305965
@@ -282,14 +282,15 @@
uint32_t arg_flags;
uint32_t client_id;
std::string preferred_host;
+ bool ignore_unverified;
GetCSMsg () : Msg(M_GET_CS), count( 1 ),arg_flags( 0 ), client_id( 0 ) {}
GetCSMsg (const Environments &envs, const std::string &f,
CompileJob::Language _lang, unsigned int _count,
std::string _target, unsigned int _arg_flags,
- const std::string &host)
+ const std::string &host, bool _ignore_unverified)
: Msg(M_GET_CS), versions( envs ), filename(f), lang(_lang),
count( _count ), target( _target ), arg_flags( _arg_flags ),
- client_id( 0 ), preferred_host(host)
+ client_id( 0 ), preferred_host(host), ignore_unverified( \
_ignore_unverified ) {}
virtual void fill_from_channel (MsgChannel * c);
virtual void send_to_channel (MsgChannel * c) const;
@@ -532,7 +533,7 @@
clientid = job_id = 0;
}
MonGetCSMsg( int jobid, int hostid, GetCSMsg *m )
- : GetCSMsg( Environments(), m->filename, m->lang, 1, m->target, 0, std::string() \
), job_id( jobid ), clientid( hostid ) + : GetCSMsg( Environments(), m->filename, \
m->lang, 1, m->target, 0, std::string(), false ), job_id( jobid ), clientid( hostid ) \
{ type = M_MON_GET_CS;
}
--- trunk/icecream/services/scheduler.cpp #1305964:1305965
@@ -217,6 +217,7 @@
unsigned int arg_flags;
string language; // for debugging
string preferred_host; // for debugging daemons
+ bool ignore_unverified; // ignore CSs that don't know M_VERIFY_ENV
Job (unsigned int _id, CS *subm)
: id(_id), local_client_id( 0 ), state(PENDING), server(0),
submitter(subm),
@@ -530,6 +531,7 @@
job->filename = m->filename;
job->local_client_id = m->client_id;
job->preferred_host = m->preferred_host;
+ job->ignore_unverified = m->ignore_unverified;
enqueue_job_request (job);
std::ostream& dbg = log_info();
dbg << "NEW " << job->id << " client="
@@ -701,9 +703,11 @@
{
bool jobs_okay = int( joblist.size() ) < max_jobs;
bool load_okay = load < 1000;
+ bool ignore = job->ignore_unverified && !IS_PROTOCOL_31(this);
return jobs_okay
&& chroot_possible
&& load_okay
+ && !ignore
&& can_install( this, job ).size()
&& this->check_remote( job );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic