Machine interfaces allow '_' character, results on a interface based domain breaking bind (as it doesn't allow it for the host part).
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Tiago Pasqualini da Silva | ||
3.0 |
Won't Fix
|
Medium
|
Unassigned | ||
3.1 |
Fix Released
|
Medium
|
Unassigned | ||
3.2 |
Fix Released
|
Medium
|
Jack Lloyd-Walters | ||
3.3 |
Fix Released
|
Medium
|
Alexsander de Souza |
Bug Description
MAAS with build in bind stops resolving domains when interface name contains _ character.
How to reproduce:
Please change network interface name for any machine using _ character inside.
Then please try to resolve that host name of machine with that interface using MAAS build in dns server.
Error occurs because _ character is not allowed in domains but MAAS creates dns record using interface name. Bind is unable do load file with bad characters. All records from that zone file can't be resolved.
Part of logs:
dns_rdata_fromtext: /etc/bind/
zone 0.48.10.
Zone file content (find word ph_admin - here is a problem):
; Zone file modified: 2018-12-10 14:55:54.606848.
$TTL 30
@ IN SOA maas. nobody.example.com. (
600 ; Refresh
1800 ; Retry
30 ; NXTTL
)
@ 30 IN NS maas.
31 30 IN PTR imaas31-ka.maas.
30 30 IN PTR imaas32-op.maas.
41 30 IN PTR ens18.idepceph4
40 30 IN PTR ph_admin.
32 30 IN PTR ens18.imaas32-
Proposal of repair:
Please add option to global setting so admin can choose between two options:
1. "_" is Allowed in interface name but it will be replaced by another character in domain name
2. "_" character is not allowed in interface name and field validation fails if it will be used
Checked on: 2.5.0~rc2 (7433-gea48d302
--
Regards,
Wojtek
Related branches
- MAAS Lander: Approve
- Mauricio Faria de Oliveira: Pending requested
-
Diff: 162 lines (+78/-4)6 files modifieddebian/changelog (+6/-0)
setup.cfg (+1/-1)
src/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/models/tests/test_staticipaddress.py (+43/-1)
src/maasserver/utils/dns.py (+10/-0)
src/maasserver/utils/tests/test_dns.py (+9/-0)
- Alexsander de Souza: Approve
- MAAS Lander: Approve
-
Diff: 138 lines (+73/-3)4 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/models/tests/test_staticipaddress.py (+45/-1)
src/maasserver/utils/dns.py (+10/-0)
src/maasserver/utils/tests/test_dns.py (+9/-0)
- Alexsander de Souza: Approve
- MAAS Lander: Approve
-
Diff: 138 lines (+73/-3)4 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/models/tests/test_staticipaddress.py (+45/-1)
src/maasserver/utils/dns.py (+10/-0)
src/maasserver/utils/tests/test_dns.py (+9/-0)
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 138 lines (+73/-3)4 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/models/tests/test_staticipaddress.py (+45/-1)
src/maasserver/utils/dns.py (+10/-0)
src/maasserver/utils/tests/test_dns.py (+9/-0)
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 138 lines (+73/-3)4 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/models/tests/test_staticipaddress.py (+45/-1)
src/maasserver/utils/dns.py (+10/-0)
src/maasserver/utils/tests/test_dns.py (+9/-0)
- MAAS Lander: Needs Fixing
- Björn Tillenius: Pending requested
-
Diff: 140 lines (+75/-3)4 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/models/tests/test_staticipaddress.py (+45/-1)
src/maasserver/utils/dns.py (+10/-0)
src/maasserver/utils/tests/test_dns.py (+11/-0)
- Björn Tillenius: Needs Information
- MAAS Lander: Approve
-
Diff: 139 lines (+74/-3)4 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/models/tests/test_staticipaddress.py (+45/-1)
src/maasserver/utils/dns.py (+10/-0)
src/maasserver/utils/tests/test_dns.py (+10/-0)
- MAAS Lander: Needs Fixing
- MAAS Maintainers: Pending requested
-
Diff: 49 lines (+19/-2)2 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-2)
src/maasserver/utils/dns.py (+10/-0)
summary: |
- Bind stopped resolving when using _ character is in interface name + [2.5] Machine interfaces allow '_' character, results on a interface + based domain breaking bind (as it doesn't allow it for the host part). |
Changed in maas: | |
importance: | Undecided → Medium |
milestone: | none → 2.5.1 |
Changed in maas: | |
milestone: | 2.5.1 → 2.5.2 |
Changed in maas: | |
milestone: | 2.5.2 → 2.5.3 |
Changed in maas: | |
milestone: | 2.5.3 → 2.6.0beta2 |
Changed in maas: | |
milestone: | 2.6.0beta2 → 2.6.0rc1 |
Changed in maas: | |
assignee: | nobody → Newell Jensen (newell-jensen) |
Changed in maas: | |
milestone: | 2.6.0rc1 → 2.6.0rc2 |
Changed in maas: | |
milestone: | 2.6.0rc2 → 2.7.0alpha1 |
Changed in maas: | |
assignee: | Newell Jensen (newell-jensen) → nobody |
milestone: | 2.7.0alpha1 → none |
status: | Incomplete → Triaged |
tags: | added: dns-modeling |
Changed in maas: | |
assignee: | nobody → Tiago Pasqualini da Silva (tiago.pasqualini) |
tags: | added: sts |
summary: |
- [2.5] Machine interfaces allow '_' character, results on a interface - based domain breaking bind (as it doesn't allow it for the host part). + Machine interfaces allow '_' character, results on a interface based + domain breaking bind (as it doesn't allow it for the host part). |
Changed in maas: | |
status: | Triaged → In Progress |
milestone: | none → 3.4.0 |
tags: | removed: bug-council |
tags: |
added: dns-modelling removed: dns-modeling |
tags: |
added: dns-modeling removed: dns-modelling |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.4.0 → 3.4.0-beta3 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Hi Wojtek,
Do you happen to have any reference about NIC naming? It seems wrong to me that linux would allow you to add NICs with the '_'.
That said, I don't agree with having a global option to change the behavior of this, provided that just leads to confusion and not the best experience. My inclination would be to simply prevent users from creating interface names that include the '_' character.