Opened 8 years ago
Closed 8 years ago
#1321 closed enhancement (complete)
Allow sending notify manually
Reported by: | vorner | Owned by: | jelte |
---|---|---|---|
Priority: | medium | Milestone: | Sprint-20120320 |
Component: | xfrout | Version: | |
Keywords: | Cc: | ||
CVSS Scoring: | Parent Tickets: | ||
Sensitive: | no | Defect Severity: | N/A |
Sub-Project: | DNS | Feature Depending on Ticket: | |
Estimated Difficulty: | 4 | Add Hours to Ticket: | 0 |
Total Hours: | 2 | Internal?: | no |
Description
If I modify the database by hand (or by some other means out of Bind10), I'd like to be able to send out notifies out. The code seems to be already in Xfrout, but not available to users.
Subtickets
Change History (12)
comment:1 Changed 8 years ago by shane
- Milestone changed from New Tasks to Year 3 Task Backlog
comment:2 Changed 8 years ago by jinmei
- Milestone changed from Year 3 Task Backlog to Next-Sprint-Proposed
comment:3 Changed 8 years ago by jelte
- Estimated Difficulty changed from 0 to 4
comment:4 Changed 8 years ago by jelte
- Milestone changed from Next-Sprint-Proposed to Sprint-20120320
comment:5 Changed 8 years ago by jelte
- Owner set to jelte
- Status changed from new to assigned
comment:6 Changed 8 years ago by jelte
- Owner changed from jelte to UnAssigned
- Status changed from assigned to reviewing
- Total Hours changed from 0 to 2
Ok, initially i was tempted to sneak it a bit more improvements, but those would be non-trivial and worthy of a separate ticket (mailed -dev about it: https://lists.isc.org/pipermail/bind10-dev/2012-March/003200.html)
So right now, I've changed the internal command name to 'notify' instead of 'zone_new_data_ready' and added it to the spec file for commands, so it shows up in bindctl.
notify_out's send_notify() call now also returns True or False, depending on whether the zone was found (so that bindctl ends up reporting an error if not).
comment:7 Changed 8 years ago by muks
- Owner changed from UnAssigned to muks
comment:8 follow-up: ↓ 11 Changed 8 years ago by muks
Hi jelte
+ { "command_name": "notify",
I guess it's not possible to use notify_out.ZONE_NEW_DATA_READY_CMD there? (Is the .spec file evaluated as Python code, or read as a JSON file?)
How about moving the following into send_notify() ?
+ if not zone_class: + zone_class = str(RRClass.IN())
The rest looks good.
comment:9 Changed 8 years ago by muks
- Owner changed from muks to jelte
comment:10 Changed 8 years ago by muks
jelte: When reviewing your branch, I found a couple of issues with the notify code. I've made a patch to fix it, but it needs to be reviewed. Will ask you on Jabber before today's meeting if I can push it to your branch (and you review it). :)
comment:11 in reply to: ↑ 8 Changed 8 years ago by jelte
Replying to muks:
Hi jelte
+ { "command_name": "notify",I guess it's not possible to use notify_out.ZONE_NEW_DATA_READY_CMD there? (Is the .spec file evaluated as Python code, or read as a JSON file?)
It's read as a JSON file, which we could in theory generate, but TBH, i think we generate too much already :p
How about moving the following into send_notify() ?
+ if not zone_class: + zone_class = str(RRClass.IN())
We could do that, but we'd still need the string translation to produce the correct error up in command_handler(), so it seems a bit superfluous.
The rest looks good.
Thanks, your changes are good to, i'll be merging this shortly
comment:12 Changed 8 years ago by jelte
- Resolution set to complete
- Status changed from reviewing to closed
Thanks for the review! sorry for not having taken over the two suggestions :)
Merged, closing ticket.
This will help an early adopter. See: https://lists.isc.org/pipermail/bind10-users/2012-February/000252.html