Hi,
please considder this ugly peace of my work I am now compiling into
cloudstack master VpcManagerImpl.createVpcPrivateGateway(..) that will
fix a bug:
{ // experimental block, this is a hack
// set vpc id in network to null
// might be needed for all types of broadcast domains
// the ugly hack is that vpc gateway nets are created as
guest network
// while they are not.
// A more permanent solution would be to define a type of
'gatewaynetwork'
// so that handling code is not mixed between the two
NetworkVO gatewaynet = _ntwkDao.findById(privateNtwk.getId());
gatewaynet.setVpcId(vpcId);
_ntwkDao.persist(gatewaynet);
}
the problem I want to solve is that vpc routers, when restarting
assign the ip of the gateway to their gw-interface [1]. this is a ip
conflict and it has bitten us. My first take was to create the network
without passing the vpc id but that lead to all kinds of errors so I
reverted. It seemed cleaner then this solution I am scheming for now.
If this doesn't lead to obvious errors in my environment I will commit
and be happy to again revert when integration tests fail. It is in any
case not a permanent solution.
Question: should the network for gateways be a special type that is
handled almost the same as guest network (except for in this case) or
is more refactoring needed?
in any case I think this is something that will have to be dealt with soon.
One consideration on the side: I want to add a next-hop field to the
cidrs on the gateway so that it is possible to create a network with
more vpcs that direct traffic to each other. The use case for this is
a vpc for a customers mangement network connected to one for
production and one for acceptance and one ....
please flame, criticize or pose your questions
[1] https://issues.apache.org/jira/browse/CLOUDSTACK-6485
--
Daan