Commit 7441659
committed
Direct Routed networks: let VM deploys with security groups target L3 networks
Deploying an Instance with securitygroupids into an L3 (Direct Routed)
network failed with
'Can't create vm with security groups; security group feature is not
enabled per zone'
The message is misleading: the zone flag is only the first half of the
gate. checkSecurityGroupSupportForNetwork() also accepts a deploy when
one of the requested networks itself supports the SecurityGroup service
- but that check compared the guest type against Shared only, so an L3
network carrying the SecurityGroup service (as DefaultL3NetworkOffering
does) never qualified and the deploy fell through to the error.
Accept GuestType.L3 alongside Shared. Every other security group
touchpoint already treats L3 like Shared (offering validation, the
secondary-IP paths, the security_group.py dispatch); this deploy-time
gate was the one spot left behind. The zone-level securitygroupenabled
flag stays untouched - it selects the legacy shared-only zone mode,
which forbids public IP ranges and is exactly what a direct routed zone
must not be.1 parent 655530c commit 7441659
2 files changed
Lines changed: 33 additions & 1 deletion
File tree
- server/src
- main/java/com/cloud/network
- test/java/com/cloud/network
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3097 | 3097 | | |
3098 | 3098 | | |
3099 | 3099 | | |
3100 | | - | |
| 3100 | + | |
| 3101 | + | |
3101 | 3102 | | |
3102 | 3103 | | |
3103 | 3104 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
455 | 486 | | |
0 commit comments