Change in vdsm[master]: Removing safelease code from vdsm and requires the package i...

2015-05-12 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: Removing safelease code from vdsm and requires the package 
instead
..


Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/40724
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c476fcab4e51edfb920842502b3cece8b2c6ca5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Eyal Edri ee...@redhat.com
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Removing safelease code from vdsm and requires the package i...

2015-05-11 Thread automation
automat...@ovirt.org has posted comments on this change.

Change subject: Removing safelease code from vdsm and requires the package 
instead
..


Patch Set 1:

* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 
'ovirt-3.4', 'ovirt-3.3'])

-- 
To view, visit https://gerrit.ovirt.org/40724
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c476fcab4e51edfb920842502b3cece8b2c6ca5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Removing safelease code from vdsm and requires the package i...

2015-05-11 Thread ybronhei
Yaniv Bronhaim has uploaded a new change for review.

Change subject: Removing safelease code from vdsm and requires the package 
instead
..

Removing safelease code from vdsm and requires the package instead

This allows to have vdsm with noarch dependency

Change-Id: I0c476fcab4e51edfb920842502b3cece8b2c6ca5
Signed-off-by: Yaniv Bronhaim ybron...@redhat.com
---
M .gitignore
M debian/vdsm.install
M vdsm.spec.in
M vdsm/storage/protect/Makefile.am
D vdsm/storage/protect/safelease.c
5 files changed, 1 insertion(+), 724 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/40724/1

diff --git a/.gitignore b/.gitignore
index 54cbc46..24a1016 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,7 +59,6 @@
 vdsm/mk_sysprep_floppy
 vdsm/mom.conf
 vdsm/sos/vdsm.py
-vdsm/storage/protect/safelease
 vdsm/storage/lvm.env
 vdsm/storage/vdsm-lvm.rules
 vdsm/storage/vdsm_lvm_rules.template
diff --git a/debian/vdsm.install b/debian/vdsm.install
index 34de4fb..c947e5c 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -27,7 +27,6 @@
 ./usr/libexec/vdsm/fc-scan
 ./usr/libexec/vdsm/ovirt_functions.sh
 ./usr/libexec/vdsm/persist-vdsm-hooks
-./usr/libexec/vdsm/safelease
 ./usr/libexec/vdsm/spmprotect.sh
 ./usr/libexec/vdsm/spmstop.sh
 ./usr/libexec/vdsm/unpersist-vdsm-hook
diff --git a/vdsm.spec.in b/vdsm.spec.in
index a0891b5..1c1ef99 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -165,6 +165,7 @@
 Requires: curl
 Requires: %{name}-xmlrpc = %{version}-%{release}
 Requires: %{name}-jsonrpc = %{version}-%{release}
+Requires: safelease
 
 %if 0%{?rhev_build}
 Requires: mom = 0.4.1-4
