Pete Zaitcev | 1 May 2010 06:51
Picon
Favicon

[chunkd patch 2/2] cleanup: use srv_poll_lookup

No, we did not mean anything in particular by using a naked hash
lookup here, just forgot to convert.

Signed-off-by: Pete Zaitcev <zaitcev <at> redhat.com>

---
 server/server.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/server.c b/server/server.c
index f367676..014575e 100644
--- a/server/server.c
+++ b/server/server.c
 <at>  <at>  -1681,8 +1681,7  <at>  <at>  static int main_loop(void)

 			fired++;

-			sp = g_hash_table_lookup(chunkd_srv.fd_info,
-						GINT_TO_POINTER(pfd->fd));
+			sp = srv_poll_lookup(pfd->fd);
 			if (G_UNLIKELY(!sp)) {
 				/* BUG! */
 				continue;
Pete Zaitcev | 1 May 2010 06:51
Picon
Favicon

[chunkd patch 1/2] eradicate last vestiges of libevent

We stopped using libevent in Chunk a while ago, but for some reason
not all references were removed. I tested this patch by building
on a fresh Fedora 13 system without libevent.

Signed-off-by: Pete Zaitcev <zaitcev <at> redhat.com>

---
 configure.ac       |    3 ---
 pkg/chunkd.spec    |    2 +-
 server/Makefile.am |    2 +-
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index bd142e8..5afea93 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -74,8 +74,6  <at>  <at>  dnl Checks for required libraries
 dnl -----------------------------
 AC_CHECK_LIB(crypto, MD5_Init, CRYPTO_LIBS=-lcrypto)
 AC_CHECK_LIB(ssl, SSL_new, SSL_LIBS=-lssl)
-AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent,
-   [AC_MSG_ERROR([Missing required libevent])])
 AC_SEARCH_LIBS(argp_parse, argp)
 AC_SEARCH_LIBS(bind, socket)
 PKG_CHECK_MODULES(CLDC, libcldc)
 <at>  <at>  -119,7 +117,6  <at>  <at>  AM_PATH_XML2(2.6.0, , exit 1)

 AC_SUBST(CRYPTO_LIBS)
 AC_SUBST(SSL_LIBS)
-AC_SUBST(EVENT_LIBS)
(Continue reading)

Jeff Garzik | 1 May 2010 11:35
Favicon

Re: [chunkd patch 1/2] eradicate last vestiges of libevent

On 05/01/2010 12:51 AM, Pete Zaitcev wrote:
> We stopped using libevent in Chunk a while ago, but for some reason
> not all references were removed. I tested this patch by building
> on a fresh Fedora 13 system without libevent.
>
> Signed-off-by: Pete Zaitcev<zaitcev <at> redhat.com>
>
> ---
>   configure.ac       |    3 ---
>   pkg/chunkd.spec    |    2 +-
>   server/Makefile.am |    2 +-
>   3 files changed, 2 insertions(+), 5 deletions(-)

applied 1-2

Thanks for updating the email subject lines.

	Jeff

Jeff Garzik | 2 May 2010 00:28
Favicon

iSCSI front-end for Hail

Hail devs,

Project Hail was, in part, conceived as an umbrella of libraries and 
services enabling the mating of a well known, Internet-standard API with 
a back-end that enables distributed storage.  tabled is an example of 
this:  it provides an application front-end compatible with S3 API, 
using Hail back-end services chunkd and CLD.

nfs4d[1] is a second, work-in-progress example.  nfs4d is a fully 
working NFSv4 front-end, waiting to be mated to the Hail back-end services.

A third example is something I poked at long ago, iSCSI.  The vinzvault 
announcement[2] got me thinking about the iSCSI target[3] daemon that I 
had worked on, a while ago.  vinzvault, sheepdog, DST, drbd, nbd and 
iSCSI all attempt to provide remote network attached storage, usually 
for storage on ephemeral virtual machines, similar to Amazon's Elastic 
Block Storage (EBS) on their EC2 grid.

I dusted off my "itd" (iSCSI target daemon) project, fixed a bunch of 
bugs, and got it working[4] in the hopes that this might be useful to 
Hail or vinzvault or so.

itd is a remote iSCSI service exporting one or more slices of storage as 
a standard SCSI device on your system.  It is based off of 
'netbsd-iscsi' in Fedora, which is in turn based off an old, open source 
Intel codebase.  netbsd-iscsi seemed a more pliable codebase than the 
very-nice SCSI TGT project[5].

