Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 163749 Details for
Bug 235204
net-misc/nxserver-freenx-0.7.2-r2: round-robin loadbalance broke
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Upstream SVN fixes for round-robin loadbalance
nxserver-freenx-0.7.3-roundrobin.patch (text/plain), 4.03 KB, created by
Bernard Cafarelli
on 2008-08-25 09:37:43 UTC
(
hide
)
Description:
Upstream SVN fixes for round-robin loadbalance
Filename:
MIME Type:
Creator:
Bernard Cafarelli
Created:
2008-08-25 09:37:43 UTC
Size:
4.03 KB
patch
obsolete
>--- trunk/freenx-server/nxserver 2008/08/22 00:44:43 580 >+++ trunk/freenx-server/nxserver 2008/08/25 03:28:15 612 >@@ -1192,7 +1192,7 @@ > # Lock held > > SERVER_LB_NR=$(cat $NX_SESS_DIR/round-robin 2>/dev/null) >- let SERVER_LB_NR=(SERVER_LB_NR+1) % SERVER_LB_NR_OF_HOSTS >+ let SERVER_LB_NR=(SERVER_LB_NR+1)%SERVER_LB_NR_OF_HOSTS > echo $SERVER_LB_NR >$NX_SESS_DIR/round-robin > > # Exit critical section >@@ -1961,71 +1961,71 @@ > session_history "$user" "$sessid" > } > >-cmd_terminate() >+cmd_execute() > { >- CMD_PARAMS=$(cmd_parse_3_params "$2") >- [ -z "$CMD_PARAMS" ] && exit 1 >- for i in $CMD_PARAMS; >+ cmd_host="$1" >+ cmd_user="$2" >+ cmd_cmd="$3" >+ >+ if [ "$ENABLE_USERMODE_AUTHENTICATION" = "1" ] >+ then >+ sh -c "$cmd_cmd" >+ elif [ "$cmd_host" = "127.0.0.1" -o "$cmd_host" = "localhost" ] >+ then >+ su - "$cmd_user" -c "$cmd_cmd" >+ else >+ ssh "$cmd_host" su - "$cmd_user" -c "'$cmd_cmd'" >+ fi >+} >+ >+cmd_terminate_or_send() >+{ >+ CMD="$1" >+ >+ if [ "$CMD" = "--broadcast" ] >+ then >+ CMD_PARAMS=$(session_find_all) >+ [ -z "$CMD_PARAMS" ] && cmd_abort "Error: No running session could be found." >+ else >+ CMD_PARAMS=$(cmd_parse_3_params "$2") >+ [ -z "$CMD_PARAMS" ] && exit 1 >+ shift >+ fi >+ shift >+ >+ for i in $CMD_PARAMS > do > CMDLINE=$(session_get_cmdline $i) > cmd_sessionid=$(getparam sessionId) >+ cmd_display=$(getparam display) > cmd_user=$(getparam userName) > cmd_type=$(getparam type) > cmd_status=$(getparam status) >+ cmd_host=$(getparam host) > > # is it a "good" session? >- case "$1" in >+ case "$CMD" in > --suspend) > if [ "$cmd_status" = "Running" ] && stringinstring "unix-" "$cmd_type" > then >- echo "sessionid=$cmd_sessionid" | su - "$cmd_user" -c "$PATH_BIN/nxnode --suspend" >+ echo "sessionid=$cmd_sessionid" | cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxnode --suspend" > fi > ;; > --terminate) >- echo "sessionid=$cmd_sessionid" | su - "$cmd_user" -c "$PATH_BIN/nxnode --terminate" >+ echo "sessionid=$cmd_sessionid" | cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxnode --terminate" > ;; > --force-terminate) >- echo "sessionid=$cmd_sessionid" | su - "$cmd_user" -c "$PATH_BIN/nxnode --terminate" >+ echo "sessionid=$cmd_sessionid" | cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxnode --terminate" > session_close $cmd_sessionid > ;; >- esac >- done >- >-} >- >-cmd_send() >-{ >- if [ "$1" = "--broadcast" ] >- then >- CMD_PARAMS=$(session_find_all) >- [ -z "$CMD_PARAMS" ] && cmd_abort "Error: No running session could be found." >- else >- CMD_PARAMS=$(cmd_parse_3_params "$2") >- [ -z "$CMD_PARAMS" ] && exit 1 >- shift >- fi >- shift >- for i in $CMD_PARAMS; >- do >- CMDLINE=$(session_get_cmdline $i) >- cmd_display=$(getparam display) >- cmd_user=$(getparam userName) >- cmd_type=$(getparam type) >- cmd_status=$(getparam status) >- cmd_host=$(getparam host) >- >- # is it a "good" session? >- if [ "$cmd_status" = "Running" ] && stringinstring "unix-" "$cmd_type" >- then >- if [ "$cmd_host" = "127.0.0.1" -o "$cmd_host" = "localhost" ] >+ --send|--broadcast) >+ # is it a "good" session? >+ if [ "$cmd_status" = "Running" ] && stringinstring "unix-" "$cmd_type" > then >- su - "$cmd_user" -c "$PATH_BIN/nxdialog --dialog ok --caption \"NX Administrator Message\" --message \"$@\" -display \":$cmd_display\" &" >- else >- ssh $cmd_host su - "$cmd_user" -c "'$PATH_BIN/nxdialog --dialog ok --caption \"NX Administrator Message\" --message \"$@\" -display \":$cmd_display\" &'" >+ cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxdialog --dialog ok --caption \"NX Administrator Message\" --message \"$@\" -display \":$cmd_display\" &" > fi >- fi >+ esac > done >- #nxnode_start --send "$CMD_PARAMS" > } > > # >@@ -2099,13 +2099,13 @@ > cmd_history "$@" > ;; > --terminate|--suspend|--force-terminate) >- cmd_terminate "$@" >+ cmd_terminate_or_send "$@" > ;; > --cleanup) >- cmd_terminate "--force-terminate" "*" >+ cmd_terminate_or_send "--force-terminate" "*" > ;; > --send|--broadcast) >- cmd_send "$@" >+ cmd_terminate_or_send "$@" > ;; > *) > cmd_abort "Error: Function $CMD not implemented yet."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 235204
:
163331
| 163749