@@ -1203,7 +1204,6 @@
 %{_datadir}/%{vdsm_name}/storage/volume.py*
 %{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py*
 %{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py*
-%{_libexecdir}/%{vdsm_name}/safelease
 %{_libexecdir}/%{vdsm_name}/spmprotect.sh
 %{_libexecdir}/%{vdsm_name}/spmstop.sh
 %dir %{_libexecdir}/%{vdsm_name}/hooks
diff --git a/vdsm/storage/protect/Makefile.am b/vdsm/storage/protect/Makefile.am
index feb40a9..1eb4661 100644
--- a/vdsm/storage/protect/Makefile.am
+++ b/vdsm/storage/protect/Makefile.am
@@ -6,11 +6,6 @@
 # LICENSE_GPL_v2 which accompany this distribution.
 #
 
-vdsmexec_PROGRAMS = safelease
-
 dist_vdsmexec_SCRIPTS = \
spmprotect.sh  \
spmstop.sh
-
-safelease_SOURCES = \
-   safelease.c
diff --git a/vdsm/storage/protect/safelease.c b/vdsm/storage/protect/safelease.c
deleted file mode 100644
index 3814231..000
--- a/vdsm/storage/protect/safelease.c
+++ /dev/null
@@ -1,716 +0,0 @@
-/* Locker */
-#define _GNU_SOURCE 1
-#include stdarg.h
-#include stdio.h
-#include stdlib.h
-#include unistd.h
-#include string.h
-#include sys/types.h
-#include sys/time.h
-#include sys/stat.h
-#include fcntl.h
-#include errno.h
-#include time.h
-#include signal.h
-
-#define WARN(fmt, args...)  warn(__FUNCTION__, fmt, ## args)
-#define PANIC(fmt, args...) panic(__FUNCTION__, fmt, ## args)
-#define DEBUG(fmt, args...)do { if (debug) warn(__FUNCTION__, fmt, ## 
args); } while (0)
-
-char *freetag = --FREE--;
-enum {
-idlen = 16,
-stamplen = 16,
-taglen = idlen + stamplen,
-};
-
-char *progname;
-int debug;
-
-char *id;
-char *path;
-char *request;
-
-long lease_ms;
-long op_max_ms;
-char *iobuf;
-
-inline unsigned long long tv2msec(struct timeval *tv);
-int renew(int fd, off_t offset, char *id, long long *ts);
-
-void
-panic(const char const *fn, char *msg, ...)
-{
-char buf[512];
-va_list va;
-int n;
-
-va_start(va, msg);
-n = vsprintf(buf, msg, va);
-va_end(va);
-buf[n] = 0;
-
-fprintf(stderr, panic: [%d] %s: %s: (%m)\n, getpid(), fn, buf);
-
-exit(-1);
-}
-
-void
-warn(const char const *fn, char *msg, ...)
-{
-struct timeval tv;
-long long unsigned tscurr;
-char buf[512];
-va_list va;
-int n;
-
-va_start(va, msg);
-n = vsprintf(buf, msg, va);
-va_end(va);
-buf[n] = 0;
-
-gettimeofday(tv, 0);
-tscurr = tv2msec(tv);
-
-fprintf(stderr, [%s:%d:%llu]: %s: %s\n, progname, getpid(), tscurr, fn, 
buf);
-}
-
-void
-usage(void)
-{
-fprintf(stderr, Usage: %s [ -h ] op  [...]\n, progname);
-fprintf(stderr, Ops:\n
- acquire [ -r path ] [ -b ] [ -o offset ] path id lease_ms 
op_max_ms\n
- renew   [ -r path ] [ -o offset ] [ -t laststamp ] path id 
lease_ms op_max_ms\n
- release [ -f ] [ -o offset ] path id\n
- query   [ -o offset ] path\n
- protect [ -r path -i id] [ -o offset ] path lease_ms 
op_max_ms progname [param1 ...]\n
-);
-fprintf(stderr, \nNotes:\n
--b - busy loop on lease until lease acquired\n
--f - force release even if lease id is not equal to id\n
--o - offset to lease in path (default is 0)\n
--t - timestamp of last successful renewal\n
-Path is a path to a device 

Change in vdsm[master]: Removing safelease code from vdsm and requires the package i...

2015-05-11 Thread ybronhei
Yaniv Bronhaim has posted comments on this change.

Change subject: Removing safelease code from vdsm and requires the package 
instead
..


Patch Set 1:

don't worry, nobody signed it as verified and I mostly aware of what I do .. 
please fix the repo for f20 job in the meanwhile

-- 
To view, visit https://gerrit.ovirt.org/40724
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c476fcab4e51edfb920842502b3cece8b2c6ca5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Eyal Edri ee...@redhat.com
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Removing safelease code from vdsm and requires the package i...

2015-05-11 Thread eedri
Eyal Edri has posted comments on this change.

Change subject: Removing safelease code from vdsm and requires the package 
instead
..


Patch Set 1: Code-Review-1 Verified-1

missing saferelease rpm, please ensure it's avaliable via one of the existing 
repos or request infra help to add it from a 3rd party repo.

-- 
To view, visit https://gerrit.ovirt.org/40724
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c476fcab4e51edfb920842502b3cece8b2c6ca5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Eyal Edri ee...@redhat.com
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches