[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #DIL-286118]: pqact EXEC for creating sym links


The problem is that the "mkdir" and "ln" actions are being performed almost 
simultaneously because pqact(1) doesn't wait for EXEC actions to terminate 
before continuing to the next entry.

The solution is to use the "-wait" option of EXEC in the "mkdir" entry. I.e.,

    EXEC<tab>-wait mkdir -p data/gempak/nexrad/ALLNIDS/\5/\4

Alternatively, you could combine all three actions into one shell script that 
was stored in, say, "~/util" (which would have to be in the LDM user's PATH 
environment variable). This has the advantage of not requiring that all 
pathnames and regular expressions be consonant.

> I would like to see if I can get pqact to create a symlink to a NIDS file 
> after it has stored the NIDS file.
> NEXRAD  ^SDUS[2357]. .... 
> ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(...)
> STDIOFILE       -close  
> data/gempak/nexrad/NIDS/(\1:yyyy)(\1:mm)(\1:dd)/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3
> NEXRAD  ^SDUS[2357]. .... 
> ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(...)
> EXEC    mkdir -p data/gempak/nexrad/ALLNIDS/\5/\4
> NEXRAD  ^SDUS[2357]. .... 
> ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(...)
> EXEC    ln --symbolic --force 
> data/gempak/nexrad/NIDS/(\1:yyyy)(\1:mm)(\1:dd)/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3
>  data/gempak/nexrad/ALLNIDS/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3
> I found that I had to create the destination directories in âALLNIDSâ 
> first or I would get permission denied on the ln command.
> However, I found that I will get
> pqact[810] ERROR: Child 1591 exited with status 1
> pqact[810] ERROR: Deleting failed EXEC entry "ln --symbolic --force 
> data/gempak/nexrad/NIDS/20160126/MRX/N1P/N1P_20160126_1759 
> data/gempak/nexrad/ALLNIDS/MRX/N1P/N1P_20160126_1759â
> but I donât get the error and indeed do get a hard link created without the 
> âlnâ options ââsymbolic âforceâ (or alternatively -sf).
> What am I doing wrong here?  What syntax should I be using in order to get a 
> symlink instead of hardlink created?
> Currently this experiment is on a system where the links are created in the 
> same filesystem as the nexrad files.  But I will want to do this on a system 
> where the destination directory for the symlinks are on a separate (ZFS) 
> filesystem and thus will have to create symlinks.
> -Neil

Steve Emmerson

Ticket Details
Ticket ID: DIL-286118
Department: Support LDM
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.