summaryrefslogtreecommitdiffstats
path: root/qa/erasure-code/ec-feature-plugins-v2.yaml
blob: f2d374dd98a622f769e6325228a312c61e6cbff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# Test the expected behavior of the
#
#    CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2 
#
# feature.
#
roles:
- - mon.a
  - mon.b
  - osd.0
  - osd.1
- - osd.2
  - mon.c
  - mgr.x
tasks:
#
# Install firefly
#
- install:
    branch: firefly
- ceph:
    fs: xfs
#
# We don't need mon.c for now: it will be used later to make sure an old
# mon cannot join the quorum once the feature has been activated
#
- ceph.stop:
    daemons: [mon.c]
- exec:
    mon.a: 
      - |-
        ceph osd erasure-code-profile set WRONG plugin=WRONG
        ceph osd pool create poolWRONG 12 12 erasure WRONG 2>&1 | grep "failed to load plugin using profile WRONG"
#
# Partial upgrade, osd.2 is not upgraded
#
- install.upgrade:
    osd.0: 
#
# a is the leader
#
- ceph.restart:
    daemons: [mon.a]
    wait-for-healthy: false
- exec:
    mon.a:
      - |-
        ceph osd erasure-code-profile set profile-lrc plugin=lrc 2>&1 | grep "unsupported by: the monitor cluster"
- ceph.restart:
    daemons: [mon.b, osd.1, osd.0]
    wait-for-healthy: false
    wait-for-osds-up: true
#
# The lrc plugin cannot be used because osd.2 is not upgraded yet
# and would crash.
#
- exec:
    mon.a: 
      - |-
        ceph osd erasure-code-profile set profile-lrc plugin=lrc 2>&1 | grep "unsupported by: osd.2"
#
# Taking osd.2 out, the rest of the cluster is upgraded
#
- ceph.stop:
    daemons: [osd.2]
- sleep:
    duration: 60
#
# Creating an erasure code profile using the lrc plugin now works
#
- exec:
    mon.a: 
      - "ceph osd erasure-code-profile set profile-lrc plugin=lrc"
#
# osd.2 won't be able to join the because is does not support the feature
#
- ceph.restart:
    daemons: [osd.2]
    wait-for-healthy: false
- sleep:
    duration: 60
- exec:
    osd.2: 
      - |-
        grep "protocol feature.*missing 100000000000" /var/log/ceph/ceph-osd.2.log
#
# mon.c won't be able to join the because it does not support the feature
#
- ceph.restart:
    daemons: [mon.c]
    wait-for-healthy: false
- sleep:
    duration: 60
- exec:
    mon.c: 
      - |-
        grep "missing.*feature" /var/log/ceph/ceph-mon.c.log