xfrin_notify_handling.feature 31 KB

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