Get to the "testing" phase of automated generation:
- Read Netbox API
- Dump includable records and reverse records for Management interfaces
- Test and verify produced records against manually maintained records
Get to the "testing" phase of automated generation:
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • crusnov | T228387 Bare metal cloud: management interfaces | |||
Resolved | Volans | T233183 Automate generation of Management DNS records from Netbox | |||
Resolved | • crusnov | T243362 Integrate automated DNS snippets into CI |
Change 579239 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: fix CWD for runuser execution
Change 579239 merged by jenkins-bot:
[operations/cookbooks@master] sre.dns.netbox: fix CWD for runuser execution
Change 579242 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: add missing -- to runuser commands
Change 579242 merged by jenkins-bot:
[operations/cookbooks@master] sre.dns.netbox: add missing -- to runuser commands
Change 579249 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/netbox-extras@master] dns: add prefix to metadata
Change 579251 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: properly read metadata line
Change 579249 merged by Volans:
[operations/software/netbox-extras@master] dns: add prefix to metadata
Change 579251 merged by jenkins-bot:
[operations/cookbooks@master] sre.dns.netbox: properly read metadata line
Change 579254 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: exit early if no changes
Change 579254 merged by jenkins-bot:
[operations/cookbooks@master] sre.dns.netbox: exit early if no changes
Change 579271 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: fix metadata detection in output
Change 579271 merged by jenkins-bot:
[operations/cookbooks@master] sre.dns.netbox: fix metadata detection in output
Change 579336 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: improve logging
Change 579336 merged by jenkins-bot:
[operations/cookbooks@master] sre.dns.netbox: improve logging
Change 580954 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] Remove host mgmt records for decommissioning hosts
Change 580955 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] Remove all mgmt records for offline hosts
Change 580956 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] Fix typos
Change 580954 merged by Dzahn:
[operations/dns@master] Remove host mgmt records for decommissioning hosts
@BBlack @crusnov This is the script I use to compare the results P10716 both ways.
These is the output checking that all ops/dns repo records are present in the generated ones: P10718
This is the output checking that all netbox generated records are present in the operation/dns repo: P10717
The diff includes the changes in https://gerrit.wikimedia.org/r/c/operations/dns/+/580955 as if they were already merged.
I've opened T248035 to have the records for frack fixed.
Change 580955 merged by Volans:
[operations/dns@master] Remove all mgmt records for offline hosts
Change 583109 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: deploy the changes to gdnsd
In relation to https://gerrit.wikimedia.org/r/c/operations/cookbooks/+/583109 I've just tested the command on a single host, this is the result:
root@dns4002:~# cd /srv/authdns/git && utils/deploy-check.py -g /srv/git/netbox_dns_snippets --deploy Assembling and testing data in /tmp/dns-check.45j_ldfk -- Generating zonefiles from zone templates -- Processed 203 zones into directory /tmp/dns-check.45j_ldfk/zones -- Copying automatically generated zone files under target tree -- Copying repo-driven real config files and admin_state -- Copying puppetized config and GeoIP from /etc/gdnsd -- Checking for illegal tabs in zonefiles OK: No tabs -- Running zone_validator to check WMF rules Summary of violations: W001|MISSING_IP_FOR_NAME_AND_PTR: 381 W002|MISSING_PTR_FOR_NAME_AND_IP: 47 W101|MISSING_ASSET_TAG: 262 W103|MISSING_MGMT_FOR_NAME: 415 W104|TOO_FEW_MGMT_NAMES: 394 W105|TOO_MANY_PUBLIC_NAMES: 23 RESULT: 0 Errors, 1522 Warnings, 0 Ignored violations, 0 Ignored lines -- Running /usr/sbin/gdnsd checkconf on /tmp/dns-check.45j_ldfk -- Preflight checkconf is OK Deploying from /tmp/dns-check.45j_ldfk to system dirs -- Descending to subdirectory: netbox -- Done with subdir: netbox No action needed, zones and config files unchanged OK
Change 583109 merged by Volans:
[operations/cookbooks@master] sre.dns.netbox: deploy the changes to gdnsd
Change 583676 had a related patch set uploaded (by Volans; owner: Volans):
[operations/cookbooks@master] sre.dns.netbox: pull the specific SHA1
Change 583676 merged by jenkins-bot:
[operations/cookbooks@master] sre.dns.netbox: pull the specific SHA1
Change 585545 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt: use netbox-generated data for ulsfo
Change 599948 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/netbox-extras@master] dns: add support for virtual machines
Change 599948 merged by Volans:
[operations/software/netbox-extras@master] dns: add support for virtual machines
Change 585545 merged by Volans:
[operations/dns@master] mgmt: use netbox-generated data for ulsfo
Mentioned in SAL (#wikimedia-operations) [2020-06-01T14:44:42Z] <volans> deploying ulsfo mgmt DNS records automatically generated by Netbox ( operations/dns/+/585545/ ) - T233183
Change 601434 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt: use netbox-generated data for eqsin mgmt
Change 601877 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/netbox-extras@master] scripts: add support for primary IP generation
Change 601434 merged by Volans:
[operations/dns@master] mgmt: use netbox-generated data for eqsin mgmt
Mentioned in SAL (#wikimedia-operations) [2020-06-09T18:36:44Z] <volans> migrated mgmt DNS records in eqsin to the Netbox-generated records - T233183
Change 604136 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt: use netbox-generated data for esams mgmt
Change 604136 merged by Volans:
[operations/dns@master] mgmt: use netbox-generated data for esams mgmt
Mentioned in SAL (#wikimedia-operations) [2020-06-15T09:42:48Z] <volans> deploying esams mgmt DNS records automatically generated by Netbox ( operations/dns/+/604136/ ) - T233183
Change 601877 merged by Volans:
[operations/software/netbox-extras@master] scripts: complete interface automation generation
Change 605853 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/netbox-extras@master] scripts: add esams to the mgmt migrated list
Change 605853 merged by Volans:
[operations/software/netbox-extras@master] scripts: add esams to the mgmt migrated list
Nice, this is what we pretty much had in mind, although in the future of course if we add more prefixes or change them we'll have to reserve them manually or whatever.
Yes. We could make it a netbox custom script and re-run every time a new prefix is created, if it matches the criteria as it's idempotent.
Mentioned in SAL (#wikimedia-operations) [2020-06-19T08:45:47Z] <volans> backup netbox and run one-time script to reserve first IPs on all infra prefixes on Netbox - T233183
I've run the script in production, you can see the output of the script in P11603 and the results in Netbox in two ways:
In case of any immediate issue there is a backup on netboxdb1001 taken right before running the script in /srv/postgres-backup/volans.pre.reserve.ips.T233183.psql-all-dbs-20200619.sql.gz.bak.
I've created this one-off script and run it on the af-netbox test instance to cleanup ifaces and addresses from existing offline devices: P11631
Mentioned in SAL (#wikimedia-operations) [2020-06-22T22:12:34Z] <volans> cleanup interfaces and addresses in Netbox for offline servers - T233183
Change 607741 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt: netbox-generated data for frack mgmt codfw
Change 607741 merged by CRusnov:
[operations/dns@master] mgmt: netbox-generated data for frack mgmt codfw
Mentioned in SAL (#wikimedia-operations) [2020-07-09T17:42:35Z] <chaomodus> codfw frack management dns automation deployment complete T233183
Change 612472 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt: netbox-generated data for frack mgmt eqiad
Change 612472 merged by Volans:
[operations/dns@master] mgmt: netbox-generated data for frack mgmt eqiad
Change 615668 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt: netbox-generated data for mgmt codfw
Change 617119 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/netbox-extras@master] dns: skip Netbox addresses without DNS name
Change 617119 merged by Volans:
[operations/software/netbox-extras@master] dns: check that primary addresses have DNS names
Mentioned in SAL (#wikimedia-operations) [2020-07-29T13:55:34Z] <volans> migrating *all* codfw mgmt DNS records to the autogenerated ones via Netbox - T233183
Change 615668 merged by Volans:
[operations/dns@master] mgmt: netbox-generated data for mgmt codfw
Change 617147 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/netbox-extras@master] scripts: codfw migrated to Netbox
Change 617147 merged by Volans:
[operations/software/netbox-extras@master] scripts: codfw migrated to Netbox
Change 617509 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt: netbox-generated data for mgmt eqiad
Change 619015 had a related patch set uploaded (by Volans; owner: Volans):
[operations/dns@master] mgmt codfw: migrated Papaul's IP to Netbox
Change 619015 merged by Volans:
[operations/dns@master] mgmt codfw: migrated Papaul's IP to Netbox
Mentioned in SAL (#wikimedia-operations) [2020-08-11T10:39:28Z] <volans> migrating *all* eqiad mgmt DNS records to the autogenerated ones via Netbox - T233183
Change 617509 merged by Volans:
[operations/dns@master] mgmt: netbox-generated data for mgmt eqiad
All management records are now generated via Netbox, related wikitech documentation updated (both the DNS/Netbox page and the Server Lifecycle one). Resolving
Change 641284 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[operations/dns@master] Move codfw private to Netbox automation
Change 641285 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[operations/dns@master] Move codfw public to Netbox automation
Change 641284 merged by Volans:
[operations/dns@master] Move codfw private to Netbox automation
Change 641285 merged by Volans:
[operations/dns@master] Move codfw public to Netbox automation
Change 643246 had a related patch set uploaded (by Jbond; owner: John Bond):
[operations/puppet@production] idp: swap primary passive
Change 643246 merged by Jbond:
[operations/puppet@production] idp: swap primary passive