hashdist / hashstack-old

Obsolete repository, use "hashstack" instead
3 stars 4 forks source link

quilt in Ubuntu problem (hit fails) #83

Open certik opened 11 years ago

certik commented 11 years ago
[quilt]         /usr/bin/install -c -d $dir;                \
[quilt]         /usr/bin/install -c -m 644 po/$lang.mo          \
[quilt]             $dir/quilt.mo ;                 \
[quilt]     done
[quilt] rm -rf /auto/netscratch/ondrej/opt/quilt/a2wt/share/quilt/compat
[quilt] /usr/bin/install -c -d /auto/netscratch/ondrej/opt/quilt/a2wt/share/quilt/compat
[quilt] ln -sf /usr/bin/gawk    \
[quilt]            /auto/netscratch/ondrej/opt/quilt/a2wt/share/quilt/compat/awk
[quilt] ln -sf /usr/sbin/sendmail   \
[quilt]            /auto/netscratch/ondrej/opt/quilt/a2wt/share/quilt/compat/sendmail
[quilt] running ['hit', 'build-postprocess', '--write-protect']
[quilt ERROR] hit command failed

This should provide useful error message. So far I have no idea what the problem is.

certik commented 11 years ago

The problem is with write protecting things, in particular when it gets to this path:

$ ll /netscratch/ondrej/opt/quilt/a2wt/share/quilt/compat/awk 
lrwxrwxrwx 1 ondrej cnls 13 Jun 20 14:16 /netscratch/ondrej/opt/quilt/a2wt/share/quilt/compat/awk -> /usr/bin/gawk*

it fails (for whatever reason --- possibly that the link goes beyond the profile). The solution that I ended up using is just:

--- a/hashdist/cli/build_tools_cli.py
+++ b/hashdist/cli/build_tools_cli.py
@@ -276,8 +276,8 @@ class BuildPostprocess(object):
             handlers.append(partial(build_tools.postprocess_multiline_shebang,
                                     build_store))

-        if args.write_protect:
-            handlers.append(build_tools.postprocess_write_protect)
+        #if args.write_protect:
+        #    handlers.append(build_tools.postprocess_write_protect)

         if args.path is None:
             try:

The proper solution is to just not us the --write-protect flag, which however would cause everything to rebuilt, and I don't have time for that at the moment.

@dagss -- the write protection now happens in hashdist/core/build_store.py automatically. Should we get rid of the --write-protect flag?

dagss commented 11 years ago

I'm not sure if I agree to the write-protection happening automatically in build_store.py, can't you move it to the postprocess tool?

As for the error message, look in hashdist.core.run_job module. Where it processes "hit" commands it captures an exception I think, and you'd need to dump that to the logger. In general, that's the place to poke around with print statements to fix this (you could just test with "hit --nosuchflag" in a job and check that the approprioate help text makes it to the log rather than just the exit status)

(sorry for brevity, gtg now, you only just reached me in time)