madhuneal / ppss

Automatically exported from code.google.com/p/ppss
0 stars 0 forks source link

Arguments cannot contain ":" or directory and log file creation will fail #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>echo "http://hello.wordpress.com" > temp.txt
>ppss.sh -c 'echo ' -f temp.txt

What is the expected output? What do you see instead?
This is what I see: 
nov 17 11:56:31:  =========================================================
nov 17 11:56:31:                         |P|P|S|S|                         
nov 17 11:56:31:  Distributed Parallel Processing Shell Script version 2.41
nov 17 11:56:31:  =========================================================
nov 17 11:56:31:  Hostname:     i7-desktop
nov 17 11:56:31:  ---------------------------------------------------------
nov 17 11:56:31:  CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
nov 17 11:56:31:  Found 8 logic processors.
nov 17 11:56:31:  Starting 8 parallel workers.
nov 17 11:56:31:  ---------------------------------------------------------
nov 17 11:56:31:  Currently 100 percent complete. Processed 1 of 1 items.
/usr/bin/ppss.sh: line 1387: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1388: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1389: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1390: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1391: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1392: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1405: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1410: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1415: ppss/job_log/http:hello.wordpress.com: Invalid
argument
mkdir: no s’ha pogut crear el directori «/http:»: Permission denied
/usr/bin/ppss.sh: line 1443: ppss/job_log/http:hello.wordpress.com: Invalid
argument
/usr/bin/ppss.sh: line 1444: ppss/job_log/http:hello.wordpress.com: Invalid
argument
nov 17 11:56:32:  1 job is remaining.       
nov 17 11:56:32:  Finished. Consult ./ppss/job_log for job output.

What version of the product are you using? On what operating system?
Ubuntu 9.10, last version of ppss.sh

Please provide any additional information below.
The problem is that ppss.sh removes / and \ but does not replaces : which
are not valid filenames. 

I could fix most of the errors, but I could not fix the mkdir issue: 
1372c1372
<     LOG_FILE_NAME=`echo "$ITEM" | sed s/^\\\.//g | sed s/^\\\.\\\.//g |
sed s/\\\///g | sed s@:@@g`

---
>     LOG_FILE_NAME=`echo "$ITEM" | sed s/^\\\.//g | sed s/^\\\.\\\.//g |
sed s/\\\///g`

This removes ":" from the name, but it will still fail while creating the
directory (mkdir)

Original issue reported on code.google.com by Roger.Si...@gmail.com on 17 Nov 2009 at 11:08

GoogleCodeExporter commented 9 years ago
Strange. 

No proglems on Mac OS X Snow Leopard: 

