xfrin_notify_handling.feature 29 KB

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