xfrin_notify_handling.feature 27 KB

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