xfrin_notify_handling.feature 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. Feature: Xfrin incoming notify handling
  2. Tests for Xfrin incoming notify handling.
  3. Scenario: Handle incoming notify
  4. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  5. And wait for master stderr message BIND10_STARTED_CC
  6. And wait for master stderr message CMDCTL_STARTED
  7. And wait for master stderr message AUTH_SERVER_STARTED
  8. And wait for master stderr message XFROUT_STARTED
  9. And wait for master stderr message ZONEMGR_STARTED
  10. And wait for master stderr message STATS_STARTING
  11. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  12. And wait for bind10 stderr message BIND10_STARTED_CC
  13. And wait for bind10 stderr message CMDCTL_STARTED
  14. And wait for bind10 stderr message AUTH_SERVER_STARTED
  15. And wait for bind10 stderr message XFRIN_STARTED
  16. And wait for bind10 stderr message ZONEMGR_STARTED
  17. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  18. #
  19. # Test1 for Xfrout statistics
  20. #
  21. check initial statistics for Xfrout
  22. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  23. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  24. | item_name | min_value | max_value |
  25. | open | 0 | 1 |
  26. #
  27. # Test2 for Xfrin statistics
  28. #
  29. check initial statistics for Xfrin
  30. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  31. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  32. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  33. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  34. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  35. Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  36. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  37. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  38. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  39. A query for www.example.org to [::1]:47806 should have rcode NOERROR
  40. #
  41. # Test3 for Xfrout statistics
  42. #
  43. # check statistics change
  44. #
  45. # wait until the last stats requesting is finished
  46. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  47. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  48. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  49. last bindctl output should not contain "error"
  50. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  51. The statistics counters are 0 in category .Xfrout.zones except for the following items
  52. | item_name | item_value |
  53. | _SERVER_.notifyoutv6 | 5 |
  54. | _SERVER_.xfrreqdone | 1 |
  55. | example.org..notifyoutv6 | 5 |
  56. | example.org..xfrreqdone | 1 |
  57. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  58. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  59. | item_name | item_value |
  60. | open | 1 |
  61. | accept | 1 |
  62. #
  63. # Test4 for Xfrin statistics
  64. #
  65. # check statistics change
  66. #
  67. # wait until the last stats requesting is finished
  68. When I query statistics zones of bind10 module Xfrin with cmdctl
  69. wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  70. wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
  71. last bindctl output should not contain "error"
  72. When I query statistics zones of bind10 module Xfrin with cmdctl
  73. The statistics counters are 0 in category .Xfrin.zones except for the following items
  74. | item_name | item_value | min_value |
  75. | _SERVER_.soaoutv6 | 1 | |
  76. | _SERVER_.axfrreqv6 | 1 | |
  77. | _SERVER_.xfrsuccess | 1 | |
  78. | _SERVER_.latest_axfr_duration | | 0.0 |
  79. | example.org..soaoutv6 | 1 | |
  80. | example.org..axfrreqv6 | 1 | |
  81. | example.org..xfrsuccess | 1 | |
  82. | example.org..latest_axfr_duration | | 0.0 |
  83. #
  84. # Test for handling incoming notify only in IPv4
  85. #
  86. Scenario: Handle incoming notify (IPv4)
  87. Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 47804 as master
  88. And wait for master stderr message BIND10_STARTED_CC
  89. And wait for master stderr message CMDCTL_STARTED
  90. And wait for master stderr message AUTH_SERVER_STARTED
  91. And wait for master stderr message XFROUT_STARTED
  92. And wait for master stderr message ZONEMGR_STARTED
  93. And wait for master stderr message STATS_STARTING
  94. And I have bind10 running with configuration xfrin/retransfer_slave_notify_v4.conf
  95. And wait for bind10 stderr message BIND10_STARTED_CC
  96. And wait for bind10 stderr message CMDCTL_STARTED
  97. And wait for bind10 stderr message AUTH_SERVER_STARTED
  98. And wait for bind10 stderr message XFRIN_STARTED
  99. And wait for bind10 stderr message ZONEMGR_STARTED
  100. A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
  101. #
  102. # Test1 for Xfrout statistics
  103. #
  104. check initial statistics for Xfrout
  105. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  106. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  107. | item_name | min_value | max_value |
  108. | open | 0 | 1 |
  109. #
  110. # Test2 for Xfrin statistics
  111. #
  112. check initial statistics for Xfrin
  113. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  114. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  115. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  116. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  117. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  118. Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  119. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  120. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  121. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  122. A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
  123. #
  124. # Test3 for Xfrout statistics
  125. #
  126. # check statistics change
  127. #
  128. # wait until the last stats requesting is finished
  129. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  130. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  131. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  132. last bindctl output should not contain "error"
  133. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  134. The statistics counters are 0 in category .Xfrout.zones except for the following items
  135. | item_name | item_value |
  136. | _SERVER_.notifyoutv4 | 5 |
  137. | _SERVER_.xfrreqdone | 1 |
  138. | example.org..notifyoutv4 | 5 |
  139. | example.org..xfrreqdone | 1 |
  140. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  141. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  142. | item_name | item_value |
  143. | open | 1 |
  144. | accept | 1 |
  145. #
  146. # Test4 for Xfrin statistics
  147. #
  148. # check statistics change
  149. #
  150. # wait until the last stats requesting is finished
  151. When I query statistics zones of bind10 module Xfrin with cmdctl
  152. wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  153. wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
  154. last bindctl output should not contain "error"
  155. When I query statistics zones of bind10 module Xfrin with cmdctl
  156. The statistics counters are 0 in category .Xfrin.zones except for the following items
  157. | item_name | item_value | min_value |
  158. | _SERVER_.soaoutv4 | 1 | |
  159. | _SERVER_.axfrreqv4 | 1 | |
  160. | _SERVER_.xfrsuccess | 1 | |
  161. | _SERVER_.latest_axfr_duration | | 0.0 |
  162. | example.org..soaoutv4 | 1 | |
  163. | example.org..axfrreqv4 | 1 | |
  164. | example.org..xfrsuccess | 1 | |
  165. | example.org..latest_axfr_duration | | 0.0 |
  166. #
  167. # Test for Xfr request rejected
  168. #
  169. Scenario: Handle incoming notify (XFR request rejected)
  170. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  171. And wait for master stderr message BIND10_STARTED_CC
  172. And wait for master stderr message CMDCTL_STARTED
  173. And wait for master stderr message AUTH_SERVER_STARTED
  174. And wait for master stderr message XFROUT_STARTED
  175. And wait for master stderr message ZONEMGR_STARTED
  176. And wait for master stderr message STATS_STARTING
  177. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  178. And wait for bind10 stderr message BIND10_STARTED_CC
  179. And wait for bind10 stderr message CMDCTL_STARTED
  180. And wait for bind10 stderr message AUTH_SERVER_STARTED
  181. And wait for bind10 stderr message XFRIN_STARTED
  182. And wait for bind10 stderr message ZONEMGR_STARTED
  183. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  184. #
  185. # Test1 for Xfrout statistics
  186. #
  187. check initial statistics for Xfrout
  188. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  189. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  190. | item_name | min_value | max_value |
  191. | open | 0 | 1 |
  192. #
  193. # Test2 for Xfrin statistics
  194. #
  195. check initial statistics for Xfrin
  196. #
  197. # set transfer_acl rejection
  198. # Local xfr requests from Xfrin module would be rejected here.
  199. #
  200. When I send bind10 the following commands with cmdctl port 47804
  201. """
  202. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
  203. config commit
  204. """
  205. last bindctl output should not contain Error
  206. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  207. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  208. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  209. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  210. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  211. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_XFR_TRANSFER_STARTED
  212. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  213. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  214. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  215. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  216. #
  217. # Test3 for Xfrout statistics
  218. #
  219. # check statistics change
  220. #
  221. # wait until the last stats requesting is finished
  222. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  223. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  224. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  225. last bindctl output should not contain "error"
  226. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  227. The statistics counters are 0 in category .Xfrout.zones except for the following items
  228. | item_name | item_value | min_value |
  229. | _SERVER_.notifyoutv6 | 5 | |
  230. | _SERVER_.xfrrej | | 1 |
  231. | example.org..notifyoutv6 | 5 | |
  232. | example.org..xfrrej | | 1 |
  233. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  234. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  235. | item_name | item_value |
  236. | open | 1 |
  237. | accept | 1 |
  238. #
  239. # Test4 for Xfrin statistics
  240. #
  241. # check statistics change
  242. #
  243. # wait until the last stats requesting is finished
  244. When I query statistics zones of bind10 module Xfrin with cmdctl
  245. wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  246. wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
  247. last bindctl output should not contain "error"
  248. When I query statistics zones of bind10 module Xfrin with cmdctl
  249. The statistics counters are 0 in category .Xfrin.zones except for the following items
  250. | item_name | min_value | max_value |
  251. | _SERVER_.soaoutv6 | 1 | 3 |
  252. | _SERVER_.axfrreqv6 | 1 | 3 |
  253. | _SERVER_.xfrfail | 1 | 3 |
  254. | example.org..soaoutv6 | 1 | 3 |
  255. | example.org..axfrreqv6 | 1 | 3 |
  256. | example.org..xfrfail | 1 | 3 |
  257. #
  258. # Test for Xfr request rejected in IPv4
  259. #
  260. Scenario: Handle incoming notify (XFR request rejected in IPv4)
  261. Given I have bind10 running with configuration xfrin/retransfer_master_v4.conf with cmdctl port 47804 as master
  262. And wait for master stderr message BIND10_STARTED_CC
  263. And wait for master stderr message CMDCTL_STARTED
  264. And wait for master stderr message AUTH_SERVER_STARTED
  265. And wait for master stderr message XFROUT_STARTED
  266. And wait for master stderr message ZONEMGR_STARTED
  267. And wait for master stderr message STATS_STARTING
  268. And I have bind10 running with configuration xfrin/retransfer_slave_notify_v4.conf
  269. And wait for bind10 stderr message BIND10_STARTED_CC
  270. And wait for bind10 stderr message CMDCTL_STARTED
  271. And wait for bind10 stderr message AUTH_SERVER_STARTED
  272. And wait for bind10 stderr message XFRIN_STARTED
  273. And wait for bind10 stderr message ZONEMGR_STARTED
  274. A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
  275. #
  276. # Test1 for Xfrout statistics
  277. #
  278. check initial statistics for Xfrout
  279. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  280. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  281. | item_name | min_value | max_value |
  282. | open | 0 | 1 |
  283. #
  284. # Test2 for Xfrin statistics
  285. #
  286. check initial statistics for Xfrin
  287. #
  288. # set transfer_acl rejection
  289. # Local xfr requests from Xfrin module would be rejected here.
  290. #
  291. When I send bind10 the following commands with cmdctl port 47804
  292. """
  293. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "127.0.0.1"}]
  294. config commit
  295. """
  296. last bindctl output should not contain Error
  297. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  298. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  299. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  300. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  301. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  302. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_XFR_TRANSFER_STARTED
  303. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  304. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  305. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  306. A query for www.example.org to 127.0.0.1:47806 should have rcode NXDOMAIN
  307. #
  308. # Test3 for Xfrout statistics
  309. #
  310. # check statistics change
  311. #
  312. # wait until the last stats requesting is finished
  313. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  314. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  315. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  316. last bindctl output should not contain "error"
  317. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  318. The statistics counters are 0 in category .Xfrout.zones except for the following items
  319. | item_name | item_value | min_value |
  320. | _SERVER_.notifyoutv4 | 5 | |
  321. | _SERVER_.xfrrej | | 1 |
  322. | example.org..notifyoutv4 | 5 | |
  323. | example.org..xfrrej | | 1 |
  324. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  325. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  326. | item_name | item_value |
  327. | open | 1 |
  328. | accept | 1 |
  329. #
  330. # Test4 for Xfrin statistics
  331. #
  332. # check statistics change
  333. #
  334. # wait until the last stats requesting is finished
  335. When I query statistics zones of bind10 module Xfrin with cmdctl
  336. wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  337. wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
  338. last bindctl output should not contain "error"
  339. When I query statistics zones of bind10 module Xfrin with cmdctl
  340. The statistics counters are 0 in category .Xfrin.zones except for the following items
  341. | item_name | min_value | max_value |
  342. | _SERVER_.soaoutv4 | 1 | 3 |
  343. | _SERVER_.axfrreqv4 | 1 | 3 |
  344. | _SERVER_.xfrfail | 1 | 3 |
  345. | example.org..soaoutv4 | 1 | 3 |
  346. | example.org..axfrreqv4 | 1 | 3 |
  347. | example.org..xfrfail | 1 | 3 |
  348. #
  349. # Test for unreachable slave
  350. #
  351. Scenario: Handle incoming notify (unreachable slave)
  352. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  353. And wait for master stderr message BIND10_STARTED_CC
  354. And wait for master stderr message CMDCTL_STARTED
  355. And wait for master stderr message AUTH_SERVER_STARTED
  356. And wait for master stderr message XFROUT_STARTED
  357. And wait for master stderr message ZONEMGR_STARTED
  358. And wait for master stderr message STATS_STARTING
  359. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  360. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  361. Then wait for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  362. Then wait for new master stderr message NOTIFY_OUT_TIMEOUT
  363. #
  364. # Test1 for Xfrout statistics
  365. #
  366. # check statistics change
  367. #
  368. # wait until the last stats requesting is finished
  369. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  370. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  371. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  372. last bindctl output should not contain "error"
  373. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  374. The statistics counters are 0 in category .Xfrout.zones except for the following items
  375. | item_name | min_value | max_value |
  376. | _SERVER_.notifyoutv6 | 1 | 5 |
  377. | example.org..notifyoutv6 | 1 | 5 |
  378. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  379. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  380. | item_name | item_value |
  381. | open | 1 |