bash-3.2$ echo "http://hello.wordpress.com" > temp.txt
bash-3.2$ ./ppss.sh -c 'echo ' -f temp.txt 
nov 17 23:43:44:  
=========================================================
nov 17 23:43:44:                         |P|P|S|S|                         
nov 17 23:43:44:  Distributed Parallel Processing Shell Script version 2.41
nov 17 23:43:44:  
=========================================================
nov 17 23:43:44:  Hostname:     MacBoek.local
nov 17 23:43:44:  ---------------------------------------------------------
nov 17 23:43:44:  CPU:  Intel Core 2 Duo  2,16 GHz
nov 17 23:43:44:  Found 2 logic processors.
nov 17 23:43:44:  Starting 2 parallel workers.
nov 17 23:43:44:  ---------------------------------------------------------
nov 17 23:43:45:  Currently 100 percent complete. Processed 1 of 1 items.
nov 17 23:43:45:  1 job is remaining.       
nov 17 23:43:45:  Finished. Consult ./ppss/job_log for job output.
bash-3.2$ tail ppss/ppss-log-43925.txt 
tail: ppss/ppss-log-43925.txt: No such file or directory
bash-3.2$ tail ppss/ppss-log-44035.txt 
nov 17 23:43:44: INFO  ---------------------------------------------------------
nov 17 23:43:45: DEBUG Got lock on http://hello.wordpress.com, processing.
nov 17 23:43:45: DEBUG No transfer of item hello.wordpress.com to local 
workpath.
nov 17 23:43:45: INFO  Currently 100 percent complete. Processed 1 of 1 items.
nov 17 23:43:45: DEBUG Processing item http://hello.wordpress.com
nov 17 23:43:45: DEBUG Using item straight from INPUT FILE
nov 17 23:43:45: INFO  1 job is remaining.       
nov 17 23:43:45: DEBUG File transfer is disabled.
nov 17 23:43:45: INFO  Finished. Consult ./ppss/job_log for job output.
nov 17 23:43:45: DEBUG Listener stopped.
bash-3.2$ cat ppss/job_log/*
===== PPSS Item Log File =====
Host:       MacBoek.local
Process:44035
Item:       http://hello.wordpress.com
Start date: nov 17 23:43:45

http://hello.wordpress.com

Status:     SUCCESS
Elapsed time (h:m:s): 0:0:0

Original comment by Louwrentius on 17 Nov 2009 at 10:44

GoogleCodeExporter commented 9 years ago
No problem on Debian Lenny:

Mini:~# echo "http://hello.wordpress.com" > temp.txt
Mini:~# ./ppss.sh -c 'echo ' -f temp.txt
Nov 17 23:45:41:  
=========================================================
Nov 17 23:45:41:                         |P|P|S|S|                         
Nov 17 23:45:41:  Distributed Parallel Processing Shell Script version 2.41
Nov 17 23:45:41:  
=========================================================
Nov 17 23:45:41:  Hostname:     Mini
Nov 17 23:45:41:  ---------------------------------------------------------
Nov 17 23:45:41:  CPU: Genuine Intel(R) CPU            1300  @ 1.66GHz
Nov 17 23:45:41:  Found 2 logic processors.
Nov 17 23:45:41:  Starting 2 parallel workers.
Nov 17 23:45:41:  ---------------------------------------------------------
Nov 17 23:45:41:  Currently 100 percent complete. Processed 1 of 1 items.
Nov 17 23:45:41:  1 job is remaining.       
Nov 17 23:45:41:  Finished. Consult ./ppss/job_log for job output.
Mini:~# cat ppss/job_log/http\:hello.wordpress.com 
===== PPSS Item Log File =====
Host:       Mini
Process:31253
Item:       http://hello.wordpress.com
Start date: Nov 17 23:45:41

http://hello.wordpress.com

Status:     SUCCESS
Elapsed time (h:m:s): 0:0:0

Mini:~# cat /etc/de
debconf.conf    debian_version  default/        defoma/         deluser.conf    
Mini:~# cat /etc/de
debconf.conf    debian_version  default/        defoma/         deluser.conf    
Mini:~# cat /etc/debian_version 
5.0.3

Original comment by Louwrentius on 17 Nov 2009 at 10:46

GoogleCodeExporter commented 9 years ago
This is some Ubuntu specific issue:

nan03@Core7i:~$ ./ppss.sh -f temp.txt  -c 'echo '
Nov 17 23:50:23:  
=========================================================
Nov 17 23:50:23:                         |P|P|S|S|                         
Nov 17 23:50:23:  Distributed Parallel Processing Shell Script version 2.41
Nov 17 23:50:23:  
=========================================================
Nov 17 23:50:23:  Hostname:     Core7i
Nov 17 23:50:23:  ---------------------------------------------------------
Nov 17 23:50:23:  CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
Nov 17 23:50:23:  Found 8 logic processors.
Nov 17 23:50:23:  Starting 8 parallel workers.
Nov 17 23:50:23:  ---------------------------------------------------------
Nov 17 23:50:23:  Currently 100 percent complete. Processed 1 of 1 items.
mkdir: cannot create directory `/http:': Permission denied
Nov 17 23:50:23:  1 job is remaining.       
Nov 17 23:50:23:  Finished. Consult ./ppss/job_log for job output.

Original comment by Louwrentius on 17 Nov 2009 at 10:51

GoogleCodeExporter commented 9 years ago
A solution will be found for the make dir issue and incorporated.

Original comment by Louwrentius on 17 Nov 2009 at 11:14

GoogleCodeExporter commented 9 years ago
{{{

nan03@Core7i:~/ppss$ echo "http://hello.wordpress.com" > temp.txt
nan03@Core7i:~/ppss$ ./ppss.sh -c 'echo ' -f temp.txt 
Dec 16 02:45:46:  =========================================================
Dec 16 02:45:46:                         |P|P|S|S|                         
Dec 16 02:45:46:  Distributed Parallel Processing Shell Script version 2.45
Dec 16 02:45:46:  =========================================================
Dec 16 02:45:46:  Hostname:     Core7i
Dec 16 02:45:46:  ---------------------------------------------------------
Dec 16 02:45:46:  CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
Dec 16 02:45:46:  Found 8 logic processors.
Dec 16 02:45:46:  Starting 8 parallel workers.
Dec 16 02:45:46:  ---------------------------------------------------------
Dec 16 02:45:46:  Currently 100 percent complete. Processed 1 of 1 items.
Dec 16 02:45:52:  1 job is remaining.       
Dec 16 02:45:52:  Finished. Consult ./ppss/job_log for job output.
nan03@Core7i:~/ppss$ cat ppss/job_log/http\:hello.wordpress.com 
===== PPSS Item Log File =====
Host:       Core7i
Process:9073
Item:       http://hello.wordpress.com
Start date: Dec 16 02:44:47

http://hello.wordpress.com

Status:     SUCCESS
Elapsed time (h:m:s): 0:0:0

nan03@Core7i:~/ppss$ cat /etc/u
ucf.conf         ufw/             update-manager/  update-notifier/ 
udev/            updatedb.conf    update-motd.d/   usplash.conf     
nan03@Core7i:~/ppss$ cat /etc/deb
debconf.conf    debian_version  
nan03@Core7i:~/ppss$ cat /etc/debian_version 
squeeze/sid
}}}

Solved.

Original comment by Louwrentius on 16 Dec 2009 at 1:47