Re: Virtual Router doesn't start

2014-03-25 Thread Kambiz Darabi
I executed > update nics set device_id = 1 where id = 29; After restarting the router, the interfaces file now looks like this: root@r-19-VM:~# cat /etc/network/interfaces auto lo eth0 eth1 eth2 iface lo inet loopback iface eth0 inet static address 169.254.3.155 netmask 255.255.0.0 iface

Re: Virtual Router doesn't start

2014-03-25 Thread Kambiz Darabi
I updated nics.gateway for that network, but the VM still shows the same behaviour. If one compares interfaces: root@r-19-VM:~# cat /etc/network/interfaces auto lo eth0 eth1 eth2 iface lo inet loopback iface eth0 inet static address 169.254.1.242 netmask 255.255.0.0 iface eth1 inet stati

Re: Virtual Router doesn't start

2014-03-25 Thread Kambiz Darabi
Hi, select id, name, traffic_type, broadcast_domain_type, cidr, gateway, mode, state, removed from networks where id = 205; +-+-+--+---++-+--+---+-+ | id | name| traffic_type | broadcast_domain_type |

Re: Virtual Router doesn't start

2014-03-25 Thread Alena Prokharchyk
No, it doesn’t seem right to me having 2 nics with device id 0. But looks like they’ve got programmed to correct devices on the backend per your prev email? iface eth0 inet static address 169.254.1.59 netmask 255.255.0.0 iface eth1 inet static address 10.193.17.1 Netmask iface eth2 i

Re: Virtual Router doesn't start

2014-03-25 Thread Kambiz Darabi
Hi, select id,ip4_address,netmask,gateway,state,removed,network_id,reserver_name from nics where instance_id=19; ++---+---+-+---+-++--+ | id | ip4_address | netmask | gateway | state | rem

Re: Virtual Router doesn't start

2014-03-25 Thread Alena Prokharchyk
Kambiz, the debug statements below are for the case when eth1 is a control interface as it was in your old command. I’ve looked at the new command, eth1 is not control, its either public or guest eth0: - control iface eth0 inet static address 169.254.1.59 netmask 255.255.0.0 eth1: iface

Re: Virtual Router doesn't start

2014-03-25 Thread Alena Prokharchyk
Kambiz, can you please check the following: 1) Check if the gateway is set on control network: mysql> select gateway, cidr from networks where traffic_type=‘Control’; 2) For router control nic, check if network/gateway are set. Select gateway,netmask from nics where instance_id= and network_id

Re: Virtual Router doesn't start

2014-03-25 Thread Kambiz Darabi
Hi, I looked up the startup command of the old router instance which worked correctly: /usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/rundomrpre.sh -l r-7-VM -t all -d /var/lib/libvirt/images/r-7-VM-patchdisk -p %template=domP%name=r-7-VM%eth2ip=10.193.17.190%eth2mask=255.255.255.0%gate

Re: Virtual Router doesn't start

2014-03-24 Thread Alena Prokharchyk
I don’t think its relevant as the piece we’ve fixed, just eliminated static nat rule programming for non-existing vm. Missing netmask on eth1 doesn’t seem related to the problem (although we have to figure out why its missing), as the connection that fails, happening to link local 169.x eth0 interf

Re: Virtual Router doesn't start

2014-03-24 Thread Kambiz Darabi
Hi, thank you, the NullPointerException doesn't occur any more, but there still seems to be a problem during startup of the router. When I start the virtual router, it comes up, but in agent.log, there are lots of 'Could not connect to 169.254.1.x' messages. Then I logged into the virtual route

Re: Virtual Router doesn't start

2014-03-24 Thread Alena Prokharchyk
Yes, Kambiz, you followed up right, and vm id=15 is the culprit. If vm id=15 is expunged, we have to clear out the reference to it from user_ip_address table. Here is the flow: 1) Save the db dump. 2) Run the query to cleanup the reference: Update user_ip_address set one_to_one_nat=0, instance_id

Re: Virtual Router doesn't start

2014-03-24 Thread Kambiz Darabi
Hi, I hope I have understood what you wrote and created the following query correctly: select uip.vm_id, uip.network_id, uip.public_ip_address, n.state as nic_state, n.removed as nic_removed, vm.state as vm_state, vm.removed as vm_removed from user_ip_address uip join nics n on

Re: Virtual Router doesn't start

2014-03-24 Thread Alena Prokharchyk
Kambiz, can you please try one more thing. 1) Locate all the firewall rules for your guest network (205, right?) Select id, ip_address_id from firewall_rules where network_id=205; 2) Now get all static nat enabled ip addresses for those rules: Select vm_id, network_id from user_ip_address where

Re: Virtual Router doesn't start

2014-03-22 Thread Kambiz Darabi
Hi Alena, thank you for your help. The query returns no rows, i.e. nics.removed was not null, but I removed the row though to see what happens: a new virtual router was created which also couldn't be started due to the same NPE. I reverted the change by restoring from the dump. I have to mention

Re: Virtual Router doesn't start

2014-03-21 Thread Alena Prokharchyk
The error happens not because Ip is null, but because the nic in a certain network can¹t be found. Looks like there is some bug in VPC nic plug/unplug for Guest networks process. Kambiz, please do the following to fix it: 1) Stop the MS 2) Take the DB dump of cloud db in case you have to revert