satis egitimisatis egitimitengda.pro
Welcome, Guest
Username: Password: Remember me
This forum is dedicated to discussions around storage and networking in cloud computing.

TOPIC: Virtual Router Domain Configuration

Virtual Router Domain Configuration 2 years 1 month ago #8732

After trying to use the WebUI (using the guest.domain.suffix parameter) to configure my own domain on the virtual router, I wasn't able to get anywhere. I tried rebooting the management server as well, and rebooting the virtual router, to no avail.

Eventually, it was suggested on IRC that I manually SSH into the virtual router from the host on which it is running, to edit /etc/dnsmask.conf

I went ahead and did so (as root, sudo -s), changing the following three lines:
domain=cs1cloud.internal
dhcp-option=15,"cs1cloud.internal"
local=/cs1cloud.internal/
to
domain=cloud.mydomain.com
dhcp-option=15,"cloud.mydomain.com"
local=/cloud.mydomain.com/

Once these changes were made, I restarted dnsmasq from the command line (as root, sudo -s):
service dnsmasq restart

A few seconds later, I was able to ping instances from outside of CloudStack using the domain I specified in the dnsmasq.conf file (e.g. ping i-2-32-VM.cloud.mydomain.com). In other words, this worked, but it's a bit of a hack, and a problem is that after rebooting the virtual router, this breaks. My changes are overwritten with the default cs1compute.internal domain name.

Ultimately, the question is: Where can I change this value outside of the virtual router so that when I reboot the virtual router it gets the correct domain name? From where is the virtual router getting the domain information?
Last Edit: 2 years 1 month ago by michaeljsmalley+cloudstack@gmail.com.
The administrator has disabled public write access.

Re: Virtual Router Domain Configuration 2 years 1 month ago #8738

Just a quick update, I found where the domain that goes in /etc/dnsmasq.conf on the virtual router gets stored in the cloud MySQL database. It is in the networks table, and it can be UPDATED in the MySQL database like so:

To access the database (on the CloudStack database server):
mysql -u root -p
USE cloud;

To view the current value:
SELECT network_domain FROM networks WHERE traffic_type='Guest';

The output returned from this query should look something like this:
+-------------------+
| network_domain    |
+-------------------+
| cs1cloud.internal |
+-------------------+
1 row in set (0.00 sec)

We want to change this. To change the domain to your own domain (I use cloud.mydomain.com as an example):
UPDATE networks SET network_domain='cloud.mydomain.com' WHERE traffic_type='Guest';

Now, verify the change has been made:
SELECT network_domain FROM networks WHERE traffic_type='Guest';

The output returned from this query should look something like this:
+--------------------+
| network_domain     |
+--------------------+
| cloud.mydomain.com |
+--------------------+
1 row in set (0.00 sec)

The fact that this needs to be set manually appears to be a bug though, in that the network_domain value doesn't change even when guest.domain.suffix is set in the Global Configuration of the CloudStack WebUI.
The administrator has disabled public write access.
The following user(s) said Thank You: zybupt

Re: Virtual Router Domain Configuration 2 years 1 month ago #8740

  • ke4qqq
  • ke4qqq's Avatar
  • OFFLINE
  • Administrator
  • Posts: 620
  • Thank you received: 69
  • Karma: 22
I agree - it's a bug - do you mind filing that at bugs.cloud.com
The administrator has disabled public write access.

Re: Virtual Router Domain Configuration 2 years 1 month ago #8743

I've gone forth and done this here. For what it's worth (it is, or should be related) I also am posting where the guest.domain.suffix value from Global Configuration is stored in the cloud database.

It's in the configuration table in the cloud database. It can be queried like so:
select * from configuration where name='guest.domain.suffix';
+----------+----------+----------------+-------------------+--------------------+---------------------------------------------------------------------------+
| category | instance | component    | name                | value              | description                                                               |
+----------+----------+----------------+-------------------+--------------------+---------------------------------------------------------------------------+
| Network  | DEFAULT  | AgentManager | guest.domain.suffix | cloud.mydomain.com | Default domain name for vms inside virtualized networks fronted by router |
+----------+----------+--------------+---------------------+--------------------+---------------------------------------------------------------------------+
1 row in set (0.00 sec)
Last Edit: 2 years 1 month ago by michaeljsmalley+cloudstack@gmail.com.
The administrator has disabled public write access.

Re: Virtual Router Domain Configuration 1 year 4 months ago #12929

  • cmh
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Updating this. Mike's examples work well if you have one zone. With two zones, the updating requires a little more. Running his select command:
mysql> SELECT network_domain FROM networks WHERE traffic_type='Guest';
+--------------------+
| network_domain     |
+--------------------+
| cs1cloud.internal  |
| zone2.cloud.local  |
+--------------------+
2 rows in set (0.00 sec)

Updating using his command above updates both of those to the same domain name. To fix the first and preserve the second, the following command works:
UPDATE networks SET network_domain='zone1.cloud.local' WHERE data_center_id=1 AND traffic_type='Guest';

Adjust "data_center_id" as necessary to adjust the associated zone.

Pretty awesome that this bug remains a major release later. :P
Last Edit: 1 year 4 months ago by cmh.
The administrator has disabled public write access.
Time to create page: 0.309 seconds

Open@Citrix

Citrix supports the open source community via developer support and evangeslism. We have a number of developers and evangelists that participate actively in the open source community in Apache Cloudstack, OpenDaylight, Xen Project and XenServer. We also conduct educational activities via the Build A Cloud events held all over the world. 

Connect