xfrin_notify_handling.feature 30 KB

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