Discussion:
[Libstoragemgmt-devel] [SCM] libstoragemgmt branch, master, updated. 1.1.0-32-g0797f76
Tony Asleson
2015-02-23 21:57:05 UTC
Permalink
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libstoragemgmt".

The branch, master has been updated
via 0797f76a42423ea6e97edd6bf19913cc1946043c (commit)
via 78955edd5e87ec210b139bccbc2c88bf2c7c64b3 (commit)
via cfc21f763bc282d1465cdec1ab2b0ef51300774f (commit)
via c712b12be8aaf5ebcd9a59a9758f413a8a60154b (commit)
via f31abc8becfe5104f6173974acca64488b3f5181 (commit)
via 147107b1c96a74ebbac0b9383624f16eaba37470 (commit)
via 164a594c53edd6ef33d2ec2720a118f65e99bc13 (commit)
via 5fea4808753ae32b880e94e69998d7c75429ec51 (commit)
via c732a62e77631177eef28b5c0339bc4097b05631 (commit)
from 686269d40954b0097f21a0f817c4a27abd175fad (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0797f76a42423ea6e97edd6bf19913cc1946043c
Author: Tony Asleson <***@redhat.com>
Date: Mon Feb 23 15:10:32 2015 -0600

Add delay in runtests.sh

Signed-off-by: Tony Asleson <***@redhat.com>

commit 78955edd5e87ec210b139bccbc2c88bf2c7c64b3
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:29 2015 +0800

Simulator Plugin: Use sqlite3 to replace risky pickle

* Replace SimData class(pickle) with BackStore class(sqlite3):
* SimPlugin:
1. Simple code to demonstrate how plugin should look like.
Plan to use this file to hold python plugin developer guide.
* SimArray:
1. Handling lsm_data <-> sim_data converting.
2. Session/Transaction management for data consistency of each API
call using BackStore.trans_begin(), trans_commit() and
trans_rollback().
* BackStore:
1. Organize sim_data from sqlite3 data file.
2. Raise LsmError for each following lsm API definition.
# It will save a lot of sqlite query time and code to do this in
# BackStore class in stead of SimArray even SimArray seems a better
# place to handle LsmError.

* If statefile not exist, will create new file with 666 permission just
in case someday we let simulator plugin running as root.

* No complex data layout in database. Just integer, long, and text.

* This patch purely maintain the same behaviour of old code except:
1. Add replication support.
2. Add timeout support using sqlite transaction lock timing.
3. Add fs snapshot and clone support.
4. Add more lsm API compliant LsmError handling.

* Tested with 100 thread of lsmcli for concurrency action:
# Concurrent creating
for x in `seq 1 100`;
do
lsmenv sim lsmcli ac --name gris_ag_1$x \
--init iqn.1986-05.com.example:gris-9$x --sys sim-01 -s &
done
# Duplicate creating
for x in `seq 1 100`;
do
lsmenv sim lsmcli ac --name gris_ag_10 \
--init iqn.1986-05.com.example:gris-10 --sys sim-01 -s &
done

* Tested by plugin_test.
* Passed 'make check' test.

Changes in V2:

* Use str(sql_error) to replace sql_error.message. The later has been
deprecated.

* Add "PRAGMA foreign_keys = ON;" to enforce the dependency delete.
Removed unneeded REFERENCES child deletion.

* Explicitly specify cascade delete action for child reference column when
parent got deleted, example:
FOREIGN KEY(pool_id) REFERENCES pools(id) ON DELETE CASCADE

* Delegate complex calculation to database by creating these SQL VIEWS:
* pools_view
Handle total_space and free-space calculation.
* disks_view
Handle disk.name generation.
* volumes_by_ag_view
Handle volume mask query base on access group ID.
* ags_view
Handle AccessGroup.init_type and AccessGroup.init_ids calculation.
The AccessGroup.init_ids will stored sim_ag['init_ids_str'] string
splatted by '#'(BackStore._LIST_SPLITTER).
# I am a SQL rookie, let me know if storing list as string in SQL VIEW
# break any SQL fundamental rules.
The AccessGroup.init_type is determined by database by counting the
unique init_type of initiators.
* ags_by_vol_view
Handle volume mask query base on volume ID.
* exps_view
Handle NfsExport.root, NfsExport.rw, and NfsExport.ro calculation.
Using the same algorithm of AccessGroup.init_ids in ags_view.

* Update sim_xxxs() methods by using above SQL views.

* Remove unneeded functions:
* _list_to_dict_by_id()
* _sort_by_id()

* Change md_wrapper() to wrapper().

* Since the python-sqlite2 module in Fedora 21 does not using identical
error string as RHEL 6 and 7 do, remove error string check after
expecting sqlite3.IntegrityError.

* Tested by 'make rpm'[1] on:
* RHEL 6 and 7
* Centos 6 and 7
* Fedora 20 and 21
* OpenSuSE 13.1 and 13.2

[1] 'make rpm' will run 'make check' which contains C unit test,
lsmcli test and plugin test against simulator plugin.

Signed-off-by: Gris Ge <***@redhat.com>

commit cfc21f763bc282d1465cdec1ab2b0ef51300774f
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:28 2015 +0800

C Unit Test: Only perform lsm_fs_child_dependency_delete against sim plugin

* The current code of lsm_fs_child_dependency() in simulator C plugin
is incorrect:
1. It only check the existence of a file system.
2. Always return 0(not depended).

* Instead of fixing simulator C plugin[1], this patch restrict the
lsm_fs_child_dependency_delete() test to simulator plugin only.

[1] Have plan to use sqlite for state storing like simulator python plugin do.

Signed-off-by: Gris Ge <***@redhat.com>

commit c712b12be8aaf5ebcd9a59a9758f413a8a60154b
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:27 2015 +0800

C Unit Test: Fix LAST_INIT_IN_ACCESS_GROUP error.

* Don't remove the last initiator from a test access group.

Signed-off-by: Gris Ge <***@redhat.com>

commit f31abc8becfe5104f6173974acca64488b3f5181
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:26 2015 +0800

C Unit Test: Handle LSM_ERR_NO_STATE_CHANGE error of lsm_volume_child_dependency_delete

* Ignore LSM_ERR_NO_STATE_CHANGE error when calling
lsm_volume_child_dependency_delete() in test_smoke_test which actually
don't created volume any child dependency.

Signed-off-by: Gris Ge <***@redhat.com>

commit 147107b1c96a74ebbac0b9383624f16eaba37470
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:25 2015 +0800

lsmcli Test: Fix LAST_INIT_IN_ACCESS_GROUP error

Problem:
The test will fail at LAST_INIT_IN_ACCESS_GROUP error.

Root cause:
LSM API design does not allow removing the last initiator from access
group.

Fix:
Only remove one initiator when testing access_group_remove_init().

Signed-off-by: Gris Ge <***@redhat.com>

commit 164a594c53edd6ef33d2ec2720a118f65e99bc13
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:24 2015 +0800

lsmcli Test: Fix NO_STATE_CHANGE error in fs_child_dependancy_rm test.

Problem:
The test will fail at NO_STATE_CHANGE error in fs_child_dependancy_rm
test.

Root cause:
Newly created file system does not have any child dependency.

Fix:
Create a file system clone before calling fs_child_dependancy_rm().

Signed-off-by: Gris Ge <***@redhat.com>

commit 5fea4808753ae32b880e94e69998d7c75429ec51
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:23 2015 +0800

lsmcli Test: Fix pool name to ID converting method

* Problem:
When 'lsm_test_aggr' pool is not the pool with longest pool name.
name_to_id() will not able to get the ID of 'lsm_test_aggr' pool.

* Root cause:
lsmcli use white space to fill in to align column while parse_display()
didn't stripe the white space out.

* Fix:
Use str.strip() method to remove the tailing white space in
parse_display().

Signed-off-by: Gris Ge <***@redhat.com>

commit c732a62e77631177eef28b5c0339bc4097b05631
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 23 21:30:22 2015 +0800

RPM SPEC: Fix missing owner of /etc/lsm

* Assign /etc/lsm to libstoragemgmt(or libstoragemgmt1 on SuSE) rpm package.

Signed-off-by: Gris Ge <***@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
packaging/libstoragemgmt.spec.in | 1 +
plugin/sim/simarray.py | 3259 +++++++++++++++++++++++---------------
plugin/sim/simulator.py | 7 +-
test/cmdtest.py | 4 +-
test/runtests.sh | 3 +
test/tester.c | 29 +-
6 files changed, 2010 insertions(+), 1293 deletions(-)


hooks/post-receive
--
libstoragemgmt
Loading...