xfrin_notify_handling.feature 31 KB

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