xfrin_notify_handling.feature 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. # Test for statistics
  20. #
  21. # check for initial statistics
  22. #
  23. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  24. last bindctl output should not contain "error"
  25. last bindctl output should not contain "example.org."
  26. The counter notifyoutv4 for the zone _SERVER_ should be 0
  27. The counter notifyoutv6 for the zone _SERVER_ should be 0
  28. The counter xfrrej for the zone _SERVER_ should be 0
  29. The counter xfrreqdone for the zone _SERVER_ should be 0
  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. # Test for statistics
  42. #
  43. # check for statistics change
  44. #
  45. # wait until the last stats requesting is finished
  46. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  47. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  48. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  49. last bindctl output should not contain "error"
  50. The counter notifyoutv4 for the zone _SERVER_ should be 0
  51. The counter notifyoutv4 for the zone example.org. should be 0
  52. The counter notifyoutv6 for the zone _SERVER_ should be 5
  53. The counter notifyoutv6 for the zone example.org. should be 5
  54. The counter xfrrej for the zone _SERVER_ should be 0
  55. The counter xfrrej for the zone example.org. should be 0
  56. The counter xfrreqdone for the zone _SERVER_ should be 1
  57. The counter xfrreqdone for the zone example.org. should be 1
  58. #
  59. # Test for Xfr request rejected
  60. #
  61. Scenario: Handle incoming notify (XFR request rejected)
  62. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  63. And wait for master stderr message BIND10_STARTED_CC
  64. And wait for master stderr message CMDCTL_STARTED
  65. And wait for master stderr message AUTH_SERVER_STARTED
  66. And wait for master stderr message XFROUT_STARTED
  67. And wait for master stderr message ZONEMGR_STARTED
  68. And wait for master stderr message STATS_STARTING
  69. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  70. And wait for bind10 stderr message BIND10_STARTED_CC
  71. And wait for bind10 stderr message CMDCTL_STARTED
  72. And wait for bind10 stderr message AUTH_SERVER_STARTED
  73. And wait for bind10 stderr message XFRIN_STARTED
  74. And wait for bind10 stderr message ZONEMGR_STARTED
  75. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  76. #
  77. # Test1 for statistics
  78. #
  79. # check for initial statistics
  80. #
  81. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  82. last bindctl output should not contain "error"
  83. last bindctl output should not contain "example.org."
  84. The counter notifyoutv4 for the zone _SERVER_ should be 0
  85. The counter notifyoutv6 for the zone _SERVER_ should be 0
  86. The counter xfrrej for the zone _SERVER_ should be 0
  87. The counter xfrreqdone for the zone _SERVER_ should be 0
  88. #
  89. # set transfer_acl rejection
  90. # Local xfr requests from Xfrin module would be rejected here.
  91. #
  92. When I send bind10 the following commands with cmdctl port 47804
  93. """
  94. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
  95. config commit
  96. """
  97. last bindctl output should not contain Error
  98. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  99. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  100. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  101. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  102. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  103. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_ERROR not XFRIN_XFR_TRANSFER_STARTED
  104. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  105. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  106. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  107. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  108. #
  109. # Test2 for statistics
  110. #
  111. # check for statistics change
  112. #
  113. # wait until the last stats requesting is finished
  114. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  115. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  116. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  117. last bindctl output should not contain "error"
  118. The counter notifyoutv4 for the zone _SERVER_ should be 0
  119. The counter notifyoutv4 for the zone example.org. should be 0
  120. The counter notifyoutv6 for the zone _SERVER_ should be 5
  121. The counter notifyoutv6 for the zone example.org. should be 5
  122. # The counts of rejection would be between 1 and 2. They are not
  123. # fixed. It would depend on timing or the platform.
  124. The counter xfrrej for the zone _SERVER_ should be greater than 0
  125. The counter xfrrej for the zone example.org. should be greater than 0
  126. The counter xfrreqdone for the zone _SERVER_ should be 0
  127. The counter xfrreqdone for the zone example.org. should be 0