Discussion:
[Libstoragemgmt-devel] [SCM] libstoragemgmt branch, master, updated. 1.1.0-23-g686269d
Tony Asleson
2015-02-11 14:41:34 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 686269d40954b0097f21a0f817c4a27abd175fad (commit)
via 36f3f5b9e7efbb1a2c590f329d19af79d37b7d6e (commit)
via d8a223bb51e6c3059d662417908d24a9f2f2077b (commit)
via 9e52795f937a496ac32a15a322c20bbf4c7bb153 (commit)
via 143e7633c383d2a84db0acfdcc69e0978f879422 (commit)
via 2f6136dd60343b1e46a5fd2c840fe340402f54b2 (commit)
via 41a54c75196dd5e3fdd8663a71e460f154a4b795 (commit)
via 16e878dfe02d11ffaf4dc6efec3f310c154d0ed5 (commit)
via aba5b24aaa02dda3133f1a1ff57189e4c548e518 (commit)
from abf0f980abb06f89712160dc25e47db3a98cda79 (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 686269d40954b0097f21a0f817c4a27abd175fad
Author: Tony Asleson <***@redhat.com>
Date: Mon Feb 9 19:22:09 2015 +0800

Man page updates for lsmd.conf

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

Change in V2 by Gris Ge:

* Remove a line mentioned 'linux plugin' which has been dropped from release.

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

commit 36f3f5b9e7efbb1a2c590f329d19af79d37b7d6e
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 9 19:22:08 2015 +0800

New Plugin: MegaRAID plugin using storcli binary tool.

* Using storcli(LSI binary tool).

* Currently only got 'systems()' and 'disks()' supported.

* This plugin require root privilege, plugin config file included.

* Autotools files updated.

* RPM SPEC updated with new sub package:
libstoragemgmt-megaraid-plugin (RHEL/Fedora/Centos)
or
libstoragemgmt1-megaraid-plugin (OpenSuSE)
* The URI for this plugin is:
megaraid://
or
megaraid://?storcli=<path_of_storcli>

* If SELinux enabled, please check SELinux logs to grant permission for this.
For exmaple:
grep storcli64 /var/log/audit/audit.log | audit2allow -M mypol
semodule -i mypol.pp

* Added new manpage: megaraid_lsmplugin(1).

* Tested on RHEL6 and RHEL7 for SAS and SATA disks.

Changes in V2:

* Update manpage megaraid_lsmplugin(1):
1. Fix incorrect spells.
2. Indicate SELinux might stop plugin accessing the hardware.

* Include disk ID in Disk.name. The disk ID is required to query SMART
information via command:
smartctl -a -d megaraid,10 /dev/sda
^^--> disk ID

* Improve disk type detecting base LSI engineer's feedback.

* Fix typo excutable -> executable.

* Add 'INVALID_ARGUMENT' error when plugin was not run as root.

* Change base class to inherit from IPlugin.

* Implement(as not supported) the abstract method defined by IPlugin:
* job_free
* job_status
* pools
* time_out_get
* time_out_set

* Add '--without-megaraid' option to configure to skip installing the
MegaRAID plugin.

* Add '--without megaraid' option to rpm SPEC to skip building the
MegaRAID plugin rpm.

* Change rpm package for megaraid plugin as noarch.

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

commit d8a223bb51e6c3059d662417908d24a9f2f2077b
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 9 19:22:07 2015 +0800

lsmenv: Support new feature of lsmd for root privilege.

* 'sudo' is required to run 'lsmenv lsmd' command for these reason:
1. Support plugin run as root privilege feature.
2. Create libstoragemgmt user and grant it with read and execute access
to current code tree.

* With this change, please link your '.lsm_uri' file to '/root' folder.
So that 'sudo lsmenv mega lsmcli ls' can read out URI settings.
Try this command:

sudo ln -s ~/.lsm_uri /root/

Changes in V2:

* Allowing 'lsmenv lsmdv' to start lsmd with valgrind and ouput valgrind
report to "/tmp/lsmd_leaking_<pid_id>".

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

commit 9e52795f937a496ac32a15a322c20bbf4c7bb153
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 9 19:22:06 2015 +0800

lsmd Daemon: New feature: allowing plugin run as root.

* This patch allow plugins running as root privilege if these conditions
are all meet:
1. "allow-plugin-root-privilege = true;" in /etc/lsm/lsmd.conf
# This allows admin to disable root privilege globally.

2. "require-root-privilege = true;" in plugin config:
/etc/lsm/pluginconf.d/<uri_scheme>.conf
# This allows plugin level config.

3. API connection(or lsmcli) is ran by root user.
# This is for security concern.

* Warning message will be printed or redirect to syslog(depend on lsmd
command line option '-d') by lsmd if any of above condition failed.
It's plugin's responsibility to provide proper error message to API client.

* If no plugin installed has 'require-root-privilege = true;' config line,
lsmd will drop the non-root privilege.

* Implementation:
1. Use libconfig 1.3.2+ to read config files.
(might works on older version, but only tested on RHEL 6)
2. Use getsockopt() to get API client uid.

* Autotools config file updated.

* RPM SPEC file updated.

* The default installation will install lsmd.conf with
"allow-plugin-root-privilege = true;".
With this, plugins could work out of box by installing correct config
into /etc/lsm/pluginconf.d/ folder.

* New manpage 'lsmd.conf(5)'.

* Sample plugin config "pluginconf.d/sim.conf" created with
"require-root-privilege = false;" as a demonstration.

* Updated systemd service file 'libstoragemgmt.service' by
changing running user from 'libstoragemgmt' to 'root'.

* Known bug:
1. Rebuild the source rpm will fail at test stage when run as root user
with libstoragemgmt user account.
Root cause:
As lsmd will try to drop privilege to libstoragemgmt user which
has no read access to the plugin directory.
Workaround:
A: Don't compile as root as everyone(except Slackware) suggests.
B: Remove libstoragemgmt user account.

Changes in V2:

* Fix memory leak in new method parse_conf_bool().
Since config_destroy() does not deallocate the config_t structure itself,
we have to do that free.
* Fix buffer outrun in chk_pconf_root_pri().

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

commit 143e7633c383d2a84db0acfdcc69e0978f879422
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 9 19:22:05 2015 +0800

lsmcli: Add missing Disk.TYPE_SCSI

* Show Disk.TYPE_SCSI as 'SCSI' instead of 'Unknown(8)'

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

commit 2f6136dd60343b1e46a5fd2c840fe340402f54b2
Author: Gris Ge <***@redhat.com>
Date: Mon Feb 9 19:22:04 2015 +0800

lsmd: Remove incorrect log in child_cleanup()

Problem:
lsmd will keep printing out(info level) message below every 15 seconds:
'waitid 10 - No child processes'

Root cause:
In _serving() method, the select() call will timeout at tmo(15 seconds).
When timeout, actually not child process has been created.
This cause waitid() complain about '10 - No child processes'.

Fix:
Don't print out this message if the error of waitid() is ECHILD.

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

commit 41a54c75196dd5e3fdd8663a71e460f154a4b795
Author: Tony Asleson <***@redhat.com>
Date: Mon Feb 9 19:22:03 2015 +0800

lsmd: Clean up logging

- Renamed loud() to log_and_exit()
- Changes the logger function to use severity in syslog
call

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

Changes in V2:

- Rebase to current master(b933bccad3ee29538f6200ae1b26e3644e9358fe).

Changes in V3:

- Fixed up calls to loud from newly added patch for checking
signal handler install.

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

commit 16e878dfe02d11ffaf4dc6efec3f310c154d0ed5
Author: Ma Shimiao <***@cn.fujitsu.com>
Date: Thu Jan 8 17:29:08 2015 +0800

cmdline.py: fix _get_item error message

For example, if we can't find access group with id ag1:
Before fixed:
'Access Gruop ID with id ag1 not found' will be printed.
Or 'access group id with id ag1 not found' will be printed.
After fixed:
'Access Gruop with ID ag1 not found' will be printed.

Messages will be more clear and have the same format.

Signed-off-by: Ma Shimiao <***@cn.fujitsu.com>

commit aba5b24aaa02dda3133f1a1ff57189e4c548e518
Author: Ma Shimiao <***@cn.fujitsu.com>
Date: Tue Dec 23 15:37:24 2014 +0800

lsmd: add error catch for signal

Signed-off-by: Ma Shimiao <***@cn.fujitsu.com>

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

Summary of changes:
Makefile.am | 2 +-
config/Makefile.am | 13 +
config/lsmd.conf | 1 +
config/pluginconf.d/megaraid.conf | 1 +
config/pluginconf.d/sim.conf | 1 +
configure.ac | 24 ++
daemon/Makefile.am | 4 +-
daemon/lsm_daemon.c | 288 ++++++++++++++----
doc/man/Makefile.am | 5 +
doc/man/lsmd.conf.5.in | 56 ++++
doc/man/megaraid_lsmplugin.1.in | 52 ++++
packaging/daemon/libstoragemgmt.service | 2 +-
packaging/libstoragemgmt.spec.in | 47 +++
plugin/Makefile.am | 2 +-
plugin/megaraid/Makefile.am | 8 +
plugin/megaraid/__init__.py | 1 +
plugin/megaraid/megaraid.py | 323 ++++++++++++++++++++
.../megaraid_lsmplugin} | 4 +-
plugin/megaraid/utils.py | 47 +++
tools/lsmcli/cmdline.py | 85 +++---
tools/lsmcli/data_display.py | 1 +
tools/lsmenv | 79 +++++-
22 files changed, 933 insertions(+), 113 deletions(-)
create mode 100644 config/Makefile.am
create mode 100644 config/lsmd.conf
create mode 100644 config/pluginconf.d/megaraid.conf
create mode 100644 config/pluginconf.d/sim.conf
create mode 100644 doc/man/lsmd.conf.5.in
create mode 100644 doc/man/megaraid_lsmplugin.1.in
create mode 100644 plugin/megaraid/Makefile.am
create mode 100644 plugin/megaraid/__init__.py
create mode 100644 plugin/megaraid/megaraid.py
copy plugin/{smispy/smispy_lsmplugin => megaraid/megaraid_lsmplugin} (92%)
create mode 100644 plugin/megaraid/utils.py


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