You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/03/09 11:11:38 UTC

[jira] [Commented] (CLOUDSTACK-7639) cidrlist is not updated in the database after calling API updateNetworkACLItem

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-7639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352743#comment-14352743 ] 

ASF subversion and git services commented on CLOUDSTACK-7639:
-------------------------------------------------------------

Commit b2b9de7fa39825e8ff111353619df4e5aece12e6 in cloudstack's branch refs/heads/4.5 from [~rohit.yadav@shapeblue.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=b2b9de7 ]

CLOUDSTACK-7639: make cidrlist update when updateNetworkAclItem is called

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


> cidrlist is not updated in the database after calling API updateNetworkACLItem
> ------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-7639
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7639
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: API, Management Server
>    Affects Versions: 4.4.0
>            Reporter: jagadish
>            Assignee: Rohit Yadav
>             Fix For: 4.5.0, 4.6.0, 4.4.3
>
>
> 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 |
> +----+---------------------+--------------+



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)