Allow DNS on VPC tiers (override) and make VPC DNS updatable via updateVPC
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Domaine
- backend-api-design, cloud, networking
Piste de recherche
Start with NetworkServiceImpl.checkNetworkDns and checkAndUpdateNetworkDns, then trace NetworkModelImpl.getNetworkIp4Dns and CommandSetupHelper. Review the test_network_vpc_custom_dns.py coverage and the updateVPC and tier UI entry points. Done means tier DNS can override or inherit VPC DNS, updateVPC supports IPv4/IPv6 DNS, and router rendering and restart behavior are verified.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
As a user of VPCs I would like to set custom DNS servers on an individual VPC tier, with the VPC's DNS as the default when a tier has none, and I would like to change a VPC's DNS after creation via updateVPC. Today both are refused, while isolated networks already support both, and the VPC virtual router already renders DNS per tier interface.
Current behaviour (4.22.1.1, verified against a live install and source)
| Call | Result |
|---|---|
createVPC with dns1/dns2 |
accepted; tiers created afterwards inherit the values (since #8621) |
createNetwork with vpcid + dns1/dns2 |
refused: DNS can not be specified for a VPC tier |
updateNetwork on a tier + dns1/dns2 |
refused with the same message, asynchronously (job fails) |
updateVPC + dns1/dns2 |
parameters do not exist; the values are ignored and the VPC keeps its original DNS |
updateNetwork on an isolated network + dns1/dns2 |
accepted; the row is updated and the network is restarted to re-render the VR |
Why this looks like an oversight rather than a design limit
-
The feature's own PR says tiers were in scope. #6425 (4.18) describes itself as adding custom DNS "for isolated network, shared network and VPC tier", and its Marvin test is named
test_network_vpc_custom_dns.py. The refusal for tiers has nonetheless been present since 4.18.0.0. I could not find a review comment on #6425 explaining the exclusion. -
The refusal is a single unconditional check, not a setting or an offering capability.
NetworkServiceImpl.checkNetworkDns:if (vpcId != null) { throw new InvalidParameterValueException("DNS can not be specified for a VPC tier"); }It is reached from both
createNetworkand, viacheckAndUpdateNetworkDns, fromupdateNetwork. -
Everything downstream of the check already handles per-tier DNS:
- Tier networks are rows in the same
networkstable as isolated networks, with the samedns1/dns2/ip6_dns1/ip6_dns2columns. Since #8621 the VPC's values are written into each tier row at create. NetworkModelImpl.getNetworkIp4Dnsresolves network row → VPC → zone, so a tier with its own value already takes precedence over the VPC value.CommandSetupHelperpasses the resolved DNS to the VR per guest network, and the VR renders onedhcp-option=tag:interface-ethN,6,...line per tier interface. The dnsmasq config pasted in #8621 shows three tiers of one VPC with two different resolver lists.checkAndUpdateNetworkDnsalready diffs, writes the row and flags a restart; for a tier it only fails because it calls the same check.
For the tier half, the change appears to be: remove the
vpcId != nullbranch, expose the fields in the UI's tier forms, and confirm that a (non-cleanup) tier restart re-renders the tier's dnsmasq options. I have not verified that last point. - Tier networks are rows in the same
What is genuinely missing (the VPC half)
updateVPChas nodns1/dns2/ip6dns1/ip6dns2parameters.- Because #8621 copies the VPC's DNS into each tier row at create, a later VPC change cannot tell a tier that inherited the value from one that set the same value explicitly. A cascade needs an "inherit" representation, for example NULL on the tier meaning "follow the VPC", with
getNetworkIp4Dnsalready providing the fallback. That is a small design decision rather than a guard removal, and the reason I am filing this as a request rather than a PR.
Proposed behaviour
createNetwork/updateNetworkon a VPC tier acceptdns1/dns2(and the IPv6 pair where the tier is IPv6-enabled), subject to the offering carrying theDnsservice exactly as isolated networks are.- A tier with no DNS of its own follows the VPC; a tier with DNS set keeps its own.
updateVPCacceptsdns1/dns2/ip6dns1/ip6dns2; tiers that follow the VPC pick up the change; the change is applied to running routers on VPC restart, as the isolated-network update does today.- Semantics as for isolated networks: the new values reach guests on their next DHCP lease, so running guests see them after a renew or reboot.
Question for maintainers
If the tier refusal exists to protect a configuration where tiers are not served by the VPC VR (for example NSX or Netris backed VPCs), then the request is to narrow the check to those providers rather than to all VPCs.
Versions checked: 4.18.0.0, 4.19.0.0, 4.22.1.1, 4.23.0.0 (the check is identical in all four).
Related: #6425 (adds custom DNS, 4.18), #8598 / #8621 (tiers inherit VPC DNS, 4.19).
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 7 j 5 h
- PR mergées (30 j)
- 28
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/cloudstack
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
apache/cloudstack#14222 ·
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Ouvertebug component:kubernetes
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
apache/cloudstack#14070 · 5 commentaires ·
-
component:backup
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Ouvertebug component:ceph
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/cloudstack#13989 · 3 commentaires ·
Toutes les issues de apache/cloudstack
Issues similaires
-
[BUG]茶杯方块在取茶时会引发崩溃 Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Ouverte1.0.0-alpha2 Type/Improvement
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
wso2/dpdp-accelerator#272 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100