Post by omega on Jan 22, 2008 19:03:42 GMT 7
Hi mates and Thecus,
while checking my SHUTDOWN module I've found one bug in at least the /img/bin/logevent/{error,event} scripts.
In these scripts there are case...esac constructs which have subclauses which are not terminated by a break statement. As a result, the final subclause "*)" always matches and an error message is issued (not visible to the ordinary user).
Check the log file below for the lines:
In the case of these two scripts there are no real bad consequences because of this, but I fear that if your programmers don't know how to use the case...esac statement, this error might be in other scripts as well and might cause other errors.
I've traced the shutdown sequence and I've noticed that stopping the NFS service gives an error. Maybe a fix is needed here too?
Check the log file below for the line:
Here is my shutdown sequence trace:
Andreas
while checking my SHUTDOWN module I've found one bug in at least the /img/bin/logevent/{error,event} scripts.
In these scripts there are case...esac constructs which have subclauses which are not terminated by a break statement. As a result, the final subclause "*)" always matches and an error message is issued (not visible to the ordinary user).
Check the log file below for the lines:
+ /img/bin/logevent/event 997 101 speicher
No such event function
In the case of these two scripts there are no real bad consequences because of this, but I fear that if your programmers don't know how to use the case...esac statement, this error might be in other scripts as well and might cause other errors.
I've traced the shutdown sequence and I've noticed that stopping the NFS service gives an error. Maybe a fix is needed here too?
Check the log file below for the line:
Shutting down NFS daemon: [60G[[1;31mFAILED[0;39m]
Here is my shutdown sequence trace:
++ cat /tmp/use_qtman
+ use_qt=1
+ save_log='/img/bin/hlog /logfs/hlogfile '
+ fsck_lock=/tmp/lns.lock
++ /bin/ps
++ grep /tmp/upgrade/postup.sh
++ grep -v grep
+ upgrade_fw_exist=
+ status_path=/var/tmp
+ event=/img/bin/logevent/event
+ hlog_event_1=system_down
+ hlog_event_2=raid_info
++ hostname
+ host_name=speicher
+ PATH=/sbin:/etc:/bin:/usr/bin
+ deny_status='Formatting Migrating Expand'
++ /bin/ls /var/tmp
++ grep -v raidlock
++ awk -F / '/raid/{printf("%s ",$1)}'
+ raid_list='raid0 '
+ for raid in '$raid_list'
+ for v in '$deny_status'
++ grep Formatting /var/tmp/raid0/rss
+ status=
+ '[' '' '!=' '' ']'
+ for v in '$deny_status'
++ grep Migrating /var/tmp/raid0/rss
+ status=
+ '[' '' '!=' '' ']'
+ for v in '$deny_status'
++ grep Expand /var/tmp/raid0/rss
+ status=
+ '[' '' '!=' '' ']'
+ '[' -f /tmp/lns.lock ']'
+ '[' '' '!=' '' ']'
+ stty onlcr
stty: standard input: Inappropriate ioctl for device
+ echo 'Running shutdown script /tmp/sysdown.sh:'
Running shutdown script /tmp/sysdown.sh:
+ case "$1" in
+ command=reboot
+ /img/bin/logevent/event 997 101 speicher
No such event function
+ echo 'BOOT_ERROR 2 Reboot Start'
+ words='Constructing Recovering Building Formatting Migrating Expand'
+ /img/bin/hlog /logfs/hlogfile system_down start
++ ls -1 /var/tmp/
++ grep -v raidlock
++ awk '/raid/{print $1}'
+ all_raid=raid0
+ for raid in '$all_raid'
+ '[' raid0 '!=' '' ']'
+ status_path=/var/tmp/raid0
++ cat /var/tmp/raid0/raid_level
+ level=5
+ '[' 5 == J ']'
+ level=raid5
++ cat /var/tmp/raid0/rss
+ status=Healthy
+ for msg in '${words}'
++ grep Constructing /var/tmp/raid0/rss
+ status_exist=
+ '[' '' '!=' '' ']'
+ for msg in '${words}'
++ grep Recovering /var/tmp/raid0/rss
+ status_exist=
+ '[' '' '!=' '' ']'
+ for msg in '${words}'
++ grep Building /var/tmp/raid0/rss
+ status_exist=
+ '[' '' '!=' '' ']'
+ for msg in '${words}'
++ grep Formatting /var/tmp/raid0/rss
+ status_exist=
+ '[' '' '!=' '' ']'
+ for msg in '${words}'
++ grep Migrating /var/tmp/raid0/rss
+ status_exist=
+ '[' '' '!=' '' ']'
+ for msg in '${words}'
++ grep Expand /var/tmp/raid0/rss
+ status_exist=
+ '[' '' '!=' '' ']'
++ cat /var/tmp/raid0/disk_tray
++ awk '-F\"' '{printf("Tray%s,",$2)}'
++ awk '{print substr($0,0,length($0)-1)}'
+ disk_tray=Tray1,Tray2,Tray3,Tray4,Tray5
+ /img/bin/hlog /logfs/hlogfile raid_info raid5,Healthy,Tray1,Tray2,Tray3,Tray4,Tray5
+ /img/bin/service stop
Stop Crond Job
killall: winbindd: no process killed
FTPD stops.
UPnP stops.
Nsync Target Server stops.
Netatalk stops.
Netatalk is disable, not running ...
Stopping portmap: [60G[ [1;32mOK[0;39m ]
Shutting down NFS mountd: [60G[ [1;32mOK[0;39m ]
Shutting down NFS daemon: [60G[[1;31mFAILED[0;39m]
Shutting down NFS quotas: [60G[ [1;32mOK[0;39m ]
Shutting down NFS services: [60G[ [1;32mOK[0;39m ]
killall: mediaserver: no process killed
stop mediaserver
Stopping SERGETTY...
Stopped SERGETTY!
Stopping RSYNC...
Stopped RSYNC!
Stopping NFSEXPORT...
Stopped NFSEXPORT!
Stopping META...
Stopped META!
Stopping SSHD...
Stopped SSHD!
Stopping SYSUSER...
Stopped SYSUSER!
Stopping SHUTDOWN...
Stopped SHUTDOWN!
Stopping JINZORA...
Stopped JINZORA!
Stopping PYTHON...
Stopped PYTHON!
Stopping SUBVERSION...
Stopped SUBVERSION!
Stopping IMGDUP...
Stopped IMGDUP!
Stopping FTPAccess...
Stopped FTPAccess!
Stopping FIREFLY...
Stopped FIREFLY!
Stopping PERL...
Stopped PERL!
Stopping USHARE...
Stopped USHARE!
Stopping INFO...
Stopped INFO!
Stopping SLIMSERVER...
Stopped SLIMSERVER!
Stopping IPERF...
Stopped IPERF!
Stopping UTILS...
Stopped UTILS!
Stopping DOKUWIKI...
Stopped DOKUWIKI!
killall: snmpd: no process killed
SNMPD stops.
Stopping iSCSI initiator service: OK
+ /sbin/hwclock --localtime --systohc
+ swap_disk=/dev/md0
+ echo 'Turning off swap.'
Turning off swap.
+ swapoff /dev/md0
+ sync
+ mdadm -S /dev/md0
+ '[' 0 '!=' 0 ']'
+ killall file-storage-ga
killall: file-storage-ga: no process killed
+ rmmod g_file_storage
rmmod: g_file_storage: No such file or directory
+ rmmod net2280
+ sync
++ awk -F : '/^md/&&!/md0/{print substr($1,3)}' /proc/mdstat
++ sort -u
+ mdlist='1 '
+ rcount=0
+ for mdnum in '$mdlist'
+ '[' 1 '!=' '' ']'
++ expr 1 - 1
+ raid_num=0
+ raid_name=raid0
+ vg_name=vg0
+ md_disk=/dev/md1
+ str_exec='mount | awk -F\ '\''/\/raid0\/data/{print $3}'\'''
++ eval 'mount | awk -F\ '\''/\/raid0\/data/{print $3}'\'''
+++ mount
+++ awk '-F ' '/\/raid0\/data/{print $3}'
+ mount_datadisk=/raid0/data
+ for datadisk in '$mount_datadisk'
++ /usr/bin/fuser -m /raid0/data
+ blockproc=
+ umount /raid0/data
+ '[' 0 '!=' 0 ']'
+ str_exec='mount | awk -F\ '\''/\/raid0\/sys/{print $3}'\'''
++ eval 'mount | awk -F\ '\''/\/raid0\/sys/{print $3}'\'''
+++ mount
+++ awk '-F ' '/\/raid0\/sys/{print $3}'
+ mount_ret=/raid0/sys
+ '[' /raid0/sys '!=' '' ']'
++ /usr/bin/fuser -m /raid0/sys
+ blockproc=
+ umount /raid0/sys
+ '[' 0 '!=' 0 ']'
+ str_exec='mount|awk -F\ '\''/\/raid0\/data/{rc=rc+1}END{printf("%d\n",rc)}'\'''
++ eval 'mount|awk -F\ '\''/\/raid0\/data/{rc=rc+1}END{printf("%d\n",rc)}'\'''
+++ mount
+++ awk '-F ' '/\/raid0\/data/{rc=rc+1}END{printf("%d\n",rc)}'
+ mount_count=0
+ '[' 0 -gt 0 ']'
+ str_exec='mount|awk -F\ '\''/\/dev\/vg0/{print $3}'\'''
++ eval 'mount|awk -F\ '\''/\/dev\/vg0/{print $3}'\'''
+++ mount
+++ awk '-F ' '/\/dev\/vg0/{print $3}'
+ mount_lvdisk=
+ str_exec='mount|awk -F\ '\''/\/raid0\/data/||/\/raid0\/sys/{rc=rc+1}END{printf("%d\n",rc)}'\'''
++ eval 'mount|awk -F\ '\''/\/raid0\/data/||/\/raid0\/sys/{rc=rc+1}END{printf("%d\n",rc)}'\'''
+++ mount
+++ awk '-F ' '/\/raid0\/data/||/\/raid0\/sys/{rc=rc+1}END{printf("%d\n",rc)}'
+ mount_count=0
+ '[' 0 -gt 0 ']'
++ cat /var/tmp/raid0/rss
+ raid_status=Healthy
+ '[' Healthy '!=' Damaged ']'
+ /sbin/vgchange -an vg0
0 logical volume(s) in volume group "vg0" now active
+ mdadm -S /dev/md1
+ '[' 0 '!=' 0 ']'
+ '[' -e /proc/mled_ctrl ']'
+ echo 'CTRL 00'
+ sync
+ killall agent2
++ ps
++ awk '/agent2/{print $1}'
+ psidlist='1022
1036
1037
1038
1039
1040
9972'
+ for psid in '$psidlist'
+ kill -9 1022
+ sleep 1
+ for psid in '$psidlist'
+ kill -9 1036
/tmp/sysdown.sh: line 271: kill: (1036) - No such process
+ sleep 1
+ for psid in '$psidlist'
+ kill -9 1037
/tmp/sysdown.sh: line 271: kill: (1037) - No such process
+ sleep 1
+ for psid in '$psidlist'
+ kill -9 1038
/tmp/sysdown.sh: line 271: kill: (1038) - No such process
+ sleep 1
+ for psid in '$psidlist'
+ kill -9 1039
/tmp/sysdown.sh: line 271: kill: (1039) - No such process
+ sleep 1
+ for psid in '$psidlist'
+ kill -9 1040
/tmp/sysdown.sh: line 271: kill: (1040) - No such process
+ sleep 1
+ for psid in '$psidlist'
+ kill -9 9972
/tmp/sysdown.sh: line 271: kill: (9972) - No such process
+ sleep 1
+ /img/bin/hlog /logfs/hlogfile system_down success
+ '[' reboot = reboot ']'
+ echo Rebooting.
+ reboot
Andreas