Project

General

Profile

Wiki » History » Version 10

Pablo Alingery, 26/09/2017 18:44

1 1 Pablo Alingery
h1. Installation Netdrms_9.0
2 1 Pablo Alingery
3 1 Pablo Alingery
4 5 Pablo Alingery
5 1 Pablo Alingery
h2. Create dir 
6 1 Pablo Alingery
7 2 Pablo Alingery
Create the directory to untar netdrms_9.0  from  http://jsoc.stanford.edu/~arta/for-pablo/netdrms-9.X.20170530tar.gz
8 5 Pablo Alingery
9 1 Pablo Alingery
<pre>
10 1 Pablo Alingery
mkdir /usr/local/netdrms_9.0
11 5 Pablo Alingery
</pre>
12 5 Pablo Alingery
13 5 Pablo Alingery
Create the directory netdmrs_9.1.1 (location Art's home directory at Stanford )  as root 
14 5 Pablo Alingery
15 5 Pablo Alingery
<pre>
16 5 Pablo Alingery
mkdir /usr/local/netdrms_9.0
17 5 Pablo Alingery
</pre>
18 5 Pablo Alingery
19 5 Pablo Alingery
Change owner for production:ias 
20 5 Pablo Alingery
21 5 Pablo Alingery
<pre>
22 5 Pablo Alingery
chown -R production:ias netdrms_9.1.1 
23 1 Pablo Alingery
</pre>
24 1 Pablo Alingery
25 1 Pablo Alingery
26 1 Pablo Alingery
h2. Configuration file 
27 1 Pablo Alingery
28 1 Pablo Alingery
<pre>
29 1 Pablo Alingery
cp config.local.template config.local
30 1 Pablo Alingery
</pre>
31 1 Pablo Alingery
32 1 Pablo Alingery
Config from netdmrs_8.12 
33 1 Pablo Alingery
Warning : Config not done for remote sum as jmd is used 
34 1 Pablo Alingery
35 1 Pablo Alingery
36 1 Pablo Alingery
h2. File configure modif
37 1 Pablo Alingery
38 1 Pablo Alingery
In file /usr/local/netdrms_current/configure
39 1 Pablo Alingery
40 1 Pablo Alingery
Replace all " $? !=0 " by " $status !=0 " in file configure then tape
41 1 Pablo Alingery
42 1 Pablo Alingery
43 1 Pablo Alingery
h2. File jsoc_machine.csh modif 
44 1 Pablo Alingery
45 1 Pablo Alingery
In file /usr/local/netdrms_current/build/jsoc_machine.csh (Same issue in NetDrms 8.11 )
46 1 Pablo Alingery
47 1 Pablo Alingery
ligne 28 :
48 1 Pablo Alingery
49 1 Pablo Alingery
<pre>
50 1 Pablo Alingery
case "x86_64":
51 1 Pablo Alingery
      echo linux_x86_64
52 1 Pablo Alingery
      breaksw
53 1 Pablo Alingery
</pre>
54 1 Pablo Alingery
55 1 Pablo Alingery
h2. File make_basic.mk 
56 1 Pablo Alingery
57 1 Pablo Alingery
In file make_basic.mk line 223
58 1 Pablo Alingery
59 1 Pablo Alingery
look for "GCC_LF_ALL ="
60 1 Pablo Alingery
add "-lcrypto"
61 1 Pablo Alingery
62 1 Pablo Alingery
h2. Execution configure
63 4 Pablo Alingery
64 3 Pablo Alingery
<pre>
65 3 Pablo Alingery
./configure
66 3 Pablo Alingery
</pre>
67 1 Pablo Alingery
68 4 Pablo Alingery
h2. Build 
69 4 Pablo Alingery
70 3 Pablo Alingery
Type 
71 1 Pablo Alingery
72 3 Pablo Alingery
<pre>
73 3 Pablo Alingery
make
74 3 Pablo Alingery
make sums
75 3 Pablo Alingery
</pre>
76 1 Pablo Alingery
77 6 Pablo Alingery
78 6 Pablo Alingery
79 6 Pablo Alingery
modif for netdrms9.1.1 as we gonna use new remote 
80 6 Pablo Alingery
81 6 Pablo Alingery
<pre>
82 6 Pablo Alingery
make show_info 
83 6 Pablo Alingery
make show_series 
84 6 Pablo Alingery
</pre>
85 6 Pablo Alingery
86 6 Pablo Alingery
Checking the modif on Db from NetDrms 2.4 we have figured out that some index where added
87 6 Pablo Alingery
The other modif are for sum_rm use ...
88 6 Pablo Alingery
Not needed at IAS  
89 6 Pablo Alingery
90 6 Pablo Alingery
On sdo modification of DB  add index 
91 6 Pablo Alingery
92 6 Pablo Alingery
<pre>
93 6 Pablo Alingery
production@sdo:~$ psql ias_sdo_sums -p5434 
94 6 Pablo Alingery
ias_sdo_sums=# CREATE INDEX sum_partn_alloc_wd_idx ON public.sum_partn_alloc(wd) ;
95 6 Pablo Alingery
</pre>
96 6 Pablo Alingery
97 6 Pablo Alingery
98 6 Pablo Alingery
99 3 Pablo Alingery
Install OK 
100 1 Pablo Alingery
101 1 Pablo Alingery
h2. Starting  Netdrms 
102 1 Pablo Alingery
103 1 Pablo Alingery
<pre>
104 1 Pablo Alingery
Starting it I have got :
105 1 Pablo Alingery
production@sdo3:/usr/local/netdrms_current$ sum_start.NetDRMS
106 1 Pablo Alingery
Number of SUM process sets to spawn = 1
107 1 Pablo Alingery
Max number of SUM process can spawn = 8
108 1 Pablo Alingery
SUMSERVER is sdo3
109 1 Pablo Alingery
SUMS_MANAGER is production
110 1 Pablo Alingery
SUMS db is ias_sdo_sums
111 1 Pablo Alingery
SUMS log dir is /usr/local/netdrms_current/logs/SUM
112 1 Pablo Alingery
sum_start.NetDRMS at 2017.07.12_19:41:38
113 1 Pablo Alingery
114 1 Pablo Alingery
** NOTE: SUMS is already running
115 1 Pablo Alingery
Do you want me to do a sum_stop.NetDRMS followed by a sum_start.NetDRMS (y or n):
116 1 Pablo Alingery
y
117 1 Pablo Alingery
SUMS log dir is /usr/local/netdrms_current/logs/SUM
118 1 Pablo Alingery
119 1 Pablo Alingery
sum_stop.NetDRMS at 2017.07.12_19:41:53
120 1 Pablo Alingery
121 1 Pablo Alingery
NOTE: This will stop sum_svc and related processes. Make sure you want to do this
122 1 Pablo Alingery
Enter reason for stop (terminate with single '.' or ^D):
123 1 Pablo Alingery
>> some reason
124 1 Pablo Alingery
>> .
125 1 Pablo Alingery
Please identify yourself:
126 1 Pablo Alingery
>> Pablo
127 1 Pablo Alingery
Timed-out waiting for sums_procck.py (pid 12640) to exit.
128 1 Pablo Alingery
** Now starting SUMS on ias_sdo_sums
129 1 Pablo Alingery
SUM NetDRMS Start Complete
130 1 Pablo Alingery
production@sdo3:/usr/local/netdrms_current$ Running on SUMS-server host sdo3.
131 1 Pablo Alingery
Connection to SUMS DB ias_sdo_sums.
132 1 Pablo Alingery
Using SUMS-log file sum_svc_2017.07.12.192435.logR.
133 1 Pablo Alingery
Using SUMS-rm-log file 2017.07.12.192435.log.
134 1 Pablo Alingery
Process sum_svc is not running.
135 1 Pablo Alingery
Starting process sum_svc.
136 1 Pablo Alingery
137 1 Pablo Alingery
Please wait for sum_svc and tape inventory (optional) to initialize...
138 1 Pablo Alingery
Can't open config file /usr/local/netdrms_current/logs/SUM/sum_rm.cfg. Using defaults...
139 1 Pablo Alingery
rm: impossible de supprimer « /SUM12/D355906038/Records.txt »: Système de fichiers accessible en lecture seulement
140 1 Pablo Alingery
rm: impossible de supprimer « /SUM12/D355906038/S00000/spikes.fits »: Système de fichiers accessible en lecture seulement
141 1 Pablo Alingery
rm: impossible de supprimer « /SUM12/D355906038/S00000/image_lev1.fits »: Système de fichiers accessible en lecture seulement
142 1 Pablo Alingery
(...)
143 1 Pablo Alingery
</pre>
144 1 Pablo Alingery
145 1 Pablo Alingery
So I killed netdrms to fix that point 
146 1 Pablo Alingery
147 1 Pablo Alingery
<pre>
148 1 Pablo Alingery
Shutting down SUMS...
149 1 Pablo Alingery
Killing [sum_rm](pid 17376).
150 1 Pablo Alingery
Killing sum_svc(pid 17371).
151 1 Pablo Alingery
Removing pidfile /usr/local/netdrms_current/logs/SUM/sums.pidfile
152 1 Pablo Alingery
Exiting process via shutdown() with return value 0.
153 1 Pablo Alingery
</pre>
154 1 Pablo Alingery
155 1 Pablo Alingery
156 1 Pablo Alingery
The sum_rm is running although in config.local I have set SUMRM_NOOP to 1
157 1 Pablo Alingery
158 1 Pablo Alingery
<pre>
159 1 Pablo Alingery
# If the value is set to anything other than 0, then sum_rm is rendered inactive. Otherwise, sum_rm is active.
160 1 Pablo Alingery
SUMRM_NOOP                             1
161 1 Pablo Alingery
</pre>
162 1 Pablo Alingery
163 1 Pablo Alingery
So I put an old sum_rm.cfg in /home/production/netdrms_current/logs/SUM/ then it was ok
164 1 Pablo Alingery
165 1 Pablo Alingery
<pre>
166 1 Pablo Alingery
production@sdo3:/usr/local/netdrms_current$ sum_start.NetDRMS
167 1 Pablo Alingery
Number of SUM process sets to spawn = 1
168 1 Pablo Alingery
Max number of SUM process can spawn = 8
169 1 Pablo Alingery
SUMSERVER is sdo3
170 1 Pablo Alingery
SUMS_MANAGER is production
171 1 Pablo Alingery
SUMS db is ias_sdo_sums
172 1 Pablo Alingery
SUMS log dir is /usr/local/netdrms_current/logs/SUM
173 1 Pablo Alingery
sum_start.NetDRMS at 2017.07.12_19:46:51
174 1 Pablo Alingery
175 1 Pablo Alingery
** Now starting SUMS on ias_sdo_sums
176 1 Pablo Alingery
SUM NetDRMS Start Complete
177 1 Pablo Alingery
production@sdo3:/usr/local/netdrms_current$ Running on SUMS-server host sdo3.
178 1 Pablo Alingery
Connection to SUMS DB ias_sdo_sums.
179 1 Pablo Alingery
Using SUMS-log file sum_svc_2017.07.12.194651.log.
180 1 Pablo Alingery
Using SUMS-rm-log file 2017.07.12.194651.log.
181 1 Pablo Alingery
Process sum_svc is not running.
182 1 Pablo Alingery
Starting process sum_svc.
183 1 Pablo Alingery
184 1 Pablo Alingery
Please wait for sum_svc and tape inventory (optional) to initialize...
185 1 Pablo Alingery
Can't open the log file /home/production/netdrms_current/logs/SUM/sum_rm.log.2017.07.12.194651 for sum_rm on sdo3
186 1 Pablo Alingery
187 1 Pablo Alingery
188 1 Pablo Alingery
## sum_rm for production  pid = 17672 ##
189 1 Pablo Alingery
You are configured as the active user
190 1 Pablo Alingery
cmd: cat /tmp/cmdgrep.17672.log | wc -l 1> /tmp/sum_rm.17672.log
191 1 Pablo Alingery
Connect to Postgres host=sdo3 db=ias_sdo_sums user=production Ok
192 1 Pablo Alingery
DS_PavailRequest
193 1 Pablo Alingery
Called alrm_sig()
194 1 Pablo Alingery
Jul 12 19:46:53
195 1 Pablo Alingery
NOOP
196 1 Pablo Alingery
197 1 Pablo Alingery
production@sdo3:/usr/local/netdrms_current$ sum_svc now available
198 1 Pablo Alingery
</pre>
199 1 Pablo Alingery
200 1 Pablo Alingery
h2. Test Netdrms_9.0
201 1 Pablo Alingery
202 1 Pablo Alingery
Quick test on the thing that bothered us with netdrms_2.4 and lead us to think about an update :
203 1 Pablo Alingery
204 1 Pablo Alingery
<pre>
205 1 Pablo Alingery
production@sdo3:/usr/local/netdrms_current$ show_info -r -S -P 'hmi.sharp_720s_nrt[5398][! DATE__OBS>$(2016-12-20T23:00:00Z) AND DATE__OBS<$(2016-12-21T01:00:00Z) !]' key='DATE__OBS'
206 1 Pablo Alingery
recnum    sunum    DATE__OBS    SUDIR
207 1 Pablo Alingery
2190405    884413026    2016-12-20T23:10:30.80Z    /SUM13/D884413026/S00000
208 1 Pablo Alingery
2190409    884414163    2016-12-20T23:22:30.80Z    /SUM13/D884414163/S00000
209 1 Pablo Alingery
2190413    884416279    2016-12-20T23:34:30.80Z    /SUM13/D884416279/S00000
210 1 Pablo Alingery
2190417    884417281    2016-12-20T23:46:30.80Z    /SUM13/D884417281/S00000
211 1 Pablo Alingery
2190421    884419003    2016-12-20T23:58:30.80Z    /SUM13/D884419003/S00000
212 1 Pablo Alingery
2190425    884421131    2016-12-21T00:10:30.90Z    /SUM13/D884421131/S00000
213 1 Pablo Alingery
2190429    884422598    2016-12-21T00:22:30.90Z    /SUM13/D884422598/S00000
214 1 Pablo Alingery
2190433    884424336    2016-12-21T00:34:30.90Z    /SUM13/D884424336/S00000
215 1 Pablo Alingery
2190437    884425290    2016-12-21T00:46:30.90Z    /SUM13/D884425290/S00000
216 1 Pablo Alingery
2190441    884427329    2016-12-21T00:58:30.90Z    /SUM13/D884427329/S00000
217 1 Pablo Alingery
</pre>
218 7 Pablo Alingery
219 7 Pablo Alingery
h1. Use sumsd.py
220 7 Pablo Alingery
221 7 Pablo Alingery
sumsd.py will open socket to communicate from the client to the server 
222 7 Pablo Alingery
rsumsd.py wiil need a couple of table to work  so let's create it 
223 1 Pablo Alingery
224 1 Pablo Alingery
h2. create missing tables 
225 9 Pablo Alingery
226 9 Pablo Alingery
To be done too on sdo1 
227 9 Pablo Alingery
228 1 Pablo Alingery
<pre>
229 7 Pablo Alingery
/usr/local/netdrms_current$ base/drms/scripts/rscreatetabs.py op=create  tabs=req,su
230 7 Pablo Alingery
</pre>
231 9 Pablo Alingery
232 10 Pablo Alingery
ok
233 10 Pablo Alingery
234 8 Pablo Alingery
h2. ssh-agent
235 9 Pablo Alingery
236 9 Pablo Alingery
ssh-agent was not working so we did regenerate public key 
237 9 Pablo Alingery
238 1 Pablo Alingery
<pre>
239 8 Pablo Alingery
ssh-keygen -t rsa
240 8 Pablo Alingery
</pre>
241 8 Pablo Alingery
242 1 Pablo Alingery
243 8 Pablo Alingery
then copy public key id_rsa.pub into ~/.ssh/authorized_keys on the targeted server  jsocport.stanford.edu
244 8 Pablo Alingery
245 10 Pablo Alingery
jsoc side, on  jsocport.stanford.edu
246 10 Pablo Alingery
make sure sdo3 ip is referenced in /etc/hosts.netdrms