Forum Discussion

splion_86861's avatar
Icon for Nimbostratus rankNimbostratus
May 04, 2011

Wrong VirtualServer-Type




In the web-interface on the device the type of Virtual Server call "Performance (Layer 4)".



I use the saop-method "vir:get_type" and it returns the value "RESOURCE_TYPE_POOL" but i expect the value "RESOURCE_TYPE_FAST_L4". What's my mistake?




Other checks:




Forwarding (Layer 2) -> RESOURCE_TYPE_L2_FORWARDING






Performance (Layer 4) -> RESOURCE_TYPE_POOL






bye Andreas


4 Replies

  • What toolkit are you using? Could you provide the snippet of code you are using to make the call and I'll see if I can reproduce the issue you are seeing. I'll dig into the source for this interface and see if I can find any reason why this happens.





  • OK, I just dug into the source and found that RESOURCE_TYPE_FAST_L4, RESOURCE_TYPE_FAST_HTTP, AND RESOURCE_TYPE_POOL all map to RESOURCE_TYPE_POOL in both the get_type() and set_type() method. Not sure why. I'll dig a bit longer...





  • Think I've got it figured out. The "Type" selection in the GUI actually does a bit more than just set the type. It also assigns the client protocol profile to use. For "Standard", it defaults to the "tcp". For "Perfornace (Layer 4)" it assings the fastl4 profile, and for "Performance (HTTP)" it assigns the "fasthttp" protocol profile to the virtual.



    Under the seams, these three types are all really of type POOL, the only difference is the client protocol profile on the virtual.



    If you want to use iControl to change the "type" for either of these, you'll make the call for set_type() to either of the types, they all default to TYPE_POOL. And then remove the current client profiles with the VirtualServer.remove_profile() method passing in the existing profiles (or you could use remove_all_profiles()). Then make a call to VirtualServer.add_profile() passing in either "tcp", "fastl4" or "fasthttp".



    Sorry this isn't very clear. iControl was really built around the core configuration database. When this method was created, the types were distinct, but somewhere along the way, the three mentioned above merged into the same "type" internally but are still represented differently in the GUI.



    Hope this makes some sense. If you need some help with the coding, let me know what language you are using and I'll see what I can do to build some code to simulate the GUI's functionality.





  • Hey,

    thank's for your explanation.

    I use Perl and SOAP::Lite with the iControl.

    Now i use the following schematic:

                             VirtualServerType              VirtualServerProfileAttribute{profile_type}
    Forwarding (Layer 2)  -> RESOURCE_TYPE_L2_FORWARDING 
    Forwarding (IP)       -> RESOURCE_TYPE_IP_FORWARDING 
    Reject                -> RESOURCE_TYPE_REJECT        
    Standard              -> RESOURCE_TYPE_POOL          -> !PROFILE_TYPE_FAST_L4 && !PROFILE_TYPE_FAST_HTTP
    Performance (HTTP)    -> RESOURCE_TYPE_POOL          -> PROFILE_TYPE_FAST_HTTP
    Performance (Layer 4) -> RESOURCE_TYPE_POOL          -> PROFILE_TYPE_FAST_L4

    Is this a right solution?

    bye Andreas