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

Alena Prokharchyk commented on CLOUDSTACK-3754:
-----------------------------------------------

I've tested specifying networkDomain 


1) Created the zone from the UI. Specified the network domain "alena" on the 
first page of createZone wizard. Zone was created with the domain:

http://localhost:8080/client/api?command=createZone&networktype=Basic&securitygroupenabled=true&name=dsaf&dns1=10.1.1.1&internaldns1=10.1.1.1&domain=alena&response=json&sessionkey=V9jmn3MGVi%2BZXuNjKBtzMC5DtMk%3D&_=1374622199886

mysql> select id, name, domain from data_center where id=2;
+----+------+--------+
| id | name | domain |
+----+------+--------+
|  2 | dsaf | alena  |
+----+------+--------+
1 row in set (0.00 sec)

2) Then UI executed createNetwork call to create guest network in the Basic 
zone. Here is the call:

http://localhost:8080/client/api?command=createNetwork&response=json&sessionkey=V9jmn3MGVi%2BZXuNjKBtzMC5DtMk%3D&zoneid=1b870963-abdb-40e8-b9f9-09bd5627dad9&name=defaultGuestNetwork&displaytext=defaultGuestNetwork&networkofferingid=2e1ddb3c-c3a6-41b0-9f8f-a8393a33bfeb&_=1374622219036

As we can't create more than 1 guest network in the Basic zone, its Network 
Domain gets defaulted to the zone network domain.

mysql> select name, network_domain from  networks where id=211;
+---------------------+----------------+
| name                | network_domain |
+---------------------+----------------+
| defaultGuestNetwork | alena          |
+---------------------+----------------+
1 row in set (0.00 sec)


Soheil, in the future do one of the following:

Implicit set:

1) call createZone with domain=<networkDomain param> when create Basic zone
2) then create the network in the zone. It will pick up the network domain of 
the zone.

OR

Explicit set:
1) Create the zone w/o specifying the domain.
2) when call createNetwork, pass networkDomain=<networkDomain> param to 
createNetwork call explicitly. 
                
> DNS value in Zone is not getting set on the Network created for the Zone
> ------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3754
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3754
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: UI
>            Reporter: Soheil Eizadi
>            Assignee: Alena Prokharchyk
>
> I found that the DNS Network Domain set for Basic Networking is not getting 
> passed down to Network Plugins. I am trying to figure out how DNS Network 
> Domain is suppose to work for my plugin integration.
> I was getting a NULL value for Basic Networking for the DNS Domain even 
> though I had set a value for it in the Wizard. After I set the value in the 
> database, it seems to be working but wanted to understand why it was not 
> set,I found code in the system that enforces this behavior, when I try to set 
> it from the API.
> -Soheil
> More detail logs .....
>  The Domain is set in the Zone Setting to acme.com:
> > list zones
> count = 1
> zone:
> name = testzone
> ..
> domain = acme.com
> ..
> It does not get passed down to the attached network.
> API call "list networks" missing networkdomain field as it is NULL.
> > list networks
> count = 1
> network:
> id = 1065fff0-a6e2-410a-94d5-50bc72f879db
> name = defaultGuestNetwork
> acltype = Domain
> broadcastdomaintype = Native
> .....
> I also tried to set it using API to set the value but get exception:
> ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-20:job-20) Unexpected 
> exception while executing 
> org.apache.cloudstack.api.command.user.network.UpdateNetworkCmd
> com.cloud.exception.InvalidParameterValueException: NetworkOffering and 
> domain suffix upgrade can be perfomed for Isolated networks only
> at 
> com.cloud.network.NetworkServiceImpl.updateGuestNetwork(NetworkServiceImpl.java:1982)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> Exception from here:
>         // network offering and domain suffix can be updated for Isolated 
> networks only in 3.0
>         if ((networkOfferingId != null || domainSuffix != null) && 
> network.getGuestType() != GuestType.Isolated) {
>             throw new InvalidParameterValueException("NetworkOffering and 
> domain suffix upgrade can be perfomed for Isolated networks only");
>         }
> I've patched the database and it works for me, trying to understand why we 
> have code to prevent it?
> > list networks
> count = 1
> network:
> id = 1065fff0-a6e2-410a-94d5-50bc72f879db
> name = defaultGuestNetwork
> ...
> networkdomain = acme.com
> ....
> INFO  [network.element.InfobloxElement] (consoleproxy-1:) 
> InfobloxDeviceElement called to prepare Host Name soheil-test with DNS Domain 
> acme.com Gateway null Netmask null with MAC 06:97:84:00:00:16 with IPv4 
> 172.16.197.161

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to