Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipvssync changes rt of real server when changing weight if services have different rt. #6

Open
gvkeller opened this issue Jan 8, 2021 · 0 comments

Comments

@gvkeller
Copy link

gvkeller commented Jan 8, 2021

Given the following config, any time the weight of a real server is changed, the routing type is set to the same as the service with the lowest fwmark.

<surealived>
        <virtual name="custweb" port="80" proto="fwmark" sched="wlc" rt="dr" fwmark="1">
          <tester loopdelay="5" timeout="2" retries2fail="6" retries2ok="12" 
                  proto="tcp" testport="80"
                  stats_samples="10"
                  notify_min_reals="1"
                  remove_on_fail="0"
                />
          <real name="web1" addr="XXXX" port="80" weight="20"/>
        </virtual>
        <virtual name="custweb2" port="80" proto="fwmark" sched="wlc" rt="tun" fwmark="2">
          <tester loopdelay="5" timeout="2" retries2fail="6" retries2ok="12" 
                  proto="tcp" testport="80"
                  stats_samples="10"
                  notify_min_reals="1"
                  remove_on_fail="0"
                />
          <real name="web2" addr="XXXX" port="80" weight="20"/>
        </virtual>
</surealived>

After a fresh start of the service it looks correct:

# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
FWM  1 wlc
  -> web1:80        Route   20     0          0         
FWM  2 wlc
  -> web2:80        Tunnel  0      0          0      

After allowing the test on the second real service to succeed:

# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
FWM  1 wlc
  -> web1:80        Route   20     0          0         
FWM  2 wlc
  -> web2:80        Route   20     0          0  

I have tried different combinations of routing types and fwmarks, the consistent thing is that the real servers are always changed with the type of the service with the lowest fwmark value. The only error I have managed to catch that may be relevant is:

[2021-01-08 11:26:48.877753] debug : * add_dest: [0.0.0.0:0 proto=6 fwmark=2 :: XXXX:80 proto=6 fwmark=2] [2021-01-08 11:26:48.877907] debug : * ERROR add_dest: [0.0.0.0:0 proto=6 fwmark=2 :: XXXX:80 proto=6 fwmark=2] [File exists]

which only occurs when the lower fwmark service is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant