Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa/suites/rbd: fix sporadic "rx-only direction" test failures #50071

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

idryomov
Copy link
Contributor

The existing

xmlstarlet sel -t -v  '//mirror/peers/peer[1]/uuid')" = ""

test is bogus since a tx-only peer gets added after the remote rbd-mirror daemon pings the local cluster. It happened to pass most of the time because xmlstarlet filter just failed on an empty peers array, producing the wrongly expected empty string by accident.

Fixes: https://tracker.ceph.com/issues/58688
Signed-off-by: Ilya Dryomov idryomov@gmail.com

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

The existing

    xmlstarlet sel -t -v  '//mirror/peers/peer[1]/uuid')" = ""

test is bogus since a tx-only peer gets added after the remote
rbd-mirror daemon pings the local cluster.  It happened to pass most
of the time because xmlstarlet filter just failed on an empty peers
array, producing the wrongly expected empty string by accident.

Fixes: https://tracker.ceph.com/issues/58688
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
@idryomov
Copy link
Contributor Author

idryomov commented Feb 10, 2023

Evidence of an empty peers array (a sleep in the fixed test):

2023-02-10T16:07:29.234 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ testlog 'TEST: verify rx-only direction'
2023-02-10T16:07:29.234 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ tee -a /tmp/tmp.epCfqAEDJb/rbd-mirror.test.log
2023-02-10T16:07:29.234 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:++ date '+%F %T'
2023-02-10T16:07:29.235 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ echo 2023-02-10 16:07:29 TEST: verify rx-only direction
2023-02-10T16:07:29.235 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:2023-02-10 16:07:29 TEST: verify rx-only direction
2023-02-10T16:07:29.235 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ rbd --cluster cluster2 --pool mirror mirror pool info --format json
2023-02-10T16:07:29.235 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ jq -e '.peers[0].direction == "rx-only"'
2023-02-10T16:07:29.274 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stdout:true
2023-02-10T16:07:29.275 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ rbd --cluster cluster1 --pool mirror mirror pool info --format json
2023-02-10T16:07:29.275 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ jq -e '.peers | length > 0'
2023-02-10T16:07:29.316 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stdout:false
2023-02-10T16:07:29.317 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ sleep 1
2023-02-10T16:07:30.319 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ rbd --cluster cluster1 --pool mirror mirror pool info --format json
2023-02-10T16:07:30.319 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ jq -e '.peers | length > 0'
2023-02-10T16:07:30.357 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stdout:true
2023-02-10T16:07:30.358 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ rbd --cluster cluster1 --pool mirror mirror pool info --format json
2023-02-10T16:07:30.358 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stderr:+ jq -e '.peers[0].direction == "tx-only"'
2023-02-10T16:07:30.394 INFO:tasks.workunit.cluster1.client.mirror.smithi129.stdout:true

@idryomov
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants