Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-7639

cidrlist is not updated in the database after calling API updateNetworkACLItem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.4.0
    • 4.5.0, 4.4.3, 4.6.0
    • API, Management Server
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None

    Description

      Note: There is a separate bug for empty cidrlist in response of API listNetworkACLs https://issues.apache.org/jira/browse/CLOUDSTACK-7638

      Before calling API updateNetworkACLItem

      http://cloudstack/client/api?apiKey=THE_API_KEY&response=json&command=listNetworkACLs&id=4c99aa8d-04cd-48c3-93df-aba46476e018&signature=tZOe%2Fx5acIrKbWXtl1abUW190To%3D
      {"listnetworkaclsresponse":{"count":1,"networkacl":[

      {"id":"4c99aa8d-04cd-48c3-93df-aba46476e018","protocol":"tcp","startport":"444","endport":"444","traffictype":"Ingress","state":"Active","cidrlist":"","tags":[],"aclid":"f9dc024f-86d9-43ec-b518-f03e28cb5c80","number":7,"action":"Allow","fordisplay":true}

      ]}}

      mysql> select * from network_acl_item where uuid="4c99aa8d-04cd-48c3-93df-aba46476e018" ;
      --------------------------------------------------------------------------------------------------------------------------------------------------+

      id uuid acl_id start_port end_port state protocol created icmp_code icmp_type traffic_type number action display

      --------------------------------------------------------------------------------------------------------------------------------------------------+

      18 4c99aa8d-04cd-48c3-93df-aba46476e018 4 444 444 Active tcp 2014-09-26 01:21:20 NULL NULL Ingress 7 Allow 1

      --------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)

      mysql> select * from network_acl_item_cidrs where id=18;
      -----------------------------------

      id network_acl_item_id cidr

      -----------------------------------

      18 18 11.11.3.0/24

      -----------------------------------
      1 row in set (0.00 sec)

      Call to API updateNetworkACLItem
      http://cloudstack/client/api?apiKey=THE_API_KEY&response=json&command=updateNetworkACLItem&id=4c99aa8d-04cd-48c3-93df-aba46476e018&action=allow&cidrlist=10.0.0.0%2F16&startport=555&endport=555&protocol=tcp&signature=PAEE%2Fbu2zOWZ3TVszlp2d9JQBt8%3D
      {"createnetworkaclresponse":{"jobid":"e8823889-727c-4fe0-acf6-4c2907f1b943"}}

      Result of Asynchronous operation [includes cidrlist specified in request]
      http://cloudstack/client/api?apiKey=THE_API_KEY&response=json&command=queryAsyncJobResult&jobid=e8823889-727c-4fe0-acf6-4c2907f1b943&signature=bUP%2BeX0cDSMQBSuVhMFheodjdfI%3D
      {"queryasyncjobresultresponse":{"accountid":"7fd84239-4440-11e4-b6a3-e83935306979","userid":"7fd85561-4440-11e4-b6a3-e83935306979","cmd":"org.apache.cloudstack.api.command.user.network.UpdateNetworkACLItemCmd","jobstatus":1,"jobprocstatus":0,"jobresultcode":0,"jobresulttype":"object","jobresult":{"networkacl":{"id":"4c99aa8d-04cd-48c3-93df-aba46476e018","protocol":"tcp","startport":"555","endport":"555","traffictype":"Ingress","state":"Add","cidrlist":"10.0.0.0/16","tags":[],"aclid":"f9dc024f-86d9-43ec-b518-f03e28cb5c80","number":7,"action":"Allow","fordisplay":true}},"created":"2014-09-26T11:59:00-0700","jobid":"e8823889-727c-4fe0-acf6-4c2907f1b943"}}

      After completing call to updateNetworkACLItem ,
      the ports get updated to new values , but the cidrlist is not updated in the database .

      http://cloudstack/client/api?apiKey=THE_API_KEY&response=json&command=listNetworkACLs&id=4c99aa8d-04cd-48c3-93df-aba46476e018&signature=tZOe%2Fx5acIrKbWXtl1abUW190To%3D
      {"listnetworkaclsresponse":{"count":1,"networkacl":[

      {"id":"4c99aa8d-04cd-48c3-93df-aba46476e018","protocol":"tcp","startport":"555","endport":"555","traffictype":"Ingress","state":"Active","cidrlist":"","tags":[],"aclid":"f9dc024f-86d9-43ec-b518-f03e28cb5c80","number":7,"action":"Allow","fordisplay":true}

      ]}}

      mysql> select * from network_acl_item where uuid="4c99aa8d-04cd-48c3-93df-aba46476e018" ;
      --------------------------------------------------------------------------------------------------------------------------------------------------+

      id uuid acl_id start_port end_port state protocol created icmp_code icmp_type traffic_type number action display

      --------------------------------------------------------------------------------------------------------------------------------------------------+

      18 4c99aa8d-04cd-48c3-93df-aba46476e018 4 555 555 Active tcp 2014-09-26 01:21:20 NULL NULL Ingress 7 Allow 1

      --------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)

      mysql> select * from network_acl_item_cidrs where id=18;
      -----------------------------------

      id network_acl_item_id cidr

      -----------------------------------

      18 18 11.11.3.0/24

      -----------------------------------

      Attachments

        Activity

          People

            bhaisaab Rohit Yadav
            p4j jagadish
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: