[
https://issues.apache.org/jira/browse/CLOUDSTACK-2675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13673304#comment-13673304
]
Tomasz Zieba commented on CLOUDSTACK-2675:
------------------------------------------
I have found that there is a problem with INSERT SQL statement. When you are
creating vm machine and take a shared network, CloudStack create following sql
statements:
8 Query SET autocommit=0
8 Query SET SESSION TRANSACTION ISOLATION LEVEL READ
COMMITTED
8 Query SELECT 1
8 Query SET autocommit=1
8 Query SELECT vm_template.id, vm_template.format,
vm_template.unique_name, vm_template.name, vm_template.public,
vm_template.featured, vm_template.type, vm_template.url, vm_template.hvm,
vm_template.bits, vm_template.created, vm_template.removed,
vm_template.account_id, vm_template.checksum, vm_template.display_text,
vm_template.enable_password, vm_template.guest_os_id, vm_template.bootable,
vm_template.prepopulate, vm_template.cross_zones, vm_template.hypervisor_type,
vm_template.extractable, vm_template.source_template_id,
vm_template.template_tag, vm_template.uuid, vm_template.sort_key,
vm_template.enable_sshkey FROM vm_template WHERE vm_template.type = 'SYSTEM'
AND vm_template.hypervisor_type = 'XenServer' ORDER BY vm_template.id DESC
8 Query SET autocommit=1
9 Query SET autocommit=0
9 Query SET SESSION TRANSACTION ISOLATION LEVEL READ
COMMITTED
9 Query SELECT 1
9 Query SET autocommit=0
9 Query INSERT INTO vm_instance (vm_instance.id,
vm_instance.name, vm_instance.vnc_password, vm_instance.proxy_id,
vm_instance.proxy_assign_time, vm_instance.state,
vm_instance.private_ip_address, vm_instance.instance_name,
vm_instance.vm_template_id, vm_instance.guest_os_id, vm_instance.host_id,
vm_instance.last_host_id, vm_instance.pod_id, vm_instance.private_mac_address,
vm_instance.data_center_id, vm_instance.vm_type, vm_instance.ha_enabled,
vm_instance.limit_cpu_use, vm_instance.update_count, vm_instance.created,
vm_instance.update_time, vm_instance.domain_id, vm_instance.account_id,
vm_instance.service_offering_id, vm_instance.reservation_id,
vm_instance.hypervisor_type, vm_instance.uuid, vm_instance.type) VALUES (29,
_binary'r-29-VM', _binary'L2fmUmx6ikdjMva5WFwRleblZTgaCjdH8JPYTcAVmcQ=', null,
null, 'Stopped', null, _binary'r-29-VM', 1, 15, null, null, null, null, 1,
'DomainRouter', 1, 0, 0, '2013-06-03 14:27:17', null, 1, 1, 7, null,
'XenServer', _binary'29443e94-3960-4370-8970-4f2917bfb940', 'DomainRouter')
9 Query INSERT INTO domain_router
(domain_router.element_id, domain_router.public_ip_address,
domain_router.public_mac_address, domain_router.public_netmask,
domain_router.is_redundant_router, domain_router.priority,
domain_router.is_priority_bumpup, domain_router.redundant_state,
domain_router.stop_pending, domain_router.role, domain_router.template_version,
domain_router.scripts_version, domain_router.vpc_id, domain_router.id) VALUES
(2, null, null, null, 0, 0, 0, 'UNKNOWN', 0, 'VIRTUAL_ROUTER', null, null,
null, 29)
9 Query rollback
9 Query rollback
9 Query SET autocommit=1
There is a problem with " INSERT INTO domain_router " statement because the
definition of domain_router table is the following:
mysql> describe domain_router;
+---------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------+---------------------+------+-----+---------+-------+
| id | bigint(20) unsigned | NO | PRI | NULL | |
| element_id | bigint(20) unsigned | NO | MUL | NULL | |
| public_mac_address | varchar(17) | YES | | NULL | |
| public_ip_address | char(40) | YES | | NULL | |
| public_netmask | varchar(15) | YES | | NULL | |
| guest_netmask | varchar(15) | YES | | NULL | |
| guest_ip_address | char(40) | YES | | NULL | |
| network_id | bigint(20) unsigned | NO | | NULL | |
| is_redundant_router | int(1) unsigned | NO | | NULL | |
| priority | int(4) unsigned | YES | | NULL | |
| is_priority_bumpup | int(1) unsigned | NO | | NULL | |
| redundant_state | varchar(64) | NO | | NULL | |
| stop_pending | int(1) unsigned | NO | | NULL | |
| role | varchar(64) | NO | | NULL | |
| template_version | varchar(100) | YES | | NULL | |
| scripts_version | varchar(100) | YES | | NULL | |
| vpc_id | bigint(20) unsigned | YES | MUL | NULL | |
+---------------------+---------------------+------+-----+---------+-------+
As you can see the network_id value is missing in the insert statement.
Please correct this situation because there is not possible to create shared
networks.
PS: When i create shared network in CS 3.0.2 - evertything is OK, additionally
after upgrade from 3.0.2 to 4.0.2 - shared network is working but you can not
create new ones.
> Missing network_id on restarting/host adding to a new shared network
> --------------------------------------------------------------------
>
> Key: CLOUDSTACK-2675
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2675
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Network Controller
> Affects Versions: 4.0.2
> Environment: CloudStack 4.0.2,
> Reporter: Tomasz Zieba
>
> I have got the same situation as follows:
> http://mail-archives.apache.org/mod_mbox/cloudstack-users/201304.mbox/%[email protected]%3E
--
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