Soheil,

About network domain update. Changing network domain on the 
zone/account/domain/global level, will affect newly created networks only. It 
should stay this way. Once the network domain is determined and set for the 
network (during the network creation), it can be changed just by modifying the 
network itself via network offering update. Today its supported for Isolated 
networks only.

For Shared networks, there is currently no way to update the network domain as 
network offering update is not supported. We have to fix it, but not by 
applying global config change to the existing networks.

In case anyone interested on how the network domain is set for the network, 
here are the rules:

http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.0-incubating/html-single/Admin_Guide/#customizing-dns

Section  18.4 (copying here)

"The source of the network domain that is used depends on the following rules.

  *
For all networks, if a network domain is specified as part of a network's own 
configuration, that value is used.
  *
For an account-specific network, the network domain specified for the account 
is used. If none is specified, the system looks for a value in the domain, 
zone, and global configuration, in that order.
  *
For a domain-specific network, the network domain specified for the domain is 
used. If none is specified, the system looks for a value in the zone and global 
configuration, in that order.
  *
For a zone-specific network, the network domain specified for the zone is used. 
If none is specified, the system looks for a value in the global configuration."

In Basic zone, the UI passes the networkDomain to the createZone call only. 
When the guest network created in the zone, it picks up the networkDomain from 
the zone configuration. As Basic zone can't have more than one guest networks, 
its ok to default networkDomain of the network to the network domain of the 
zone.

-Alena.

From: Soheil Eizadi <seiz...@infoblox.com<mailto:seiz...@infoblox.com>>
Reply-To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" 
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Date: Wednesday, July 24, 2013 11:13 AM
To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" 
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Subject: RE: DNS Network Domain

Thanks, it will have to be part of a bigger change to also change the UI to 
update the Network when the Zone DNS Domain is updated.
-Soheil
________________________________________
From: Chiradeep Vittal 
[chiradeep.vit...@citrix.com<mailto:chiradeep.vit...@citrix.com>]
Sent: Tuesday, July 23, 2013 9:56 PM
To: dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>
Subject: Re: DNS Network Domain

Not sure. I don't think it will break anything to remove this check.

On 7/24/13 3:04 AM, "Soheil Eizadi" 
<seiz...@infoblox.com<mailto:seiz...@infoblox.com>> wrote:

Created Jira bug against this, was going to submit a UI patch:
https://issues.apache.org/jira/browse/CLOUDSTACK-3754

-Soheil
________________________________________
From: Soheil Eizadi [seiz...@infoblox.com<mailto:seiz...@infoblox.com>]
Sent: Tuesday, July 02, 2013 6:36 PM
To: dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>
Subject: DNS Network Domain

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$InterceptorD
ispatcher.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



Reply via email to