Commit d9f6ae4 1 parent 5cda896 commit d9f6ae4 Copy full SHA for d9f6ae4
File tree 3 files changed +36
-4
lines changed
3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change 8
8
tox
9
9
10
10
# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
11
- git+https://github.com/openstack-charmers/zaza.git#egg=zaza
12
- #git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
13
- git+https://github.com/lmlg/zaza-openstack-tests.git@ceph-fs-standalone#egg=zaza.openstack
11
+ git+https://github.com/openstack-charmers/zaza.git@stable/ussuri#egg=zaza
12
+ git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/ussuri#egg=zaza.openstack
Original file line number Diff line number Diff line change
1
+ import zaza .model as zaza_model
2
+
3
+ def setup_osd_standalone ():
4
+ """Perform the necessary steps to setup a single OSD."""
5
+ cmds = ['sudo ceph osd crush rule rm replicated_rule' ,
6
+ 'sudo ceph osd crush rule create-replicated replicated_rule '
7
+ 'default osd' ,
8
+ 'sudo ceph osd erasure-code-profile rm default' ,
9
+ 'sudo ceph osd erasure-code-profile set default '
10
+ 'plugin=jerasure k=2 m=1 crush-failure-domain=osd' ]
11
+ for cmd in cmds :
12
+ zaza_model .run_on_unit ('ceph-mon/0' , cmd )
13
+
14
+ loops = []
15
+ for file in ('l1' , 'l2' , 'l3' ):
16
+ zaza_model .run_on_unit ('ceph-osd/0' , 'touch %s' % file )
17
+ zaza_model .run_on_unit ('ceph-osd/0' , 'truncate --size 2G ./%s' % file )
18
+ out = zaza_model .run_on_unit ('ceph-osd/0' ,
19
+ 'sudo losetup -fP --show ./%s' % file )
20
+ loops .append (out ['Stdout' ].strip ())
21
+
22
+ for loop in loops :
23
+ zaza_model .run_action_on_leader ('ceph-osd' , 'add-disk' ,
24
+ action_params = {'osd-devices' : loop })
25
+
26
+ states = None
27
+ try :
28
+ zaza_model .get_application ('ubuntu' )
29
+ states = {'ubuntu' : {'workload-status-message' : '' }}
30
+ except KeyError :
31
+ pass
32
+
33
+ zaza_model .wait_for_application_states (states = states )
Original file line number Diff line number Diff line change 1
1
charm_name : ceph-fs
2
2
configure :
3
- - zaza.openstack.charm_tests.ceph.osd. tests.setup_osd_standalone
3
+ - tests.configure .setup_osd_standalone
4
4
tests :
5
5
- zaza.openstack.charm_tests.ceph.fs.tests.CephFSTests
6
6
- zaza.openstack.charm_tests.ceph.fs.tests.CharmOperationTest
You can’t perform that action at this time.
0 commit comments