xfrin_notify_handling.feature 26 KB

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