Skip to content

qa/workunits/ceph-helpers: display rejected string#14468

Merged
tchaikov merged 2 commits intoceph:masterfrom
tchaikov:wip-show-me-fake-plugin
Apr 13, 2017
Merged

qa/workunits/ceph-helpers: display rejected string#14468
tchaikov merged 2 commits intoceph:masterfrom
tchaikov:wip-show-me-fake-plugin

Conversation

@tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Apr 12, 2017

@tchaikov tchaikov added the tests label Apr 12, 2017
@tchaikov tchaikov requested review from a user and badone April 12, 2017 04:55
@tchaikov
Copy link
Contributor Author

/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1454: erasure_code_plugin_exists:  ceph osd erasure-code-profile set TESTPROFILE plugin=FAKE
Error EIO: load dlopen(/home/jenkins-build/build/workspace/ceph-pull-requests/build/lib/libec_FAKE.so): /home/jenkins-build/build/workspace/ceph-pull-requests/build/lib/libec_FAKE.so: cannot open shared object file: No such file or directory
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1455: erasure_code_plugin_exists:  status=1

see https://jenkins.ceph.com/job/ceph-pull-requests/21899/consoleFull#-163083258740526d21-3511-427d-909c-dd086c0d1034

Copy link
Contributor

@badone badone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghost
Copy link

ghost commented Apr 12, 2017

@tchaikov the idea is to not run another command to display the result because it may show something different, right ?

@tchaikov tchaikov force-pushed the wip-show-me-fake-plugin branch from 253ce72 to 4d3af1b Compare April 12, 2017 07:11
@tchaikov
Copy link
Contributor Author

@dachary exactly.

@tchaikov
Copy link
Contributor Author

@dachary @badone just updated the PR. the change was buggy.

@tchaikov
Copy link
Contributor Author

and a side effect of this change is that we don't need to take the "pipefail option" into consideration when looking at this test anymore.

local status=$?
if [ $status -eq 0 ]; then
ceph osd erasure-code-profile rm TESTPROFILE
elif [ ! echo $s | grep --quiet "$grepstr" ]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif  ! echo $s | grep --quiet "$grepstr" ; then
   status=1

@tchaikov
Copy link
Contributor Author

/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1451: erasure_code_plugin_exists:  local 's=Error EIO: load dlopen(/home/jenkins-build/build/workspace/ceph-pull-requests/build/lib/libec_FAKE.so): /home/jenkins-build/build/workspace/ceph-pull-requests/build/lib/libec_FAKE.so: cannot open shared object file: No such file or directory'
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1452: erasure_code_plugin_exists:  local status=0
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1453: erasure_code_plugin_exists:  '[' 0 -eq 0 ']'
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1454: erasure_code_plugin_exists:  ceph osd erasure-code-profile rm TESTPROFILE
erasure-code-profile TESTPROFILE does not exist
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1459: erasure_code_plugin_exists:  return 0
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1469: test_erasure_code_plugin_exists:  return 1

https://jenkins.ceph.com/job/ceph-pull-requests/21911/consoleFull#-209497759540526d21-3511-427d-909c-dd086c0d1034

so ceph failed to set the FAKE ec plugin, but it returned 0 nevertheless.

@tchaikov tchaikov force-pushed the wip-show-me-fake-plugin branch from 4d3af1b to 9d27357 Compare April 12, 2017 08:27
Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov force-pushed the wip-show-me-fake-plugin branch from 9d27357 to 0196e15 Compare April 12, 2017 08:35
local plugin=$1
local status
local grepstr
local s
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@badone @dachary i realized that local is a command by itself. so i should run it before assigning the output to s, now the captured return code should be correct.

@tchaikov
Copy link
Contributor Author

@dachary @badone fixed and repushed.

Copy link
Contributor

@badone badone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK

it would be a race otherwise, because we cannot be sure that the cluster
pgs are not all clean or not when run_osd() returns, but we can be sure
that they are expected to active+clean after a while. that's what
wait_for_clean() does.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1166: test_is_clean:  is_clean
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1154: is_clean:  get_num_pgs
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1097: get_num_pgs:  ceph --format xml status
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1098: get_num_pgs:  xmlstarlet sel -t -m //pgmap/num_pgs -v .
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1154: is_clean:  num_pgs=4
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1155: is_clean:  test 4 '!=' 0
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1156: is_clean:  get_num_active_clean
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1061: get_num_active_clean:  local 'expression=('
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1062: get_num_active_clean:  expression+='contains(.,'\''active'\'') and '
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1063: get_num_active_clean:  expression+='contains(.,'\''clean'\'') and '
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1064: get_num_active_clean:  expression+='not(contains(.,'\''stale'\''))'
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1065: get_num_active_clean:  expression+=')'
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1069: get_num_active_clean:  ceph --format xml pg dump pgs
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1070: get_num_active_clean:  xmlstarlet sel -t -m '//pg_stat/state[(contains(.,'\''active'\'') and contains(.,'\''clean'\'') and not(contains(.,'\''stale'\'')))]' -v . -n
//home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1071: get_num_active_clean:  grep -cv '^$'
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1156: is_clean:  test 4 = 4
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1166: test_is_clean:  return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1649: run_tests:  return 1

see https://jenkins.ceph.com/job/ceph-pull-requests/21917/console

@tchaikov
Copy link
Contributor Author

/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/osd/osd-scrub-repair.sh:66: add_something:  rados --pool ecpool put SOMETHING td/osd-scrub-repair/ORIGINAL
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/osd/osd-scrub-repair.sh: line 49: 20401 Terminated              rados --pool $poolname put $obj $dir/ORIGINAL
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/osd/osd-scrub-repair.sh:66: add_something:  return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/osd/osd-scrub-repair.sh:163: corrupt_and_repair_erasure_coded:  return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/osd/osd-scrub-repair.sh:241: TEST_corrupt_and_repair_jerasure:  return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/osd/osd-scrub-repair.sh:45: run:  return 1

retest this please.

@tchaikov
Copy link
Contributor Author

retest this please.

run_mon $dir a --osd_pool_default_size=1 || return 1
run_mgr $dir x || return 1
run_osd $dir 0 || return 1
! is_clean || return 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch !

@tchaikov tchaikov merged commit 8442cbb into ceph:master Apr 13, 2017
@tchaikov tchaikov deleted the wip-show-me-fake-plugin branch April 13, 2017 14:24
@smithfarm
Copy link
Contributor

@tchaikov Guess this needs to be backported to kraken? See #14523 which is waiting for it?

@tchaikov
Copy link
Contributor Author

tchaikov commented Jul 3, 2017

@smithfarm yes, i think so.

@smithfarm
Copy link
Contributor

@kefu @badone Re-running make check at #14523 - if your theory is right, make check should succeed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants