Hi Guys,
I created a python API of multipath using the JSON output of multipathd
like what we did C API -- libdmmp:
https://github.com/cathay4t/python-dmmp
Does upstream want it maintained in the codebase of multipath-tools?
Thanks.
--
Gris Ge
signature.asc
Description: PGP signature
Hi Xose Vazquez Perez,
Looks good to me. The libdmmp manpage generated by it is identical(new
kernel-doc make a small improvement of dmmp_context_log_func_set.3 on
removing unneeded spaces).
Thanks.
On Fri, Nov 17, 2017 at 05:54:25PM +0100, Xose Vazquez Perez wrote:
> Cc: Gris Ge
K_REALTIME for pthread_mutex_timedlock().
Signed-off-by: Gris Ge <f...@redhat.com>
---
multipathd/cli.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/cli.c b/multipathd/cli.c
index deb72cbe..f10f862c 100644
--- a/multipathd/cli.c
+++ b/multipathd/cli.c
@@ -480,7 +48
* New function dmmp_last_error_msg() to retrieve the last error
message.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libdmmp/libdmmp.c | 9 +
libdmmp/libdmmp/libdmmp.h | 15 +++
libdmmp/test/libdmmp_test.c | 12
3 files changed, 32 inse
* Indicate user does not have privilege to flush mpath or invoke
reconfig.
* Bump API version to 0.2.0 for this API addition.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libdmmp/Makefile | 2 +-
libdmmp/libdmmp.c | 8
libdmmp/libdmmp/libdmmp.h | 5 +
l
* Patch 1/4 is a resend.
* Patch 2/4, 3/4, and 4/4 add new functions to libdmmp library.
Gris Ge (4):
multipathd daemon: Fix incorrect use of CLOCK_MONOTONIC in pthread
multipath-tools: libdmmp: Allow log function as NULL.
multipath-tools: libdmmp: Add new function dmmp_last_error_msg
New functions:
* dmmp_reconfig() to invoke reconfiguration of multipathd daemon.
* dmmp_flush_mpath() to flush/del unused mpath.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libdmmp/libdmmp.c | 143 +---
libdmmp/libdmmp/libdmmp.h
infinite, only return
when error or pass.
* Updated libdmmp.h document to to indicate timeout 0 as infinite.
* Increase timeout setting in libdmmp test case to test this
mechanism.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libdmmp/libdmmp.c
K_REALTIME for pthread_mutex_timedlock().
Signed-off-by: Gris Ge <f...@redhat.com>
---
multipathd/cli.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/cli.c b/multipathd/cli.c
index 32d49766..002abe61 100644
--- a/multipathd/cli.c
+++ b/multipathd/cli.c
@@ -475,7 +47
use the monotonic clock? See also libmultipath/time-util.c.
>
> Bart.
Hi Bart,
I missed the pthread_cond_init_mono().
Will send V2 patch without this change.
Thanks.
--
Gris Ge
signature.asc
Description: PGP signature
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
K_REALTIME for pthread_mutex_timedlock() and
pthread_cond_timedwait().
Signed-off-by: Gris Ge <f...@redhat.com>
---
multipathd/cli.c | 2 +-
multipathd/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/multipathd/cli.c b/multipathd/cli.c
index 32d49766.
According to https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html ,
type attributes should be placed immediately after the struct, union or
enum keyword.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libdmmp/libdmmp/libdmmp.h | 8
libdmmp/libdmmp_private.h | 3 ++-
2 files chan
informations for an initial review. I will send more patches to
expose the rest informations afterwords.
Thank you.
Best regards.
[1]: https://www.redhat.com/archives/dm-devel/2016-July/msg00060.html
[2]: https://www.redhat.com/archives/dm-devel/2017-January/msg00205.html
--
Gris Ge
signature.asc
* Just free_config() before exit.
Signed-off-by: Gris Ge <f...@redhat.com>
---
multipathd/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/multipathd/main.c b/multipathd/main.c
index 1e64afc..2f5042e 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2633,6 +2633,7 @
root" will be sent
otherwise.
Signed-off-by: Gris Ge <f...@redhat.com>
---
multipathd/main.c | 12 +++-
multipathd/uxlsnr.c | 19 +++
multipathd/uxlsnr.h | 4 +++-
3 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/multipathd/main.c b/multipa
* Removed these unused functions from libmultipath:
* write_all()
* read_all()
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmultipath/uxsock.c | 60 ---
libmultipath/uxsock.h | 2 --
2 files changed, 62 deletions(-)
diff
Enforce what mpath_cmd.h states "-1 on failure (with errno set)" for
mpath_recv_reply() by set errno and return -1 on failure.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmpathcmd/mpath_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmpathc
Error:
../libmultipath/libmultipath.so: undefined reference to
`rcu_register_thread_mb'
../libmultipath/libmultipath.so: undefined reference to
`rcu_unregister_thread_mb'
Fix:
Link the libmultipath with -lurcu
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmul
the limitation of MAX_REPLY_LEN in libmpathcmd.
* New functions `recv_packet_from_client()` in uxsock.h of libmultipath
which enforce the limitation of buffer size to 512(_MAX_CMD_LEN).
* Change multipathd socket listener to use
`recv_packet_from_client()`.
Signed-off-by: Gris Ge
Patch 5/5 is a resend.
Other patches are rework of 'multipath: Introducing multipath C API' patch set.
Gris Ge (5):
multipath-tools: libmultipath: fix gcc link failure on
rcu_register_thread_mb.
multipath-tools: libmultipath: Removed unused functions.
multipath-tools: New way to limit
On Fri, Aug 12, 2016 at 08:12:36PM +0800, Gris Ge wrote:
> Changes since V6:
> * Add new patch(1/4) to block SIGPIPE when write() in libmpathcmd.
> * Patch 2/4 does not have 'send_packet_daemon_only()' as SIGPIPE already
>handled by libmpathcmd.
The mail list system drop pat
Enforce what mpath_cmd.h states "-1 on failure (with errno set)" for
mpath_recv_reply() by set errno and return -1 on failure.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmpathcmd/mpath_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmpathc
that patch again:
https://github.com/cathay4t/multipath-tools/commit/b992056a447b90251a65aa4919055c70aa62a498.patch
Changes since V3:
* New way to limit the IPC command length.
* Treat IPC connection refuse error as DMMP_ERR_NO_DAEMON.
Gris Ge (4):
libmpathcmd: Block SIGPIPE when write
send something like 'fake command' to daemon which
lead daemon to allocate a big chunk of memory.
* Due to the removal of uxsock.h from libmultipath, all IPC connection
except (multipathd daemon) should use libmpathcmd instead.
Signed-off-by: Gris Ge &l
* Just block SIGPIPE when write() and restore it when done.
* Use 'errno_save()' to preserve the errno of write().
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmpathcmd/mpath_cmd.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/libmp
On Fri, Jul 15, 2016 at 04:35:45PM -0500, Benjamin Marzinski wrote:
> On Tue, Jul 12, 2016 at 02:50:36PM +0800, Gris Ge wrote:
>
> The only thing that I wonder about with this patch is, when previously
> the multipath client code would have failed with EPIPE, and (at least in
> s
root" will be sent
otherwise.
Signed-off-by: Gris Ge <f...@redhat.com>
---
multipathd/main.c | 13 +++--
multipathd/uxlsnr.c | 19 +++
multipathd/uxlsnr.h | 4 +++-
3 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/multipathd/main.c b/m
.
* Treat IPC connection refuse error as DMMP_ERR_NO_DAEMON.
Gris Ge (3):
multipath-tools: New way to limit the IPC command length.
multipath-tools: Set errno mpath_recv_reply() when failure
multipath-tools: Introducing multipath C API
.gitignore|4 +
Makefile
send something like 'fake command' to daemon which
lead daemon to allocate a big chunk of memory.
* Due to the removal of uxsock.h from libmultipath, all IPC connection
except (multipathd daemon) should use libmpathcmd instead.
Signed-off-by: Gris Ge &l
Enforce what mpath_cmd.h states "-1 on failure (with errno set)" for
mpath_recv_reply() by set errno and return -1 on failure.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmpathcmd/mpath_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmpathc
On Sun, Jul 10, 2016 at 06:23:39PM +0200, Xose Vazquez Perez wrote:
> Gris Ge wrote:
>
> > diff --git a/libdmmp/Makefile b/libdmmp/Makefile
> > new file mode 100644
> > index 000..ce7ca3f
> > --- /dev/null
> > +++ b/libdmmp/Makefile
> > @
On Mon, Jul 04, 2016 at 06:32:56PM +0200, Xose Vazquez Perez wrote:
> Gris Ge wrote:
>
> > + perl -i -pe 's|__INCLUDEDIR__|$(includedir)|g' \
> > + $(DESTDIR)/$(pkgconfdir)/$(PKGFILE)
>
> Please, replace perl with sed, awk or any other basic tool.
>
Hi Xos
Enforce what mpath_cmd.h states "-1 on failure (with errno set)" for
mpath_recv_reply() by set errno and return -1 on failure.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmpathcmd/mpath_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmpathc
send something like 'fake command' to daemon which
lead daemon to allocate a big chunk of memory.
* Due to the removal of uxsock.h from libmultipath, all IPC connection
except (multipathd daemon) should use libmpathcmd instead.
Signed-off-by: Gris Ge &l
Changes since V3:
* New way to limit the IPC command length.
* Treat IPC connection refuse error as DMMP_ERR_NO_DAEMON.
Gris Ge (3):
multipath-tools: New way to limit the IPC command length.
multipath-tools: Set errno mpath_recv_reply() when failure
multipath-tools: Introducing multipath
On Mon, Jul 04, 2016 at 05:17:01PM +0800, Gris Ge wrote:
> Changes since V3:
> * Replace limitation of MAX_REPLY_LEN with MAX_SEND_CMD_LEN.
> * Treat IPC connection refuse error as DMMP_ERR_NO_DAEMON.
>
> Gris Ge (3):
> multipath-tools: New way to limit the IPC command len
send something like 'fake command' to daemon which
lead daemon to allocate a big chunk of memory.
* Due to the removal of uxsock.h from libmultipath, all IPC connection
except (multipathd daemon) should use libmpathcmd instead.
Signed-off-by: Gris Ge &l
Changes since V3:
* Replace limitation of MAX_REPLY_LEN with MAX_SEND_CMD_LEN.
* Treat IPC connection refuse error as DMMP_ERR_NO_DAEMON.
Gris Ge (3):
multipath-tools: New way to limit the IPC command length.
multipath-tools: Set errno mpath_recv_reply() when failure
multipath-tools
Enforce what mpath_cmd.h states "-1 on failure (with errno set)" for
mpath_recv_reply() by set errno and return -1 on failure.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmpathcmd/mpath_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmpathc
On Mon, Jul 04, 2016 at 08:05:19AM +0200, Hannes Reinecke wrote:
> On 07/02/2016 02:25 AM, Gris Ge wrote:
> > On Fri, Jul 01, 2016 at 04:46:53PM +0200, Hannes Reinecke wrote:
> >>> -#define MAX_REPLY_LEN65536
> >>> +#define MAX_REPLY_LEN10
Changes since V2:
* Use json interface "show maps json".
* Removed the use of enum.
* Use libmpathcmd for IPC communication.
* Include two trivial fixes for libmpathcmd.
Gris Ge (3):
multipath-tools: Increase MAX_REPLY_LEN.
multipath-tools: Set errno mpath_recv_reply() wh
Enforce what mpath_cmd.h states "-1 on failure (with errno set)" for
mpath_recv_reply() by set errno and return -1 on failure.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmpathcmd/mpath_cmd.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --g
* No need to zero memory before snprintf which will always terminate
the string with '\0'.
Signed-off-by: Gris Ge <f...@redhat.com>
---
libmultipath/print.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/libmultipath/print.c b/libmultipath/print.c
index 2d159ed
On Fri, May 20, 2016 at 03:59:07PM -0400, Todd Gill wrote:
>
> Hi Gris,
>
> On 05/19/2016 09:50 AM, Gris Ge wrote:
> > On Wed, May 18, 2016 at 01:26:34PM -0400, Todd Gill wrote:
> >>
> >> v4:
> >>
> >> removed space in major_version an
" \"minor_version \": %d,\n"
Got extra space in json key name: 'major_version ' and
'minor_version ', should be 'major_version' and 'minor_version'
--
Gris Ge
signature.asc
Description: PGP signature
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
negligible vote to option B), ideally the wrapper library should be
user's first choice instead messing with 'raw format'.
Thanks for the patch.
Best regards.
--
Gris Ge
signature.asc
Description: PGP signature
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On Fri, Mar 04, 2016 at 10:06:24AM -0600, Benjamin Marzinski wrote:
> On Fri, Feb 12, 2016 at 04:10:23PM +0800, Gris Ge wrote:
>
> This looks good to me. Personally, I would have loved to see
> multipathd actually passing structured data across the IPC
> connection, and have the m
of libmultipath.
* Removed DMMP_ERR_INVALID_ARGUMENT error, application will be terminated
by assert if illegal argument provided.
Gris Ge (1):
Introducing multipath C API
.gitignore|4 +
Makefile |1 +
Makefile.inc
48 matches
Mail list logo