123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- Feature: Xfrin incoming notify handling
- Tests for Xfrin incoming notify handling.
- Scenario: Handle incoming notify
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
- And wait for master stderr message BIND10_STARTED_CC
- And wait for master stderr message CMDCTL_STARTED
- And wait for master stderr message AUTH_SERVER_STARTED
- And wait for master stderr message XFROUT_STARTED
- And wait for master stderr message ZONEMGR_STARTED
- And wait for master stderr message STATS_STARTING
- And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
- And wait for bind10 stderr message BIND10_STARTED_CC
- And wait for bind10 stderr message CMDCTL_STARTED
- And wait for bind10 stderr message AUTH_SERVER_STARTED
- And wait for bind10 stderr message XFRIN_STARTED
- And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
- #
- # Test1 for Xfrout statistics
- #
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- last bindctl output should not contain "error"
- last bindctl output should not contain "example.org."
- Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 0
- Then the statistics counter xfrrej for the zone _SERVER_ should be 0
- Then the statistics counter xfrreqdone for the zone _SERVER_ should be 0
- When I query statistics ixfr_running of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter ixfr_running should be 0
- When I query statistics axfr_running of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter axfr_running should be 0
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter open should be between 0 and 1
- Then the statistics counter openfail should be 0
- Then the statistics counter close should be 0
- Then the statistics counter bindfail should be 0
- Then the statistics counter acceptfail should be 0
- Then the statistics counter accept should be 0
- Then the statistics counter senderr should be 0
- Then the statistics counter recverr should be 0
- #
- # Test2 for Xfrin statistics
- #
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrin with cmdctl
- last bindctl output should not contain "error"
- Then the statistics counter soaoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter soaoutv6 for the zone _SERVER_ should be 0
- Then the statistics counter axfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter axfrreqv6 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
- Then the statistics counter xfrsuccess for the zone _SERVER_ should be 0
- Then the statistics counter xfrfail for the zone _SERVER_ should be 0
- Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
- Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be 0.0
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
- Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
- Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
- Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
- Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
- Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
- Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
- Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
- Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
- A query for www.example.org to [::1]:47806 should have rcode NOERROR
- #
- # Test3 for Xfrout statistics
- #
- # check statistics change
- #
- # wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
- wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
- last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter notifyoutv4 for the zone example.org. should be 0
- Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 5
- Then the statistics counter notifyoutv6 for the zone example.org. should be 5
- Then the statistics counter xfrrej for the zone _SERVER_ should be 0
- Then the statistics counter xfrrej for the zone example.org. should be 0
- Then the statistics counter xfrreqdone for the zone _SERVER_ should be 1
- Then the statistics counter xfrreqdone for the zone example.org. should be 1
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter open should be 1
- Then the statistics counter openfail should be 0
- Then the statistics counter close should be 0
- Then the statistics counter bindfail should be 0
- Then the statistics counter acceptfail should be 0
- Then the statistics counter accept should be 1
- Then the statistics counter senderr should be 0
- Then the statistics counter recverr should be 0
- #
- # Test4 for Xfrin statistics
- #
- # check statistics change
- #
- # wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrin with cmdctl
- wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
- wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
- last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrin with cmdctl
- Then the statistics counter soaoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter soaoutv4 for the zone example.org. should be 0
- Then the statistics counter soaoutv6 for the zone _SERVER_ should be 1
- Then the statistics counter soaoutv6 for the zone example.org. should be 1
- Then the statistics counter axfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter axfrreqv4 for the zone example.org. should be 0
- Then the statistics counter axfrreqv6 for the zone _SERVER_ should be 1
- Then the statistics counter axfrreqv6 for the zone example.org. should be 1
- Then the statistics counter ixfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv4 for the zone example.org. should be 0
- Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv6 for the zone example.org. should be 0
- Then the statistics counter xfrsuccess for the zone _SERVER_ should be 1
- Then the statistics counter xfrsuccess for the zone example.org. should be 1
- Then the statistics counter xfrfail for the zone _SERVER_ should be 0
- Then the statistics counter xfrfail for the zone example.org. should be 0
- Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
- Then the statistics counter latest_ixfr_duration for the zone example.org. should be 0.0
- Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be greater than 0.0
- Then the statistics counter latest_axfr_duration for the zone example.org. should be greater than 0.0
- #
- # Test for Xfr request rejected
- #
- Scenario: Handle incoming notify (XFR request rejected)
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
- And wait for master stderr message BIND10_STARTED_CC
- And wait for master stderr message CMDCTL_STARTED
- And wait for master stderr message AUTH_SERVER_STARTED
- And wait for master stderr message XFROUT_STARTED
- And wait for master stderr message ZONEMGR_STARTED
- And wait for master stderr message STATS_STARTING
- And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
- And wait for bind10 stderr message BIND10_STARTED_CC
- And wait for bind10 stderr message CMDCTL_STARTED
- And wait for bind10 stderr message AUTH_SERVER_STARTED
- And wait for bind10 stderr message XFRIN_STARTED
- And wait for bind10 stderr message ZONEMGR_STARTED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
- #
- # Test5 for Xfrout statistics
- #
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- last bindctl output should not contain "error"
- last bindctl output should not contain "example.org."
- Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 0
- Then the statistics counter xfrrej for the zone _SERVER_ should be 0
- Then the statistics counter xfrreqdone for the zone _SERVER_ should be 0
- When I query statistics ixfr_running of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter ixfr_running should be 0
- When I query statistics axfr_running of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter axfr_running should be 0
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter open should be between 0 and 1
- Then the statistics counter openfail should be 0
- Then the statistics counter close should be 0
- Then the statistics counter bindfail should be 0
- Then the statistics counter acceptfail should be 0
- Then the statistics counter accept should be 0
- Then the statistics counter senderr should be 0
- Then the statistics counter recverr should be 0
- #
- # Test6 for Xfrin statistics
- #
- # check initial statistics
- #
- When I query statistics zones of bind10 module Xfrin with cmdctl
- last bindctl output should not contain "error"
- Then the statistics counter soaoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter soaoutv6 for the zone _SERVER_ should be 0
- Then the statistics counter axfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter axfrreqv6 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
- Then the statistics counter xfrsuccess for the zone _SERVER_ should be 0
- Then the statistics counter xfrfail for the zone _SERVER_ should be 0
- Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
- Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be 0.0
- #
- # set transfer_acl rejection
- # Local xfr requests from Xfrin module would be rejected here.
- #
- When I send bind10 the following commands with cmdctl port 47804
- """
- config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
- config commit
- """
- last bindctl output should not contain Error
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
- Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
- Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
- Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
- Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
- Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_XFR_TRANSFER_STARTED
- Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
- Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
- Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
- A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
- #
- # Test7 for Xfrout statistics
- #
- # check statistics change
- #
- # wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
- wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
- last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter notifyoutv4 for the zone example.org. should be 0
- Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 5
- Then the statistics counter notifyoutv6 for the zone example.org. should be 5
- # The counts of rejection would be between 1 and 2. They are not
- # fixed. It would depend on timing or the platform.
- Then the statistics counter xfrrej for the zone _SERVER_ should be greater than 0
- Then the statistics counter xfrrej for the zone example.org. should be greater than 0
- Then the statistics counter xfrreqdone for the zone _SERVER_ should be 0
- Then the statistics counter xfrreqdone for the zone example.org. should be 0
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter open should be 1
- Then the statistics counter openfail should be 0
- Then the statistics counter close should be 0
- Then the statistics counter bindfail should be 0
- Then the statistics counter acceptfail should be 0
- Then the statistics counter accept should be 1
- Then the statistics counter senderr should be 0
- Then the statistics counter recverr should be 0
- #
- # Test8 for Xfrin statistics
- #
- # check statistics change
- #
- # wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrin with cmdctl
- wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
- wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
- last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrin with cmdctl
- Then the statistics counter soaoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter soaoutv4 for the zone example.org. should be 0
- Then the statistics counter soaoutv6 for the zone _SERVER_ should be greater than 0
- Then the statistics counter soaoutv6 for the zone example.org. should be greater than 0
- Then the statistics counter axfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter axfrreqv4 for the zone example.org. should be 0
- Then the statistics counter axfrreqv6 for the zone _SERVER_ should be greater than 0
- Then the statistics counter axfrreqv6 for the zone example.org. should be greater than 0
- Then the statistics counter ixfrreqv4 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv4 for the zone example.org. should be 0
- Then the statistics counter ixfrreqv6 for the zone _SERVER_ should be 0
- Then the statistics counter ixfrreqv6 for the zone example.org. should be 0
- Then the statistics counter xfrsuccess for the zone _SERVER_ should be 0
- Then the statistics counter xfrsuccess for the zone example.org. should be 0
- Then the statistics counter xfrfail for the zone _SERVER_ should be greater than 0
- Then the statistics counter xfrfail for the zone example.org. should be greater than 0
- Then the statistics counter latest_ixfr_duration for the zone _SERVER_ should be 0.0
- Then the statistics counter latest_ixfr_duration for the zone example.org. should be 0.0
- Then the statistics counter latest_axfr_duration for the zone _SERVER_ should be 0.0
- Then the statistics counter latest_axfr_duration for the zone example.org. should be 0.0
- #
- # Test for unreachable slave
- #
- Scenario: Handle incoming notify (unreachable slave)
- Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
- And wait for master stderr message BIND10_STARTED_CC
- And wait for master stderr message CMDCTL_STARTED
- And wait for master stderr message AUTH_SERVER_STARTED
- And wait for master stderr message XFROUT_STARTED
- And wait for master stderr message ZONEMGR_STARTED
- And wait for master stderr message STATS_STARTING
- When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
- Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
- Then wait for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
- Then wait for new master stderr message NOTIFY_OUT_TIMEOUT
- #
- # Test9 for Xfrout statistics
- #
- # check statistics change
- #
- # wait until the last stats requesting is finished
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
- wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
- last bindctl output should not contain "error"
- When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
- Then the statistics counter notifyoutv4 for the zone example.org. should be 0
- Then the statistics counter notifyoutv6 for the zone _SERVER_ should be greater than 0
- Then the statistics counter notifyoutv6 for the zone example.org. should be greater than 0
- Then the statistics counter xfrrej for the zone _SERVER_ should be 0
- Then the statistics counter xfrrej for the zone example.org. should be 0
- Then the statistics counter xfrreqdone for the zone _SERVER_ should be 0
- Then the statistics counter xfrreqdone for the zone example.org. should be 0
- When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
- Then the statistics counter open should be 1
- Then the statistics counter openfail should be 0
- Then the statistics counter close should be 0
- Then the statistics counter bindfail should be 0
- Then the statistics counter acceptfail should be 0
- Then the statistics counter accept should be 0
- Then the statistics counter senderr should be 0
- Then the statistics counter recverr should be 0
|