• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

UltraMonkey-L7 V3(multi-thread implementation)


Commit MetaInfo

Revisionb9d8e263c3490861db7eb2f5de02549feceb125d (tree)
Time2012-07-31 13:37:34
AuthorHiroaki Nakano <nakano.hiroaki@nttc...>
CommiterHiroaki Nakano

Log Message

ticket 29127, 29128 l7directordのモジュール名チェックを外す

29127 l7directordのモジュール名チェックを外す
29128 サービス監視に失敗したときは、ポート監視に移行してしまう

Signed-off-by: Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp>

Change Summary

Incremental Difference

--- a/l7directord/l7directord
+++ b/l7directord/l7directord
@@ -892,9 +892,7 @@ sub validate_config {
892892 }
893893 }
894894 elsif ($name eq 'scheduler') {
895- my $valid_scheduler = qr{lc|rr|wrr};
896- $value = lc $value;
897- if (!defined $value || $value !~ /^(?:$valid_scheduler)$/) {
895+ if ( $value =~ /[^a-z]/ ) {
898896 config_error($line, 'ERR0105', $config);
899897 }
900898 }
@@ -933,35 +931,16 @@ sub validate_config {
933931 }
934932 }
935933 elsif ($name eq 'module') {
936- ## V3 Un-offering (url,pfileter).
937- my %key_option = ( url => ['--pattern-match', '--uri-pattern-match', '--host-pattern-match'],
938- sessionless => [],
939- ip => [],
940- sslid => [],
941- );
942934 my $module = undef;
943935 my $option = undef;
944- my $key = q{};
945936 if (defined $value) {
946937 $value =~ s/["']//g;
947938 ($module, $option) = split /\s+/, $value, 2;
948939 }
949- $module = lc $module;
950- if ( !defined $module || !exists $key_option{$module} ) {
940+ if ( $module =~ /[^a-z]/ ) {
951941 config_error($line, 'ERR0111', $config);
952942 }
953- for my $key_opt ( @{$key_option{$module}} ) {
954- if (defined $option && $option =~ /$key_opt\s+(\S+)/) {
955- $key .= q{ } if $key;
956- $key .= $key_opt . q{ } . $1;
957- }
958- }
959- if ( !$key && @{$key_option{$module}} ) {
960- # when omit cookie module key option
961- my $key_opt = join q{' or `}, @{$key_option{$module}};
962- config_error($line, 'ERR0112', $module, $key_opt, $config);
963- }
964- $value = {name => $module, option => $option, key => $key};
943+ $value = {name => $module, option => $option};
965944 }
966945 elsif ($name eq 'sorryserver') {
967946 my $forward = 'masq';
@@ -2137,9 +2116,9 @@ sub health_check {
21372116 my $service_status = &$health_check_func($v, $r);
21382117
21392118 if ($service_status == $SERVICE_DOWN) {
2119+ undef $r->{num_connects};
21402120 if (!defined $current_status || $current_status == $SERVICE_UP) {
21412121 $r->{fail_counts}++;
2142- undef $r->{num_connects};
21432122 if ($r->{fail_counts} >= $v->{checkcount}) {
21442123 ld_log( _message( 'ERR0602', get_ip_port($r) ) );
21452124 service_set($v_r_list, 'down');
@@ -4291,15 +4270,14 @@ sub _message_only {
42914270 ERR0103 => "Invalid value (set any word) `%s'.",
42924271 ERR0104 => "Invalid value (set `custom', `connect', `negotiate', `ping', `off', `on' "
42934272 . "or positive number) `%s'.",
4294- ERR0105 => "Invalid value (set `lc', `rr' or `wrr') `%s'.",
4273+ ERR0105 => "Invalid schedule module (should be only lowercase letters (a-z)) `%s'.",
42954274 ERR0106 => "Invalid value (set `http', `https', `ftp', `smtp', `pop', `imap', "
42964275 . "`ldap', `nntp', `dns', `mysql', `pgsql', `sip', or `none') `%s'.",
42974276 ERR0107 => "Invalid value (forwarding mode must be `masq' or `tproxy') `%s'.",
42984277 ERR0108 => "Invalid port number `%s'.",
42994278 ERR0109 => "Invalid protocol (protocol must be `tcp') `%s'.",
43004279 ERR0110 => "Invalid HTTP method (set `GET' or `HEAD') `%s'.",
4301- ERR0111 => "Invalid module (set `url', `pfilter', `ip', `sslid' or `sessionless') `%s'.",
4302- # ERR0111 => "Invalid module (set `cinsert', `cpassive', `crewrite', `url', `pfilter', `ip', `sslid' or `sessionless') `%s'.",
4280+ ERR0111 => "Invalid protocol module (should be only lowercase letters (a-z)) `%s'.",
43034281 ERR0112 => "Invalid module key option (`%s' module must set `%s' option) `%s'.",
43044282 ERR0113 => "Invalid QoS value (set 0 or 1-999[KMG]. must specify unit(KMG)) `%s'.",
43054283 ERR0114 => "Invalid address `%s'.",