The web browsable itd tree (with git:// URL for cloning) can be found at 
http://git.kernel.org/?p=daemon/distsrv/itd.git
(Continue reading)

Pete Zaitcev | 2 May 2010 04:56
Picon
Favicon

Re: iSCSI front-end for Hail

On Sat, 01 May 2010 18:28:42 -0400
Jeff Garzik <jeff <at> garzik.org> wrote:

> As I write this email, I am borrowing a lot of networking code from 
> tabled, to convert from GNet over to the more-flexible TCP server 
> codebase found in tabled -- notably the asynchronous background TCP 
> writing code in tabled.  Hopefully will finish and commit this by the 
> end of the weekend.

This seems crying for a common repository or something like libhail,
not sure what. Remember the timer case. Eventually we'll make changes
to tabled that itd will need to copy. But I don't know what course
is best.

-- Pete
Jeff Garzik | 2 May 2010 08:32
Favicon

Re: iSCSI front-end for Hail

On 05/01/2010 10:56 PM, Pete Zaitcev wrote:
> On Sat, 01 May 2010 18:28:42 -0400
> Jeff Garzik<jeff <at> garzik.org>  wrote:
>
>> As I write this email, I am borrowing a lot of networking code from
>> tabled, to convert from GNet over to the more-flexible TCP server
>> codebase found in tabled -- notably the asynchronous background TCP
>> writing code in tabled.  Hopefully will finish and commit this by the
>> end of the weekend.
>
> This seems crying for a common repository or something like libhail,
> not sure what. Remember the timer case. Eventually we'll make changes
> to tabled that itd will need to copy. But I don't know what course
> is best.

I was definitely thinking along those lines, when I abstracted and 
modularized the code a bit.  See attached...  I put all the TCP 
write-related code into a two structures, tcp_write_state and tcp_write. 
  The code received s/cli_wr/tcp_wr/g and other obvious, cosmetic changes.

libhail definitely seems like the direction to go.  It would be easiest 
from a packaging perspective to put it into CLD.  But maybe it deserves 
its own repo.?

	Jeff


====================================SNIP CUT HERE SNIP=========================
(Continue reading)

Pete Zaitcev | 3 May 2010 06:07
Picon
Favicon

[cld patch 1/1] use specified username in cldcli

I suspect I copy-pasted over it when I converted to ncld, but anyhow this
patch seems work and do what's expected for --user flag.

Signed-off-by: Pete Zaitcev <zaitcev <at> redhat.com>

---
 tools/cldcli.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/cldcli.c b/tools/cldcli.c
index 7c73091..79a1009 100644
--- a/tools/cldcli.c
+++ b/tools/cldcli.c
 <at>  <at>  -712,7 +712,7  <at>  <at>  int main (int argc, char *argv[])
 	dr = host_list->data;

 	nsess = ncld_sess_open(dr->host, dr->port, &error, sess_event, NULL,
-			     "cldcli", "cldcli", &cli_log);
+			     our_user, our_user, &cli_log);
 	if (!nsess) {
 		if (error < 1000) {
 			fprintf(stderr, TAG ": cannot open CLD session: %s\n",
Jeff Garzik | 3 May 2010 07:59
Favicon

Re: [cld patch 1/1] use specified username in cldcli

On 05/03/2010 12:07 AM, Pete Zaitcev wrote:
> I suspect I copy-pasted over it when I converted to ncld, but anyhow this
> patch seems work and do what's expected for --user flag.
>
> Signed-off-by: Pete Zaitcev<zaitcev <at> redhat.com>
>
> ---
>   tools/cldcli.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/cldcli.c b/tools/cldcli.c
> index 7c73091..79a1009 100644
> --- a/tools/cldcli.c
> +++ b/tools/cldcli.c
>  <at>  <at>  -712,7 +712,7  <at>  <at>  int main (int argc, char *argv[])
>   	dr = host_list->data;
>
>   	nsess = ncld_sess_open(dr->host, dr->port,&error, sess_event, NULL,
> -			     "cldcli", "cldcli",&cli_log);
> +			     our_user, our_user,&cli_log);
>   	if (!nsess) {
>   		if (error<  1000) {

applied

PS. you sent this to jeff <at> garzik.com, and unfortunately, I don't own 
that domain.  I should.  :)  For future reference, jgarzik <at> pobox.com or 
jeff <at> garzik.org are equivalent and should exist for the long term (even 
if I get fired from Red Hat or somesuch :)).

(Continue reading)

Jeff Garzik | 6 May 2010 05:02
Favicon

Re: iSCSI front-end for Hail

As of commit 23a5795e3ca555a6454b199e071482bb50655508, itd is passing 
integrity and stress tests from two test suites, iscsi-harness found in 
netbsd-iscsi pkg, and basic blkdev integrity tests using dd(1).

There is a whopping big memory leak that needs fixing, but the basics 
appear to be working.

	Jeff

Jeff Garzik | 7 May 2010 05:15
Favicon

Re: iSCSI front-end for Hail


As of itd commit 196e8f317fc7202460d7adde93dac939caf23f5d, the iSCSI 
target daemon appears to survive stress tests, and does not leak memory. 
  I call that a good first milestone.

	Jeff


Gmane