Closed digitalgust closed 5 years ago
I debug and trace the the mgmt code , found out the problem that database cloud
.op_dc_vnet_alloc
table have nothing , compare the other database of our production cloud, the table recorded vlan that setup in Zone creation, then i add a row manually , add a vm again , success.
Now i will try to find out the cause why not the cloud
.op_dc_vnet_alloc
added rows on zone creation .
update bug summary: Issue : MgmtUI call api to create physical network when Zone creation, forgot vnetRange parameter when create physical network 2 ,
mgmt log:
2019-08-01 17:36:50,729 DEBUG [c.c.a.ApiServlet] (qtp532087022-19:ctx-6362ba4e) (logid:85dbf67a) ===START=== 10.0.1.11 -- GET command=createPhysicalNetwork&zoneid=7a2a1e5b-d0cc-4580-9891-ae9a3cb0095e&name=Physical%20Network%201&isolationmethods=VLAN&response=json&_=1564652210626
2019-08-01 17:36:50,756 DEBUG [c.c.a.ApiServlet] (qtp532087022-21:ctx-50abb42c) (logid:1a5a22a7) ===START=== 10.0.1.11 -- GET command=createPhysicalNetwork&zoneid=7a2a1e5b-d0cc-4580-9891-ae9a3cb0095e&name=Physical%20Network%202&isolationmethods=VLAN&response=json&_=1564652210627
so java source method call parameter vnetRange is null, can't insert into vlans to database
public PhysicalNetwork com.cloud.network.NetworkServiceImpl. createPhysicalNetwork(final Long zoneId, final String vnetRange, final String networkSpeed, final List<String> isolationMethods,
String broadcastDomainRangeStr, final Long domainId, final List<String> tags, final String name){
...
if (vnetRange != null) { // ;;------------------------ vnetRange is null
addOrRemoveVnets(vnetRange.split(","), pNetwork);
}
...
}
/ui/scripts/zoneWizard.js bug here , forgot vlanRangeStart and vlanRangeEnd para:
} else if (args.data.zone.networkType == "Advanced") {
$(args.data.physicalNetworks).each(function(index) {
var thisPhysicalNetwork = this;
var array1 = [];
array1.push("&name=" + todb(thisPhysicalNetwork.name));
if (thisPhysicalNetwork.isolationMethod != null && thisPhysicalNetwork.isolationMethod.length > 0)
array1.push("&isolationmethods=" + todb(thisPhysicalNetwork.isolationMethod));
$.ajax({
url: createURL("createPhysicalNetwork&zoneid=" + args.data.returnedZone.id + array1.join("")),
Please fix it
@digitalgust when deploying via the UI, after it creates the VLAN ip ranges, it updates the vlan range for the physical network and it runs the updatePhysicalNetwork API with the provided vlan range. Please specify the VLAN range here:
Yes , i have filled the vlan id when installation every times , but vlan id not in db . so i debug it to find the cause. unknow cause! maybe i reinstalled multiple times , installed different versions of cloudstack , 4.9/4.10/4.11/4.12 , is there a cached js file in browse ?
i reinstall management before one hour ago , the vlan correctly inserted into db . now , looks everything is works.
i will close the issue.
That could be setup/installation issue, thanks for confirming @digitalgust.
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
advance network KVM guest CIDR 172.16.1.0/16 manage_network & storage_network on cloudbr0 connect to hardware switch 0 public_newwork & guest_network on cloudbr1 connect to hardware switch 1 public traffic: gateway 10.0.0.1/8 reserve ip:10.0.99.100 - 10.0.99.199 pod: gateway 192.168.101.254/24 reserve ip : 192.168.101.100 - 192.168.101.199 vlan : 1000-1009 storage traffic: gateway192.168.100.254/24, reserve ip: 192.168.100.100 - 192.168.100.199 host : 192.168.101.50/24
OS / ENVIRONMENT
centos 7.6
SUMMARY
New install cloudstack , add advance network zone, system vm startup , ssvm cvm both "UP" , then "add isolated network" ok , state show allocated, then "add instance" , using "CentOS 5.5(64-bit) no GUI (KVM)" template that download completed. then error occured. no vrouter gerneted. the main error:
full log:
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS