3 # Errors in pmcd.conf [acccess] that should not prevent pmcd starting
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
19 ln $seq.out.ipv6
$seq.out ||
exit 1
21 ln $seq.out.nonipv6
$seq.out ||
exit 1
30 if [ -f $tmp.pmcd.conf
]
32 $sudo cp $tmp.pmcd.conf
$PCP_PMCDCONF_PATH
35 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
45 $sudo rm -rf $tmp.
* $seq.full
46 trap "_cleanup; exit \$status" 0 1 2 3 15
49 eval `./getpmcdhosts -L -n 2 2>$tmp.out | sed -e 's/^/other1=/' -e 's/ / other2=/'`
50 echo "other1=$other1" >$seq.full
51 echo "other2=$other2" >>$seq.full
52 echo "qahost=$qahost" >>$seq.full
53 [ -z "$other1" ] && _notrun
"Cannot find first remote host running pmcd"
54 [ -z "$other2" ] && _notrun
"Cannot find second remote host running pmcd"
56 # real QA test starts here
59 # copy the pmcd config file to restore state later.
60 cp $PCP_PMCDCONF_PATH $tmp.pmcd.conf
62 if [ $PCP_PLATFORM = linux
]
64 cat <<End-of-File >$tmp.tmp
67 linux 60 dso linux_init $PCP_PMDAS_DIR/linux/pmda_linux.so
68 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
71 elif [ $PCP_PLATFORM = darwin
]
73 cat <<End-of-File >$tmp.tmp
76 darwin 78 dso darwin_init $PCP_PMDAS_DIR/darwin/pmda_darwin.dylib
77 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.dylib
80 elif [ $PCP_PLATFORM = solaris
]
82 cat <<End-of-File >$tmp.tmp
85 solaris 75 dso solaris_init $PCP_PMDAS_DIR/solaris/pmda_solaris.so
86 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
89 elif [ $PCP_PLATFORM = freebsd
]
91 cat <<End-of-File >$tmp.tmp
94 freebsd 85 dso freebsd_init $PCP_PMDAS_DIR/freebsd/pmda_freebsd.so
95 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
99 echo "Arrgh ... need pmcd.conf for $PCP_PLATFORM"
103 cat <<End-of-File >>$tmp.tmp
106 allow no.such.host.pcp.io : all;
107 allow nohost.engr.sgi.com, $qahost : all;
108 allow $other1, no.such.host.pcp.io, localhost : fetch;
109 allow localhost, $other2, nohost.melbourne.sgi.com : store;
110 allow "local:" , "unix:" : all;
114 echo "# from qa/$seq" >> $tmp.tmp
116 $sudo cp $tmp.tmp
$PCP_PMCDCONF_PATH
118 echo "=== pmcd.conf ===" >>$seq.full
119 cat $PCP_PMCDCONF_PATH >>$seq.full
121 echo "=== pmcd restarting ===" >>$seq.full
122 $sudo $PCP_RC_DIR/pcp restart
2>>$seq.full | _filter_pcp_start
124 echo "=== pmcd restarted ===" >>$seq.full
126 cat $PCP_PMCDLOG_PATH >>$seq.full
128 echo "=== pmcd.log ===" >>$seq.full
129 _filter_pmcd_log
<$PCP_PMCDLOG_PATH \
132 s/ [12] dso/1-or-2 dso/
133 s/lib=\/usr\//lib=\/usr-or-var\//
134 s/lib=\/var\//lib=\/usr-or-var\//
136 -e 's/__pmGetAddrInfo/gethostbyname/g' \
137 -e 's/__pmGetHostByName/gethostbyname/g' \
138 -e '/gethostbyname(/s/ Unknown host/ No address associated with name/' \
139 -e '/gethostbyname(/s/ Host name lookup failure/ No address associated with name/' \
140 -e '/gethostbyname(/s/ Resolver Error 0 (no error)/ No address associated with name/' \
142 s/ [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]* / LOCALIP /
146 s/ [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]* / OTHERIP1 /
150 s/ [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]* / OTHERIP2 /
153 -e "s/$qahost\$/LOCALHOST/g" \
154 -e "s/$other1\$/OTHERHOST1/g" \
155 -e "s/$other2\$/OTHERHOST2/g" \
156 -e '/UNIX_DOMAIN_SOCKET/d' \
158 -e '/error sending Conn ACK PDU/d' \
159 -e "s/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]/<hexnum>/" \
161 $8 ~ /^[A-Z]+HOST[12]*$/ && $5 ~ /^[0-9a-f]/ {
162 sub(/^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$/,"<ipaddr>",$5)
163 sub(/^[0-9a-f:][0-9a-f:]*%[0-9a-z]+$/,"<ipaddr>",$5)
164 sub(/^[0-9a-f:][0-9a-f:]*$/,"<ipaddr>",$5)
168 echo "check pmcd is up and we can get local access" >> $seq.full
169 pmprobe hinv.ncpu
>>$seq.full
2>&1 ||
echo "ACCESS DENIED"