RE: ACS 4.2: list networks returns empty, if a VN is created without net mask

2014-01-07 Thread Santhosh Edukulla
Hello Vinod,

I tried it with felton\4.3. I didn't see any exception here. Below are the 
steps I followed:

Note1:
1. Login to CS UI, navigate to Network-Add Isolated Network. So, basically it 
called createNetwork API.
2. Filled in all other fields, Entered GatewayIp with out specifying netmask. 
It created the network.

Note2:
1. Login to CS UI, navigate to Network-Add Guest Network. Again, it called 
createNetwork API.
2. Filled in all other * fields, Entered GatewayIp with out specifying netmask, 
startip,endip etc. Clicking on OK thrown up a warning with information 
retrieved from API, mentioning these fields are mandatory fields.

So, i didn't see any exception in either case. As well, it didn't created any 
entries in DB as mentioned below with cidr having null values.

Question:
1. How we are getting null values for cidr field in DB?

Creating or Listing through API doesn't have any cidr as input, except ip6cidr 
argument for createNetwork which is not a required argument.  Below are the API 
description for two API's.

1. 
http://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/listNetworks.html
2. 
http://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/createNetwork.html 

Are we using above API's or directly altering the DB? 


Regards,
Santhosh

From: sebgoa [run...@gmail.com]
Sent: Monday, January 06, 2014 9:48 AM
To: dev@cloudstack.apache.org
Subject: Re: ACS 4.2: list networks returns empty, if a VN is created without 
net mask

On Jan 3, 2014, at 8:55 PM, Vinod Nair vinodn...@juniper.net wrote:

 Thanks Saksham

 There is all-ready one open CLOUDSTACK-5681
 Can it be assigned to someone


Just a quick note here, as a community we don't assign bugs. Someone has to 
step up and assign it to him/herself

 Thanks
 Vinod


 -Original Message-
 From: Saksham Srivastava [mailto:saksham.srivast...@citrix.com]
 Sent: Friday, January 03, 2014 8:18 AM
 To: dev@cloudstack.apache.org
 Subject: RE: ACS 4.2: list networks returns empty, if a VN is created without 
 net mask

 This could be a bug, go ahead a file an issue.

 Thanks,
 Saksham

 -Original Message-
 From: Vinod Nair [mailto:vinodn...@juniper.net]
 Sent: Friday, January 03, 2014 5:53 AM
 To: dev@cloudstack.apache.org
 Subject: ACS 4.2: list networks returns empty, if a VN is created without net 
 mask

 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

Re: ACS 4.2: list networks returns empty, if a VN is created without net mask

2014-01-06 Thread sebgoa

On Jan 3, 2014, at 8:55 PM, Vinod Nair vinodn...@juniper.net wrote:

 Thanks Saksham 
 
 There is all-ready one open CLOUDSTACK-5681
 Can it be assigned to someone
 

Just a quick note here, as a community we don't assign bugs. Someone has to 
step up and assign it to him/herself

 Thanks
 Vinod
 
 
 -Original Message-
 From: Saksham Srivastava [mailto:saksham.srivast...@citrix.com] 
 Sent: Friday, January 03, 2014 8:18 AM
 To: dev@cloudstack.apache.org
 Subject: RE: ACS 4.2: list networks returns empty, if a VN is created without 
 net mask 
 
 This could be a bug, go ahead a file an issue.
 
 Thanks,
 Saksham
 
 -Original Message-
 From: Vinod Nair [mailto:vinodn...@juniper.net] 
 Sent: Friday, January 03, 2014 5:53 AM
 To: dev@cloudstack.apache.org
 Subject: ACS 4.2: list networks returns empty, if a VN is created without net 
 mask 
 
 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

RE: ACS 4.2: list networks returns empty, if a VN is created without net mask

2014-01-03 Thread Saksham Srivastava
This could be a bug, go ahead a file an issue.

Thanks,
Saksham

-Original Message-
From: Vinod Nair [mailto:vinodn...@juniper.net] 
Sent: Friday, January 03, 2014 5:53 AM
To: dev@cloudstack.apache.org
Subject: ACS 4.2: list networks returns empty, if a VN is created without net 
mask 

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 | 

RE: ACS 4.2: list networks returns empty, if a VN is created without net mask

2014-01-03 Thread Vinod Nair
Thanks Saksham 

There is all-ready one open CLOUDSTACK-5681
Can it be assigned to someone

Thanks
Vinod


-Original Message-
From: Saksham Srivastava [mailto:saksham.srivast...@citrix.com] 
Sent: Friday, January 03, 2014 8:18 AM
To: dev@cloudstack.apache.org
Subject: RE: ACS 4.2: list networks returns empty, if a VN is created without 
net mask 

This could be a bug, go ahead a file an issue.

Thanks,
Saksham

-Original Message-
From: Vinod Nair [mailto:vinodn...@juniper.net] 
Sent: Friday, January 03, 2014 5:53 AM
To: dev@cloudstack.apache.org
Subject: ACS 4.2: list networks returns empty, if a VN is created without net 
mask 

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