xfrin_notify_handling.feature 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  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 56174 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]:56176 should have rcode NXDOMAIN
  23. #
  24. # Test1 for Xfrout statistics
  25. #
  26. check initial statistics not containing example.org for Xfrout with cmdctl port 56174 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 56174 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. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  50. # Note: The following waits should be for *new* log messages, or
  51. # they will match older log messages that were generated by AXFR
  52. # during startup.
  53. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  54. Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  55. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  56. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  57. A query for www.example.org to [::1]:56176 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 56174
  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 56174
  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 56174
  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 56174 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:56176 should have rcode NXDOMAIN
  129. #
  130. # Test1 for Xfrout statistics
  131. #
  132. check initial statistics not containing example.org for Xfrout with cmdctl port 56174 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 56174 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. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  148. # Note: The following waits should be for *new* log messages, or
  149. # they will match older log messages that were generated by AXFR
  150. # during startup.
  151. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  152. Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  153. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  154. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  155. A query for www.example.org to 127.0.0.1:56176 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 56174
  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 56174
  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 56174
  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 56174 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]:56176 should have rcode NXDOMAIN
  227. #
  228. # Test1 for Xfrout statistics
  229. #
  230. check initial statistics not containing example.org for Xfrout with cmdctl port 56174 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 56174
  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. Then wait for new master stderr message XFROUT_NEW_CONFIG_DONE
  253. When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
  254. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  255. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  256. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  257. # Note: The following waits should be for *new* log messages, or
  258. # they will match older log messages that were generated by AXFR
  259. # during startup.
  260. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  261. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_TRANSFER_SUCCESS
  262. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  263. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  264. A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
  265. #
  266. # Test3 for Xfrout statistics
  267. #
  268. # check statistics change
  269. #
  270. # wait until the last stats requesting is finished
  271. When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
  272. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  273. last bindctl output should not contain "error"
  274. When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
  275. The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
  276. | item_name | item_value | min_value | max_value |
  277. | _SERVER_.notifyoutv6 | 1 | | |
  278. | _SERVER_.xfrrej | | 1 | 3 |
  279. | example.org..notifyoutv6 | 1 | | |
  280. | example.org..xfrrej | | 1 | 3 |
  281. # Note: The above rejection counters might sometimes be increased
  282. # up to 3. See this for details
  283. # http://git.bind10.isc.org/~tester/builder/BIND10-lettuce/20120918210000-MacOS/logs/lettuce.out
  284. When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
  285. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  286. | item_name | item_value |
  287. | open | 1 |
  288. | accept | 1 |
  289. #
  290. # Test4 for Xfrin statistics
  291. #
  292. # check statistics change
  293. #
  294. # wait until the last stats requesting is finished
  295. When I query statistics zones of bind10 module Xfrin with cmdctl
  296. wait for new bind10 stderr message XFRIN_RECEIVED_COMMAND
  297. last bindctl output should not contain "error"
  298. When I query statistics of bind10 module Xfrin with cmdctl
  299. The statistics counters are 0 in category .Xfrin except for the following items
  300. | item_name | item_value | min_value |
  301. | zones.IN._SERVER_.soaoutv6 | | 1 |
  302. | zones.IN._SERVER_.axfrreqv6 | | 1 |
  303. | zones.IN._SERVER_.xfrfail | | 1 |
  304. | zones.IN.example.org..soaoutv6 | | 1 |
  305. | zones.IN.example.org..axfrreqv6 | | 1 |
  306. | zones.IN.example.org..xfrfail | | 1 |
  307. | soa_in_progress | | 0 |
  308. | axfr_running | | 0 |
  309. | socket.ipv6.tcp.open | | 1 |
  310. | socket.ipv6.tcp.close | | 1 |
  311. | socket.ipv6.tcp.conn | | 1 |
  312. | socket.ipv6.tcp.connfail | 0 | |
  313. #
  314. # Test for Xfr request rejected in IPv4
  315. #
  316. Scenario: Handle incoming notify (XFR request rejected in IPv4)
  317. Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 56174 as master
  318. And wait for master stderr message BIND10_STARTED_CC
  319. And wait for master stderr message CMDCTL_STARTED
  320. And wait for master stderr message AUTH_SERVER_STARTED
  321. And wait for master stderr message XFROUT_STARTED
  322. And wait for master stderr message ZONEMGR_STARTED
  323. And wait for master stderr message STATS_STARTING
  324. And I have bind10 running with configuration xfrin/retransfer_slave_notify_v4.conf
  325. And wait for bind10 stderr message BIND10_STARTED_CC
  326. And wait for bind10 stderr message CMDCTL_STARTED
  327. And wait for bind10 stderr message AUTH_SERVER_STARTED
  328. And wait for bind10 stderr message XFRIN_STARTED
  329. And wait for bind10 stderr message ZONEMGR_STARTED
  330. A query for www.example.org to 127.0.0.1:56176 should have rcode NXDOMAIN
  331. #
  332. # Test1 for Xfrout statistics
  333. #
  334. check initial statistics not containing example.org for Xfrout with cmdctl port 56174 except for the following items
  335. | item_name | min_value | max_value |
  336. | socket.unixdomain.open | 0 | 1 |
  337. # Note: See above about .Xfrout.socket.unixdomain.open.
  338. #
  339. # Test2 for Xfrin statistics
  340. #
  341. check initial statistics not containing example.org for Xfrin except for the following items
  342. | item_name | min_value | max_value |
  343. | soa_in_progress | 0 | 1 |
  344. | axfr_running | 0 | 1 |
  345. # Note: See above about soa_in_progress and axfr_running of Xfrin
  346. #
  347. # set transfer_acl rejection
  348. # Local xfr requests from Xfrin module would be rejected here.
  349. #
  350. When I send bind10 the following commands with cmdctl port 56174
  351. """
  352. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "127.0.0.1"}]
  353. config commit
  354. """
  355. last bindctl output should not contain Error
  356. Then wait for new master stderr message XFROUT_NEW_CONFIG_DONE
  357. When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
  358. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  359. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  360. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  361. # Note: The following waits should be for *new* log messages, or
  362. # they will match older log messages that were generated by AXFR
  363. # during startup.
  364. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  365. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_TRANSFER_SUCCESS
  366. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  367. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  368. A query for www.example.org to 127.0.0.1:56176 should have rcode NXDOMAIN
  369. #
  370. # Test3 for Xfrout statistics
  371. #
  372. # check statistics change
  373. #
  374. When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
  375. # wait until stats request at least after NOTIFY_OUT_REPLY_RECEIVED
  376. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  377. last bindctl output should not contain "error"
  378. When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
  379. The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
  380. | item_name | item_value | min_value | max_value |
  381. | _SERVER_.notifyoutv4 | 1 | | |
  382. | _SERVER_.xfrrej | | 1 | 3 |
  383. | example.org..notifyoutv4 | 1 | | |
  384. | example.org..xfrrej | | 1 | 3 |
  385. # Note: The above rejection counters might sometimes be increased
  386. # up to 3. See this for details
  387. # http://git.bind10.isc.org/~tester/builder/BIND10-lettuce/20120918210000-MacOS/logs/lettuce.out
  388. When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
  389. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  390. | item_name | item_value |
  391. | open | 1 |
  392. | accept | 1 |
  393. #
  394. # Test4 for Xfrin statistics
  395. #
  396. # check statistics change
  397. #
  398. # wait until the last stats requesting is finished
  399. When I query statistics zones of bind10 module Xfrin with cmdctl
  400. wait for new bind10 stderr message XFRIN_RECEIVED_COMMAND
  401. last bindctl output should not contain "error"
  402. When I query statistics of bind10 module Xfrin with cmdctl
  403. The statistics counters are 0 in category .Xfrin except for the following items
  404. | item_name | item_value | min_value |
  405. | zones.IN._SERVER_.soaoutv4 | | 1 |
  406. | zones.IN._SERVER_.axfrreqv4 | | 1 |
  407. | zones.IN._SERVER_.xfrfail | | 1 |
  408. | zones.IN.example.org..soaoutv4 | | 1 |
  409. | zones.IN.example.org..axfrreqv4 | | 1 |
  410. | zones.IN.example.org..xfrfail | | 1 |
  411. | soa_in_progress | | 0 |
  412. | axfr_running | | 0 |
  413. | socket.ipv4.tcp.open | | 1 |
  414. | socket.ipv4.tcp.close | | 1 |
  415. | socket.ipv4.tcp.conn | | 1 |
  416. | socket.ipv4.tcp.connfail | 0 | |
  417. #
  418. # Test for unreachable slave
  419. #
  420. Scenario: Handle incoming notify (unreachable slave)
  421. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
  422. And wait for master stderr message BIND10_STARTED_CC
  423. And wait for master stderr message CMDCTL_STARTED
  424. And wait for master stderr message AUTH_SERVER_STARTED
  425. And wait for master stderr message XFROUT_STARTED
  426. And wait for master stderr message ZONEMGR_STARTED
  427. And wait for master stderr message STATS_STARTING
  428. When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
  429. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  430. Then wait for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  431. Then wait for new master stderr message NOTIFY_OUT_TIMEOUT
  432. #
  433. # Test1 for Xfrout statistics
  434. #
  435. # check statistics change
  436. #
  437. When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
  438. # wait until stats request at least after NOTIFY_OUT_TIMEOUT
  439. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  440. last bindctl output should not contain "error"
  441. When I query statistics zones of bind10 module Xfrout with cmdctl port 56174
  442. The statistics counters are 0 in category .Xfrout.zones.IN except for the following items
  443. | item_name | min_value | max_value |
  444. | _SERVER_.notifyoutv6 | 1 | 5 |
  445. | example.org..notifyoutv6 | 1 | 5 |
  446. When I query statistics socket of bind10 module Xfrout with cmdctl port 56174
  447. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  448. | item_name | item_value |
  449. | open | 1 |
  450. #
  451. # Test for NOTIFY that would result in NOTAUTH
  452. #
  453. Scenario: Handle incoming notify that does match authoritative zones
  454. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
  455. And wait for master stderr message BIND10_STARTED_CC
  456. And wait for master stderr message CMDCTL_STARTED
  457. And wait for master stderr message AUTH_SERVER_STARTED
  458. And wait for master stderr message XFROUT_STARTED
  459. And wait for master stderr message ZONEMGR_STARTED
  460. And wait for master stderr message STATS_STARTING
  461. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  462. And wait for bind10 stderr message BIND10_STARTED_CC
  463. And wait for bind10 stderr message CMDCTL_STARTED
  464. And wait for bind10 stderr message AUTH_SERVER_STARTED
  465. And wait for bind10 stderr message XFRIN_STARTED
  466. And wait for bind10 stderr message ZONEMGR_STARTED
  467. #
  468. # replace master's data source with unmatched zone for slave's zone.
  469. # we restart Xfrout to make it sure.
  470. #
  471. When I send bind10 the following commands with cmdctl port 56174
  472. """
  473. config set data_sources/classes/IN[0]/params/database_file data/ixfr-out/zones.sqlite3
  474. config set Auth/database_file data/ixfr-out/zones.sqlite3
  475. config set Xfrout/zone_config[0]/origin example.com
  476. config commit
  477. Xfrout shutdown
  478. """
  479. last bindctl output should not contain "error"
  480. And wait for new master stderr message XFROUT_STARTED
  481. A query for www.example.com to [::1]:56176 should have rcode REFUSED
  482. When I send bind10 with cmdctl port 56174 the command Xfrout notify example.com IN
  483. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  484. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY_NOTAUTH
  485. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  486. A query for www.example.com to [::1]:56176 should have rcode REFUSED
  487. #
  488. # Test for NOTIFY that's not in the secondaries list
  489. #
  490. Scenario: Handle incoming notify that is not in the secondaries list
  491. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
  492. And wait for master stderr message BIND10_STARTED_CC
  493. And wait for master stderr message CMDCTL_STARTED
  494. And wait for master stderr message AUTH_SERVER_STARTED
  495. And wait for master stderr message XFROUT_STARTED
  496. And wait for master stderr message ZONEMGR_STARTED
  497. And wait for master stderr message STATS_STARTING
  498. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  499. And wait for bind10 stderr message BIND10_STARTED_CC
  500. And wait for bind10 stderr message CMDCTL_STARTED
  501. And wait for bind10 stderr message AUTH_SERVER_STARTED
  502. And wait for bind10 stderr message XFRIN_STARTED
  503. And wait for bind10 stderr message ZONEMGR_STARTED
  504. #
  505. # Empty slave's secondaries list, and restart zonemgr to make it sure
  506. #
  507. When I send bind10 the following commands with cmdctl
  508. """
  509. config remove Zonemgr/secondary_zones[0]
  510. config commit
  511. Zonemgr shutdown
  512. """
  513. last bindctl output should not contain "error"
  514. And wait for new bind10 stderr message ZONEMGR_STARTED
  515. A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
  516. When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
  517. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  518. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  519. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  520. Then wait for new bind10 stderr message ZONEMGR_ZONE_NOTIFY_NOT_SECONDARY
  521. Then wait for new master stderr message NOTIFY_OUT_REPLY_RECEIVED
  522. A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
  523. #
  524. # Test for NOTIFY when zonemgr is not running
  525. #
  526. Scenario: Handle incoming notify while zonemgr is not running
  527. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 56174 as master
  528. And wait for master stderr message BIND10_STARTED_CC
  529. And wait for master stderr message CMDCTL_STARTED
  530. And wait for master stderr message AUTH_SERVER_STARTED
  531. And wait for master stderr message XFROUT_STARTED
  532. And wait for master stderr message ZONEMGR_STARTED
  533. And wait for master stderr message STATS_STARTING
  534. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  535. And wait for bind10 stderr message BIND10_STARTED_CC
  536. And wait for bind10 stderr message CMDCTL_STARTED
  537. And wait for bind10 stderr message AUTH_SERVER_STARTED
  538. And wait for bind10 stderr message XFRIN_STARTED
  539. And wait for bind10 stderr message ZONEMGR_STARTED
  540. # remove zonemgr from the system. a subsequent notify is ignored, but
  541. # an error message shouldn't be logged at auth.
  542. When I send bind10 the following commands with cmdctl
  543. """
  544. config remove Init/components b10-zonemgr
  545. config commit
  546. """
  547. last bindctl output should not contain "error"
  548. And wait for new bind10 stderr message BIND10_PROCESS_ENDED
  549. A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
  550. When I send bind10 with cmdctl port 56174 the command Xfrout notify example.org IN
  551. Then wait for master stderr message XFROUT_NOTIFY_COMMAND
  552. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  553. Then wait for new bind10 stderr message AUTH_ZONEMGR_NOTEXIST not AUTH_ZONEMGR_ERROR
  554. Then wait for master stderr message NOTIFY_OUT_TIMEOUT not NOTIFY_OUT_REPLY_RECEIVED
  555. A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
  556. #
  557. # Test for unreachable master
  558. #
  559. Scenario: Handle incoming notify (unreachable master)
  560. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  561. And wait for bind10 stderr message BIND10_STARTED_CC
  562. And wait for bind10 stderr message CMDCTL_STARTED
  563. And wait for bind10 stderr message AUTH_SERVER_STARTED
  564. And wait for bind10 stderr message XFRIN_STARTED
  565. And wait for bind10 stderr message ZONEMGR_STARTED
  566. A query for www.example.org to [::1]:56176 should have rcode NXDOMAIN
  567. #
  568. # Test1 for Xfrin statistics
  569. #
  570. check initial statistics not containing example.org for Xfrin
  571. #
  572. # execute reftransfer for Xfrin
  573. #
  574. When I send bind10 the command Xfrin retransfer example.org IN
  575. Then wait for new bind10 stderr message XFRIN_CONNECT_MASTER
  576. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED
  577. #
  578. # Test2 for Xfrin statistics
  579. #
  580. # check initial statistics
  581. #
  582. # wait until the last stats requesting is finished
  583. wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  584. wait for new bind10 stderr message XFRIN_RECEIVED_COMMAND
  585. When I query statistics socket of bind10 module Xfrin with cmdctl
  586. The statistics counters are 0 in category .Xfrin.socket.ipv6.tcp except for the following items
  587. | item_name | min_value |
  588. | open | 1 |
  589. | close | 1 |
  590. | connfail | 1 |