xfrin_notify_handling.feature 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. Feature: Xfrin incoming notify handling
  2. Tests for Xfrin incoming notify handling. They also test
  3. statistics counters incremented, which are related to notifying
  4. and transferring by Xfrout and receiveing by Xfrin. Some cases are
  5. considered: Transferring is done via IPv4 or IPv6 transport. A
  6. transfer request from Xfrin is rejected by Xfrout. The master
  7. server or slave server is unreachable.
  8. Scenario: Handle incoming notify
  9. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  10. And wait for master stderr message BIND10_STARTED_CC
  11. And wait for master stderr message CMDCTL_STARTED
  12. And wait for master stderr message AUTH_SERVER_STARTED
  13. And wait for master stderr message XFROUT_STARTED
  14. And wait for master stderr message ZONEMGR_STARTED
  15. And wait for master stderr message STATS_STARTING
  16. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  17. And wait for bind10 stderr message BIND10_STARTED_CC
  18. And wait for bind10 stderr message CMDCTL_STARTED
  19. And wait for bind10 stderr message AUTH_SERVER_STARTED
  20. And wait for bind10 stderr message XFRIN_STARTED
  21. And wait for bind10 stderr message ZONEMGR_STARTED
  22. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  23. #
  24. # Test1 for Xfrout statistics
  25. #
  26. wait for master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  27. check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
  28. | item_name | item_value |
  29. | socket.unixdomain.open | 1 |
  30. #
  31. # Test2 for Xfrin statistics
  32. #
  33. check initial statistics not containing example.org for Xfrin
  34. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  35. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  36. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  37. # From this point we can't reliably 'wait for new' because the ordering
  38. # of logs from different processes is unpredictable. But these
  39. # should be okay in this case.
  40. Then wait for bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  41. Then wait for bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  42. Then wait for bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  43. Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  44. Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
  45. A query for www.example.org to [::1]:47806 should have rcode NOERROR
  46. # Make sure handling statistics command handling checked below is
  47. # after this query
  48. And wait for bind10 stderr message AUTH_SEND_NORMAL_RESPONSE
  49. #
  50. # Test3 for Xfrout statistics
  51. #
  52. # check statistics change
  53. #
  54. # wait until the last stats requesting is finished
  55. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  56. # note that this does not 100% guarantee the stats updated Xfrout
  57. # statistics. But there doesn't seem to be a better log message that
  58. # suggests this event.
  59. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  60. last bindctl output should not contain "error"
  61. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  62. The statistics counters are 0 in category .Xfrout.zones except for the following items
  63. | item_name | item_value |
  64. | _SERVER_.notifyoutv6 | 1 |
  65. | _SERVER_.xfrreqdone | 1 |
  66. | example.org..notifyoutv6 | 1 |
  67. | example.org..xfrreqdone | 1 |
  68. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  69. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  70. | item_name | item_value |
  71. | open | 1 |
  72. | accept | 1 |
  73. #
  74. # Test4 for Xfrin statistics
  75. #
  76. # check statistics change
  77. #
  78. # wait until the last stats requesting is finished
  79. When I query statistics zones of bind10 module Xfrin with cmdctl
  80. wait for new bind10 stderr message XFRIN_RECEIVED_COMMAND
  81. last bindctl output should not contain "error"
  82. When I query statistics zones of bind10 module Xfrin with cmdctl
  83. The statistics counters are 0 in category .Xfrin.zones except for the following items
  84. | item_name | item_value | min_value |
  85. | _SERVER_.soaoutv6 | 1 | |
  86. | _SERVER_.axfrreqv6 | 1 | |
  87. | _SERVER_.xfrsuccess | 1 | |
  88. | _SERVER_.last_axfr_duration | | 0.0 |
  89. | example.org..soaoutv6 | 1 | |
  90. | example.org..axfrreqv6 | 1 | |
  91. | example.org..xfrsuccess | 1 | |
  92. | example.org..last_axfr_duration | | 0.0 |
  93. #
  94. # Test for handling incoming notify only in IPv4
  95. #
  96. Scenario: Handle incoming notify (IPv4)
  97. Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 47804 as master
  98. And wait for master stderr message BIND10_STARTED_CC
  99. And wait for master stderr message CMDCTL_STARTED
  100. And wait for master stderr message AUTH_SERVER_STARTED
  101. And wait for master stderr message XFROUT_STARTED
  102. And wait for master stderr message ZONEMGR_STARTED
  103. And wait for master stderr message STATS_STARTING
  104. And I have bind10 running with configuration xfrin/retransfer_slave_notify_v4.conf
  105. And wait for bind10 stderr message BIND10_STARTED_CC
  106. And wait for bind10 stderr message CMDCTL_STARTED
  107. And wait for bind10 stderr message AUTH_SERVER_STARTED
  108. And wait for bind10 stderr message XFRIN_STARTED
  109. And wait for bind10 stderr message ZONEMGR_STARTED
  110. A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
  111. #
  112. # Test1 for Xfrout statistics
  113. #
  114. wait for master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  115. check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
  116. | item_name | item_value |
  117. | socket.unixdomain.open | 1 |
  118. #
  119. # Test2 for Xfrin statistics
  120. #
  121. check initial statistics not containing example.org for Xfrin
  122. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  123. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  124. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  125. # From this point we can't reliably 'wait for new' because the ordering
  126. # of logs from different processes is unpredictable. But these
  127. # should be okay in this case.
  128. Then wait for bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  129. Then wait for bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  130. Then wait for bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  131. Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  132. Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
  133. A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
  134. # Make sure handling statistics command handling checked below is
  135. # after this query
  136. And wait for bind10 stderr message AUTH_SEND_NORMAL_RESPONSE
  137. #
  138. # Test3 for Xfrout statistics
  139. #
  140. # check statistics change
  141. #
  142. # wait until the last stats requesting is finished
  143. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  144. # note that this does not 100% guarantee the stats updated Xfrout
  145. # statistics. But there doesn't seem to be a better log message that
  146. # suggests this event.
  147. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  148. last bindctl output should not contain "error"
  149. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  150. The statistics counters are 0 in category .Xfrout.zones except for the following items
  151. | item_name | item_value |
  152. | _SERVER_.notifyoutv4 | 1 |
  153. | _SERVER_.xfrreqdone | 1 |
  154. | example.org..notifyoutv4 | 1 |
  155. | example.org..xfrreqdone | 1 |
  156. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  157. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  158. | item_name | item_value |
  159. | open | 1 |
  160. | accept | 1 |
  161. #
  162. # Test4 for Xfrin statistics
  163. #
  164. # check statistics change
  165. #
  166. # wait until the last stats requesting is finished
  167. When I query statistics zones of bind10 module Xfrin with cmdctl
  168. wait for new bind10 stderr message XFRIN_RECEIVED_COMMAND
  169. last bindctl output should not contain "error"
  170. When I query statistics zones of bind10 module Xfrin with cmdctl
  171. The statistics counters are 0 in category .Xfrin.zones except for the following items
  172. | item_name | item_value | min_value |
  173. | _SERVER_.soaoutv4 | 1 | |
  174. | _SERVER_.axfrreqv4 | 1 | |
  175. | _SERVER_.xfrsuccess | 1 | |
  176. | _SERVER_.last_axfr_duration | | 0.0 |
  177. | example.org..soaoutv4 | 1 | |
  178. | example.org..axfrreqv4 | 1 | |
  179. | example.org..xfrsuccess | 1 | |
  180. | example.org..last_axfr_duration | | 0.0 |
  181. #
  182. # Test for Xfr request rejected
  183. #
  184. Scenario: Handle incoming notify (XFR request rejected)
  185. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  186. And wait for master stderr message BIND10_STARTED_CC
  187. And wait for master stderr message CMDCTL_STARTED
  188. And wait for master stderr message AUTH_SERVER_STARTED
  189. And wait for master stderr message XFROUT_STARTED
  190. And wait for master stderr message ZONEMGR_STARTED
  191. And wait for master stderr message STATS_STARTING
  192. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  193. And wait for bind10 stderr message BIND10_STARTED_CC
  194. And wait for bind10 stderr message CMDCTL_STARTED
  195. And wait for bind10 stderr message AUTH_SERVER_STARTED
  196. And wait for bind10 stderr message XFRIN_STARTED
  197. And wait for bind10 stderr message ZONEMGR_STARTED
  198. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  199. #
  200. # Test1 for Xfrout statistics
  201. #
  202. wait for master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  203. check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
  204. | item_name | item_value |
  205. | socket.unixdomain.open | 1 |
  206. #
  207. # Test2 for Xfrin statistics
  208. #
  209. check initial statistics not containing example.org for Xfrin
  210. #
  211. # set transfer_acl rejection
  212. # Local xfr requests from Xfrin module would be rejected here.
  213. #
  214. When I send bind10 the following commands with cmdctl port 47804
  215. """
  216. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
  217. config commit
  218. """
  219. last bindctl output should not contain Error
  220. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  221. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  222. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  223. # can't use 'wait for new' below.
  224. Then wait for bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  225. Then wait for bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  226. Then wait for bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_TRANSFER_SUCCESS
  227. Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  228. Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
  229. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  230. #
  231. # Test3 for Xfrout statistics
  232. #
  233. # check statistics change
  234. #
  235. # wait until the last stats requesting is finished
  236. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  237. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  238. last bindctl output should not contain "error"
  239. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  240. The statistics counters are 0 in category .Xfrout.zones except for the following items
  241. | item_name | item_value | min_value | max_value |
  242. | _SERVER_.notifyoutv6 | 1 | | |
  243. | _SERVER_.xfrrej | | 1 | 3 |
  244. | example.org..notifyoutv6 | 1 | | |
  245. | example.org..xfrrej | | 1 | 3 |
  246. # Note: The above rejection counters might sometimes be increased
  247. # up to 3. See this for details
  248. # http://git.bind10.isc.org/~tester/builder/BIND10-lettuce/20120918210000-MacOS/logs/lettuce.out
  249. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  250. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  251. | item_name | item_value |
  252. | open | 1 |
  253. | accept | 1 |
  254. #
  255. # Test4 for Xfrin statistics
  256. #
  257. # check statistics change
  258. #
  259. # wait until the last stats requesting is finished
  260. When I query statistics zones of bind10 module Xfrin with cmdctl
  261. wait for new bind10 stderr message XFRIN_RECEIVED_COMMAND
  262. last bindctl output should not contain "error"
  263. When I query statistics zones of bind10 module Xfrin with cmdctl
  264. The statistics counters are 0 in category .Xfrin.zones except for the following items
  265. | item_name | item_value |
  266. | _SERVER_.soaoutv6 | 1 |
  267. | _SERVER_.axfrreqv6 | 1 |
  268. | _SERVER_.xfrfail | 1 |
  269. | example.org..soaoutv6 | 1 |
  270. | example.org..axfrreqv6 | 1 |
  271. | example.org..xfrfail | 1 |
  272. #
  273. # Test for Xfr request rejected in IPv4
  274. #
  275. Scenario: Handle incoming notify (XFR request rejected in IPv4)
  276. Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 47804 as master
  277. And wait for master stderr message BIND10_STARTED_CC
  278. And wait for master stderr message CMDCTL_STARTED
  279. And wait for master stderr message AUTH_SERVER_STARTED
  280. And wait for master stderr message XFROUT_STARTED
  281. And wait for master stderr message ZONEMGR_STARTED
  282. And wait for master stderr message STATS_STARTING
  283. And I have bind10 running with configuration xfrin/retransfer_slave_notify_v4.conf
  284. And wait for bind10 stderr message BIND10_STARTED_CC
  285. And wait for bind10 stderr message CMDCTL_STARTED
  286. And wait for bind10 stderr message AUTH_SERVER_STARTED
  287. And wait for bind10 stderr message XFRIN_STARTED
  288. And wait for bind10 stderr message ZONEMGR_STARTED
  289. A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
  290. #
  291. # Test1 for Xfrout statistics
  292. #
  293. wait for master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  294. check initial statistics not containing example.org for Xfrout with cmdctl port 47804 except for the following items
  295. | item_name | item_value |
  296. | socket.unixdomain.open | 1 |
  297. #
  298. # Test2 for Xfrin statistics
  299. #
  300. check initial statistics not containing example.org for Xfrin
  301. #
  302. # set transfer_acl rejection
  303. # Local xfr requests from Xfrin module would be rejected here.
  304. #
  305. When I send bind10 the following commands with cmdctl port 47804
  306. """
  307. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "127.0.0.1"}]
  308. config commit
  309. """
  310. last bindctl output should not contain Error
  311. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  312. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  313. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  314. # can't use 'wait for new' below.
  315. Then wait for bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  316. Then wait for bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  317. Then wait for bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_TRANSFER_SUCCESS
  318. Then wait for bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  319. Then wait for master stderr message NOTIFY_OUT_REPLY_RECEIVED
  320. A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
  321. #
  322. # Test3 for Xfrout statistics
  323. #
  324. # check statistics change
  325. #
  326. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  327. # wait until stats request at least after NOTIFY_OUT_REPLY_RECEIVED
  328. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  329. last bindctl output should not contain "error"
  330. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  331. The statistics counters are 0 in category .Xfrout.zones except for the following items
  332. | item_name | item_value | min_value | max_value |
  333. | _SERVER_.notifyoutv4 | 1 | | |
  334. | _SERVER_.xfrrej | | 1 | 3 |
  335. | example.org..notifyoutv4 | 1 | | |
  336. | example.org..xfrrej | | 1 | 3 |
  337. # Note: The above rejection counters might sometimes be increased
  338. # up to 3. See this for details
  339. # http://git.bind10.isc.org/~tester/builder/BIND10-lettuce/20120918210000-MacOS/logs/lettuce.out
  340. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  341. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  342. | item_name | item_value |
  343. | open | 1 |
  344. | accept | 1 |
  345. #
  346. # Test4 for Xfrin statistics
  347. #
  348. # check statistics change
  349. #
  350. # wait until the last stats requesting is finished
  351. When I query statistics zones of bind10 module Xfrin with cmdctl
  352. wait for new bind10 stderr message XFRIN_RECEIVED_COMMAND
  353. last bindctl output should not contain "error"
  354. When I query statistics zones of bind10 module Xfrin with cmdctl
  355. The statistics counters are 0 in category .Xfrin.zones except for the following items
  356. | item_name | item_value |
  357. | _SERVER_.soaoutv4 | 1 |
  358. | _SERVER_.axfrreqv4 | 1 |
  359. | _SERVER_.xfrfail | 1 |
  360. | example.org..soaoutv4 | 1 |
  361. | example.org..axfrreqv4 | 1 |
  362. | example.org..xfrfail | 1 |
  363. #
  364. # Test for unreachable slave
  365. #
  366. Scenario: Handle incoming notify (unreachable slave)
  367. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  368. And wait for master stderr message BIND10_STARTED_CC
  369. And wait for master stderr message CMDCTL_STARTED
  370. And wait for master stderr message AUTH_SERVER_STARTED
  371. And wait for master stderr message XFROUT_STARTED
  372. And wait for master stderr message ZONEMGR_STARTED
  373. And wait for master stderr message STATS_STARTING
  374. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  375. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  376. Then wait for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  377. Then wait for new master stderr message NOTIFY_OUT_TIMEOUT
  378. #
  379. # Test1 for Xfrout statistics
  380. #
  381. # check statistics change
  382. #
  383. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  384. # wait until stats request at least after NOTIFY_OUT_TIMEOUT
  385. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  386. last bindctl output should not contain "error"
  387. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  388. The statistics counters are 0 in category .Xfrout.zones except for the following items
  389. | item_name | min_value | max_value |
  390. | _SERVER_.notifyoutv6 | 1 | 5 |
  391. | example.org..notifyoutv6 | 1 | 5 |
  392. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  393. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  394. | item_name | item_value |
  395. | open | 1 |
  396. #
  397. # Test for NOTIFY that would result in NOTAUTH
  398. #
  399. Scenario: Handle incoming notify that does match authoritative zones
  400. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  401. And wait for master stderr message BIND10_STARTED_CC
  402. And wait for master stderr message CMDCTL_STARTED
  403. And wait for master stderr message AUTH_SERVER_STARTED
  404. And wait for master stderr message XFROUT_STARTED
  405. And wait for master stderr message ZONEMGR_STARTED
  406. And wait for master stderr message STATS_STARTING
  407. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  408. And wait for bind10 stderr message BIND10_STARTED_CC
  409. And wait for bind10 stderr message CMDCTL_STARTED
  410. And wait for bind10 stderr message AUTH_SERVER_STARTED
  411. And wait for bind10 stderr message XFRIN_STARTED
  412. And wait for bind10 stderr message ZONEMGR_STARTED
  413. #
  414. # replace master's data source with unmatched zone for slave's zone.
  415. # we restart Xfrout to make it sure.
  416. #
  417. When I send bind10 the following commands with cmdctl port 47804
  418. """
  419. config set data_sources/classes/IN[0]/params/database_file data/ixfr-out/zones.sqlite3
  420. config set Auth/database_file data/ixfr-out/zones.sqlite3
  421. config set Xfrout/zone_config[0]/origin example.com
  422. config commit
  423. Xfrout shutdown
  424. """
  425. last bindctl output should not contain "error"
  426. And wait for new master stderr message XFROUT_STARTED
  427. A query for www.example.com to [::1]:47806 should have rcode REFUSED
  428. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.com IN
  429. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  430. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY_NOTAUTH
  431. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  432. A query for www.example.com to [::1]:47806 should have rcode REFUSED
  433. #
  434. # Test for NOTIFY that's not in the secondaries list
  435. #
  436. Scenario: Handle incoming notify that is not in the secondaries list
  437. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  438. And wait for master stderr message BIND10_STARTED_CC
  439. And wait for master stderr message CMDCTL_STARTED
  440. And wait for master stderr message AUTH_SERVER_STARTED
  441. And wait for master stderr message XFROUT_STARTED
  442. And wait for master stderr message ZONEMGR_STARTED
  443. And wait for master stderr message STATS_STARTING
  444. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  445. And wait for bind10 stderr message BIND10_STARTED_CC
  446. And wait for bind10 stderr message CMDCTL_STARTED
  447. And wait for bind10 stderr message AUTH_SERVER_STARTED
  448. And wait for bind10 stderr message XFRIN_STARTED
  449. And wait for bind10 stderr message ZONEMGR_STARTED
  450. #
  451. # Empty slave's secondaries list, and restart zonemgr to make it sure
  452. #
  453. When I send bind10 the following commands with cmdctl
  454. """
  455. config remove Zonemgr/secondary_zones[0]
  456. config commit
  457. Zonemgr shutdown
  458. """
  459. last bindctl output should not contain "error"
  460. And wait for new bind10 stderr message ZONEMGR_STARTED
  461. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  462. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  463. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  464. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  465. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  466. Then wait for new bind10 stderr message ZONEMGR_ZONE_NOTIFY_NOT_SECONDARY
  467. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  468. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  469. #
  470. # Test for NOTIFY when zonemgr is not running
  471. #
  472. Scenario: Handle incoming notify while zonemgr is not running
  473. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  474. And wait for master stderr message BIND10_STARTED_CC
  475. And wait for master stderr message CMDCTL_STARTED
  476. And wait for master stderr message AUTH_SERVER_STARTED
  477. And wait for master stderr message XFROUT_STARTED
  478. And wait for master stderr message ZONEMGR_STARTED
  479. And wait for master stderr message STATS_STARTING
  480. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  481. And wait for bind10 stderr message BIND10_STARTED_CC
  482. And wait for bind10 stderr message CMDCTL_STARTED
  483. And wait for bind10 stderr message AUTH_SERVER_STARTED
  484. And wait for bind10 stderr message XFRIN_STARTED
  485. And wait for bind10 stderr message ZONEMGR_STARTED
  486. # remove zonemgr from the system. a subsequent notify is ignored, but
  487. # an error message shouldn't be logged at auth.
  488. When I send bind10 the following commands with cmdctl
  489. """
  490. config remove Init/components b10-zonemgr
  491. config commit
  492. """
  493. last bindctl output should not contain "error"
  494. And wait for new bind10 stderr message BIND10_PROCESS_ENDED
  495. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  496. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  497. Then wait for master stderr message XFROUT_NOTIFY_COMMAND
  498. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  499. Then wait for new bind10 stderr message AUTH_ZONEMGR_NOTEXIST not AUTH_ZONEMGR_ERROR
  500. Then wait for master stderr message NOTIFY_OUT_TIMEOUT not NOTIFY_OUT_REPLY_RECEIVED
  501. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN