Hi Saksham The issue here is if we specify the gateway without specifying the net-mask , the networks table gets updated with the VN name , but in db both gateway cidr are empty . list network bails out because if this.
> list zones count = 1 zone: name = default id = 9b5dd877-1fb1-4499-8fec-2baea16ce973 allocationstate = Enabled dhcpprovider = VirtualRouter dns1 = 10.84.5.100 dns2 = domain = ROOT guestcidraddress = 10.1.0.0/24 internaldns1 = 10.84.5.100 internaldns2 = ip6dns1 = ip6dns2 = localstorageenabled = False networktype = Advanced securitygroupsenabled = False zonetoken = 63b953cc-1dbf-3a03-8aea-ce96319173cc mysql> select id,name,cidr,gateway from networks; +-----+------+----------------+-------------+ | id | name | cidr | gateway | +-----+------+----------------+-------------+ | 200 | NULL | NULL | NULL | | 201 | NULL | NULL | NULL | | 202 | NULL | 169.254.0.0/16 | 169.254.0.1 | | 203 | NULL | NULL | NULL | | 204 | VN1 | 10.1.1.0/24 | 10.1.1.254 | | 205 | VN2 | NULL | NULL | +-----+------+----------------+-------------+ Thanks Vinod -----Original Message----- From: Saksham Srivastava [mailto:saksham.srivast...@citrix.com] Sent: Monday, December 30, 2013 10:21 PM To: dev@cloudstack.apache.org Subject: RE: ACS4.2 db goes for a toss if no netmask is specified while creating a virtual Network In general, if you do not specify a gateway and netmask, the values will be taken from the zone level settings. Check listZones to see your configuration. Thanks, Saksham -----Original Message----- From: Vinod Nair [mailto:vinodn...@juniper.net] Sent: Tuesday, December 31, 2013 6:29 AM To: dev@cloudstack.apache.org Subject: RE: ACS4.2 db goes for a toss if no netmask is specified while creating a virtual Network Hi Root cause is that ACS is allowing to create a VN without a net mask value, Whereas list networks command is checking for if cidr value is present or not for a network while iterating all networks. If it finds a network without cidr it throws Exception and returns empty Thanks Vinod -----Original Message----- From: Vinod Nair [mailto:vinodn...@juniper.net] Sent: Monday, December 30, 2013 11:26 AM To: dev@cloudstack.apache.org Subject: ACS4.2 db goes for a toss if no netmask is specified while creating a virtual Network Hi I have ACS4.2 , If I try creating a virtual network without specifying a netmask, the database goes for a toss.. only way to recover is to delete the entry from the database manually or set the CIDR manually as it is set as NULL. Is there a fix available for this issue. # cloudmonkey ? Apache CloudStack ?? cloudmonkey 5.0.0. Type help or ? to list commands. > list networks : None select * from networks where id=207; +-----+------+--------------------------------------+--------------+--------------+-----------------------+---------------+---------+------+------+---------------------+---------------------+----------------+--------------+-------------+---------+-----------+------------+------+------+-----------+------------+----------+----------------+--------------------------------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+ | id | name | uuid | display_text | traffic_type | broadcast_domain_type | broadcast_uri | gateway | cidr | mode | network_offering_id | physical_network_id | data_center_id | guru_name | state | related | domain_id | account_id | dns1 | dns2 | guru_data | set_fields | acl_type | network_domain | reservation_id | guest_type | restart_required | created | removed | specify_ip_ranges | vpc_id | ip6_gateway | ip6_cidr | network_cidr | display_network | network_acl_id | +-----+------+--------------------------------------+--------------+--------------+-----------------------+---------------+---------+------+------+---------------------+---------------------+----------------+--------------+-------------+---------+-----------+------------+------+------+-----------+------------+----------+----------------+--------------------------------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+ | 207 | Vn1 | d1e6ae13-d750-4682-948c-c6545d6c9ace | vn1 | Guest | Lswitch | NULL | NULL | NULL | Dhcp | 15 | 200 | 1 | ContrailGuru | Implemented | 207 | 1 | 2 | NULL | NULL | NULL | 0 | Account | NULL | e7f881be-c9d8-4ff1-8fce-26d207426b45 | Isolated | 0 | 2013-12-30 16:10:46 | NULL | 0 | NULL | NULL | NULL | NULL | 1 | NULL | +-----+------+--------------------------------------+--------------+--------------+-----------------------+---------------+---------+------+------+---------------------+---------------------+----------------+--------------+-------------+---------+-----------+------------+------+------+-----------+------------+----------+----------------+--------------------------------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+ 1 row in set (0.00 sec) Thanks Vinod