Developer

last person joined: 31 minutes ago 

Expand all | Collapse all

ArubaOS : system/status don't work when stacking switch (3810/5406)

Jump to Best Answer
  • 1.  ArubaOS : system/status don't work when stacking switch (3810/5406)

    Posted Oct 03, 2018 05:00 PM

    Hi,

     

    i found a bug... when use "rest/v4/system/status" (or rest/v5/system/status) with stacked(orVSF) Aruba 3810 or 5400 Switches

     

    Via the PowerArubaSW module, i the following error

    PS C:\Users\alagoutte\Documents\dev\PowerArubaSW\Tests\integration> connect-arubasw 10.76.139.100 -httpOnly
    Welcome on Aruba-Stack-3810M - Aruba3810M-24G-PoE+-1-sl(JL073A)
    PS C:\Users\alagoutte\Documents\dev\PowerArubaSW\Tests\integration> Get-ArubaSWSystemStatus
    AVERTISSEMENT : The Switch API sends an error message:
    AVERTISSEMENT : Error description (code): Not Found (404)
    AVERTISSEMENT : Error details: { "message": "Error 404: Not Found." }
    Unable to use switch API
    Au caractère C:\Users\alagoutte\Documents\dev\PowerArubaSW\PowerArubaSW\Private\Webrequest.ps1:69 : 13
    +             throw "Unable to use switch API"
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (Unable to use switch API:String) [], RuntimeException
        + FullyQualifiedErrorId : Unable to use switch API

    if i force v3 API => working

     

    PS C:\Users\alagoutte\Documents\dev\PowerArubaSW\Tests\integration> (Invoke-ArubaSWWebRequest -method "get" -url "/rest/
    v3/system/status").content | ConvertFrom-Json
    
    
    uri                   : /system/status
    name                  : Aruba-Stack-3810M
    serial_number         : SG70GYW0DL
    firmware_version      : KB.16.05.0003
    hardware_revision     : JL073A
    product_model         : Aruba3810M-24G-PoE+-1-slot Switch(JL073A)
    base_ethernet_address : @{version=MAV_EUI_48; octets=ecebb8-168ee2}
    total_memory_in_bytes : 695631872

    if disable stacking => work

    Get the same issue with 54xx with VSF !

     

    Try with firmware 16.05.0003/0007, 16.06.0006 and same issue !



  • 2.  RE: ArubaOS : system/status don't work when stacking switch (3810/5406)

    Posted Oct 04, 2018 02:12 AM

    try with 16.07.0002 and 16.06.0008 and always the same issue !

     

    the debug rest-interface output...

    Aruba-Stack-3810M#
    0000:01:14:43.99 rest tHttpd:REST request redirected to REST server
    0000:01:14:43.99 rest tHttpd:Send REST request message to REST control task
    0000:01:14:43.99 rest tHttpd:tHttpd is unblocked with necessary cleanup
    0000:01:14:43.99 rest mrest_ctrl:Request for parse header
    0000:01:14:43.99 rest mrest_ctrl:Request for parse header after method GET
    0000:01:14:43.99 rest mrest_ctrl:uri len = 22
    0000:01:14:43.99 rest mrest_ctrl: PARSE header Cookie  value :
       sessionId=bvI0xnsyHCykvrbciPnyiMCtuO4qYhK7iCfDy5giUdQMx7DChwzFeAGkjCqq5sr
    0000:01:14:43.99 rest mrest_ctrl:Validate operation:  operation is allowed 2
    0000:01:14:43.99 rest mrest_ctrl:Rest valid Operation.
    0000:01:14:43.99 rest RestSrv-2:Method = GET, URI = /rest/v4/system/status
    0000:01:14:43.99 rest RestSrv-2:status = 404, reason = Not Found
    0000:01:14:43.99 rest mrest_ctrl:read len 141
    0000:01:14:43.99 rest mrest_ctrl:bytes_pending 0, nsent 141
    0000:01:14:43.99 rest mrest_ctrl:read len 38
    0000:01:14:43.99 rest mrest_ctrl:bytes_pending 0, nsent 38
    0000:01:14:43.99 rest mrest_ctrl:read len 0
    0000:01:14:43.99 rest mrest_ctrl:REST response is sent
    0000:01:14:43.99 rest mrest_ctrl:REST request processed successfully


  • 3.  RE: ArubaOS : system/status don't work when stacking switch (3810/5406)
    Best Answer

    Posted Oct 04, 2018 07:40 AM

    Hi Alexis,

     

    Since v4, "/system/status" in only for use with standalone devices.

    If you want to use this URI with stacked/virtualized devices, you've got to use "/system/status/global_info".

    This is indicated in the JSON schema file :

    Screen Shot 2018-10-04 at 13.32.10.png

    The "/system/status/global_info" URI won't give you as many informations as with a standalone device, so you should use the "/system/status/members" URI in order to gather more details. 



  • 4.  RE: ArubaOS : system/status don't work when stacking switch (3810/5406)

    Posted Oct 04, 2018 08:24 AM

    Ok...

     

    Not really a good idea... because need to call different API when standalone or stacked switch...



  • 5.  RE: ArubaOS : system/status don't work when stacking switch (3810/5406)

    Posted Oct 04, 2018 08:46 AM

    In this case, you have 2 ways to do that :

    1. You can test the status_code. Meaning, if you make your request on "/system/status" and you get a 404, it means you're trying to make a request against a stacked device, so you make another call on "/system/status/global_info"

    2. You make a request on "system/status/switch". This URI works wether you're using a standalone or a stacked device. In the JSON returned by the device, you'll get a "switch_type" key, which will give you the device's status ("ST_STANDALONE" for standalone, or "ST_STACKED" if stacked/virtualized). Depending on this value, you'll be able to do the request using the good URI to "/system/status" service, without having to play with status codes.

     

    HTH.



  • 6.  RE: ArubaOS : system/status don't work when stacking switch (3810/5406)

    Posted Oct 04, 2018 12:18 PM

    @arnaud.legall wrote:

    2. You make a request on "system/status/switch". This URI works wether you're using a standalone or a stacked device. In the JSON returned by the device, you'll get a "switch_type" key, which will give you the device's status ("ST_STANDALONE" for standalone, or "ST_STACKED" if stacked/virtualized). Depending on this value, you'll be able to do the request using the good URI to "/system/status" service, without having to play with status codes.

     

    HTH.


    Yes, i will use this solution, i think...