Re: [PATCH] rgw: add -lresolv flags to Makefile.am
Thanks. Pushed to the next branch. Yehuda On Sat, Nov 17, 2012 at 10:34 PM, Chen Baozi wrote: > > radosgw depends on libresolv since since the commit 951c6be. So we need to > add -lresolve flags, or it cannot link right library. > > Signed-off-by: Chen Baozi > --- > configure.ac| 1 + > src/Makefile.am | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index aa10143..d978565 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -80,6 +80,7 @@ AC_CHECK_CC_FLAG([-Wignored-qualifiers], > [WARN_IGNORED_QUALIFIERS]) > ACX_PTHREAD > AC_CHECK_LIB([uuid], [uuid_parse], [true], AC_MSG_FAILURE([libuuid not > found])) > AC_CHECK_LIB([m], [pow], [true], AC_MSG_FAILURE([libm not found])) > +AC_CHECK_LIB([resolv], [__res_nquery], [true], AC_MSG_FAILURE([libresolv not > found])) > if test x"$linux" = x"yes"; then > AC_CHECK_LIB([keyutils], [add_key], [true], > AC_MSG_FAILURE([libkeyutils not found])) > fi > diff --git a/src/Makefile.am b/src/Makefile.am > index 8b5e63d..16a7ed3 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -366,7 +366,7 @@ radosgw_SOURCES = \ > rgw/rgw_swift.cc \ > rgw/rgw_swift_auth.cc \ > rgw/rgw_main.cc > -radosgw_LDADD = $(my_radosgw_ldadd) -lfcgi > +radosgw_LDADD = $(my_radosgw_ldadd) -lfcgi -lresolv > radosgw_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS} > bin_PROGRAMS += radosgw > > -- > 1.7.11.7 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] rgw: add -lresolv flags to Makefile.am
radosgw depends on libresolv since since the commit 951c6be. So we need to add -lresolve flags, or it cannot link right library. Signed-off-by: Chen Baozi --- configure.ac| 1 + src/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index aa10143..d978565 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,7 @@ AC_CHECK_CC_FLAG([-Wignored-qualifiers], [WARN_IGNORED_QUALIFIERS]) ACX_PTHREAD AC_CHECK_LIB([uuid], [uuid_parse], [true], AC_MSG_FAILURE([libuuid not found])) AC_CHECK_LIB([m], [pow], [true], AC_MSG_FAILURE([libm not found])) +AC_CHECK_LIB([resolv], [__res_nquery], [true], AC_MSG_FAILURE([libresolv not found])) if test x"$linux" = x"yes"; then AC_CHECK_LIB([keyutils], [add_key], [true], AC_MSG_FAILURE([libkeyutils not found])) fi diff --git a/src/Makefile.am b/src/Makefile.am index 8b5e63d..16a7ed3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -366,7 +366,7 @@ radosgw_SOURCES = \ rgw/rgw_swift.cc \ rgw/rgw_swift_auth.cc \ rgw/rgw_main.cc -radosgw_LDADD = $(my_radosgw_ldadd) -lfcgi +radosgw_LDADD = $(my_radosgw_ldadd) -lfcgi -lresolv radosgw_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS} bin_PROGRAMS += radosgw -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [BUG] rbd discard should return OK even if rbd file does not exist
Hi Josh, Am 18.11.2012 um 03:38 schrieb Josh Durgin : > On 11/17/2012 02:19 PM, Stefan Priebe wrote: >> Hello list, >> >> right now librbd returns an error if i issue a discard for a sector / >> byterange where ceph does not have any file as i had never written to >> this section. > > Thanks for bringing this up again. I haven't had time to dig deeper > into it yet, but I definitely want to fix this for bobtail. > >> This is not correct. It should return 0 / OK in this case. >> >> Stefan >> >> Examplelog: >> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT >> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion: >> AioCompletion::complete_request() this=0x7f72cc05bd20 >> complete_cb=0x7f747021d4b0 >> 2012-11-02 21:06:17.649924 7f747015c780 1 -- 10.10.0.2:0/2028325 --> >> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073 >> rb.0.1044.359ed6c7.0bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0 >> 0x7f72d81c69b0 con 0x7f74600dbf50 >> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd: oid >> rb.0.1044.359ed6c7.0bdf 0~4194304 from [4156556288,4194304] >> 2012-11-02 21:06:17.649972 7f7465a6e700 1 -- 10.10.0.2:0/2028325 <== >> osd.1202 10.10.0.18:6806/9821 143 osd_op_reply(1652 >> rb.0.1044.359ed6c7.0652 [delete] ondisk = -2 (No such file or >> directory)) v4 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con >> 0x7f74600e4350 >> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write >> 0x7f74600feab0 should_complete: r = -2 > > This last line isn't printing what's actually being returned to the > application. It's still in librbd's internal processing, and will be > converted to 0 for the application. > > Could you try with the master or next branches? After the > 'should_complete' line, there should be a line like: > >20 librbd::AioCompletion: AioCompletion::finalize() > rval 0 ... No there's no such line. Maybe that's the problem and -2 is returned and not converted. Stefan > That 'rval 0' shows the actual return value the application (qemu in > this case) will see. > > Josh -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fail to build the latest ceph tree on Fedora 17
On Sat, Nov 17, 2012 at 01:20:51PM -0800, Yehuda Sadeh wrote: > On Sat, Nov 17, 2012 at 3:29 AM, Chen Baozi wrote: > > Hi, everyone. > > > > I was tring to build the latest ceph tree on my fedora 17 box. > > However, there is an error message when linking radosgw as following: > > > > CXXLD radosgw > > /usr/bin/ld: radosgw-rgw_resolve.o: undefined reference to symbol > > '__res_nquery@@GLIBC_2.2.5' > > /usr/bin/ld: note: '__res_nquery@@GLIBC_2.2.5' is defined in DSO > > /lib64/libresolv.so.2 so try adding it to the linker command line > > /lib64/libresolv.so.2: could not read symbols: Invalid operation > > collect2: error: ld returned 1 exit status > > make[3]: *** [radosgw] Error 1 > > make[3]: Leaving directory `/home/cbz/src/ceph/src' > > make[2]: *** [all-recursive] Error 1 > > make[2]: Leaving directory `/home/cbz/src/ceph/src' > > make[1]: *** [all] Error 2 > > make[1]: Leaving directory `/home/cbz/src/ceph/src' > > make: *** [all-recursive] Error 1 > > > > I've also tried build the version 0.53 which is checked out from > > fedora's pkg repo. And it can pass the building process without this > > error. > > > > Any suggestion? > > Linking with libresolv failed. Garry, any idea? I've tried to add "LIBS=-lresolv" when doing "./configure". And it works. I'm trying to fix it from the configure.ac now. > > Yehuda -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [BUG] rbd discard should return OK even if rbd file does not exist
On 11/17/2012 02:19 PM, Stefan Priebe wrote: Hello list, right now librbd returns an error if i issue a discard for a sector / byterange where ceph does not have any file as i had never written to this section. Thanks for bringing this up again. I haven't had time to dig deeper into it yet, but I definitely want to fix this for bobtail. This is not correct. It should return 0 / OK in this case. Stefan Examplelog: 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion: AioCompletion::complete_request() this=0x7f72cc05bd20 complete_cb=0x7f747021d4b0 2012-11-02 21:06:17.649924 7f747015c780 1 -- 10.10.0.2:0/2028325 --> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073 rb.0.1044.359ed6c7.0bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0 0x7f72d81c69b0 con 0x7f74600dbf50 2012-11-02 21:06:17.649934 7f747015c780 20 librbd: oid rb.0.1044.359ed6c7.0bdf 0~4194304 from [4156556288,4194304] 2012-11-02 21:06:17.649972 7f7465a6e700 1 -- 10.10.0.2:0/2028325 <== osd.1202 10.10.0.18:6806/9821 143 osd_op_reply(1652 rb.0.1044.359ed6c7.0652 [delete] ondisk = -2 (No such file or directory)) v4 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con 0x7f74600e4350 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write 0x7f74600feab0 should_complete: r = -2 This last line isn't printing what's actually being returned to the application. It's still in librbd's internal processing, and will be converted to 0 for the application. Could you try with the master or next branches? After the 'should_complete' line, there should be a line like: 20 librbd::AioCompletion: AioCompletion::finalize() rval 0 ... That 'rval 0' shows the actual return value the application (qemu in this case) will see. Josh -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: libcephfs create file with layout and replication
On Sat, Nov 17, 2012 at 4:15 PM, Sage Weil wrote: > > We ignore that for the purposes of getting the libcephfs API correct, > though... Ok, make sense. Thanks. Noah -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: libcephfs create file with layout and replication
On Sat, 17 Nov 2012, Noah Watkins wrote: > On Sat, Nov 17, 2012 at 3:23 PM, Sage Weil wrote: > > On Sat, 17 Nov 2012, Noah Watkins wrote: > > > > FWIW, the striping parameters are object size, stripe unit, stripe count, > > and data pool. > > In ceph_mds_request_args.open I see the all the striping parameters > except data pool, and I don't see any places that the file_replication > parameter is being used. Should a pg_pool field be added? Yeah, I think this bit needs to be fixed in the on-write protocol. That is a delicate fix. We ignore that for the purposes of getting the libcephfs API correct, though... sage -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: libcephfs create file with layout and replication
On Sat, Nov 17, 2012 at 3:23 PM, Sage Weil wrote: > On Sat, 17 Nov 2012, Noah Watkins wrote: > > FWIW, the striping parameters are object size, stripe unit, stripe count, > and data pool. In ceph_mds_request_args.open I see the all the striping parameters except data pool, and I don't see any places that the file_replication parameter is being used. Should a pg_pool field be added? -Noah -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: libcephfs create file with layout and replication
On Sat, 17 Nov 2012, Noah Watkins wrote: > The Hadoop VFS layer assumes that block size and replication can be > set on a per-file basis, which is important to users for file > layout/workload optimizations. > > The libcephfs interface doesn't make this entirely easy. Here is one > approach, but it isn't thread safe as the default values are global > variables in the client. > > orig_obj_size = ceph_get_default_object_size() //save > set_default_object_size(new size) > open(path, O_CREAT) > set_default_object_size(new size) //reset > > Something more convenient might be: > > ceph_open_layout(path, flags, mode, layout, replication) > > where layout and replication are used with O_CREAT | O_EXCL, or and > interface for setting these values explicitly on newly created files: > > ceph_open(path, O_CREAT|O_EXCL) > ceph_set_layout(path, layout, replication) This is basically what we have now... at least that's how things work for the kernel client. We should make sure there is a clean way via libcephfs to do that. The client/mds protocol also allows you to specify the layout on file creation. This is better since it has one less round trip to the MDS. Let's just create a new open call with those additional arguments. FWIW, the striping parameters are object size, stripe unit, stripe count, and data pool. sage > > where ceph_set_layout would succeed ostensibly on zero-length files. > > Any thoughts on how to handle this? > > Thanks, > Noah > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[BUG] rbd discard should return OK even if rbd file does not exist
Hello list, right now librbd returns an error if i issue a discard for a sector / byterange where ceph does not have any file as i had never written to this section. This is not correct. It should return 0 / OK in this case. Stefan Examplelog: 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion: AioCompletion::complete_request() this=0x7f72cc05bd20 complete_cb=0x7f747021d4b0 2012-11-02 21:06:17.649924 7f747015c780 1 -- 10.10.0.2:0/2028325 --> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073 rb.0.1044.359ed6c7.0bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0 0x7f72d81c69b0 con 0x7f74600dbf50 2012-11-02 21:06:17.649934 7f747015c780 20 librbd: oid rb.0.1044.359ed6c7.0bdf 0~4194304 from [4156556288,4194304] 2012-11-02 21:06:17.649972 7f7465a6e700 1 -- 10.10.0.2:0/2028325 <== osd.1202 10.10.0.18:6806/9821 143 osd_op_reply(1652 rb.0.1044.359ed6c7.0652 [delete] ondisk = -2 (No such file or directory)) v4 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con 0x7f74600e4350 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write 0x7f74600feab0 should_complete: r = -2 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Many dns domain names in radosgw
Welcome, I have a question. Is there, any way to support multiple domains names in one radosgw on virtual host type connection in S3 ?? Regards SS -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: libcephfs create file with layout and replication
On 11/17/2012 12:13 PM, Noah Watkins wrote: The Hadoop VFS layer assumes that block size and replication can be set on a per-file basis, which is important to users for file layout/workload optimizations. The libcephfs interface doesn't make this entirely easy. Here is one approach, but it isn't thread safe as the default values are global variables in the client. orig_obj_size = ceph_get_default_object_size() //save set_default_object_size(new size) open(path, O_CREAT) set_default_object_size(new size) //reset Something more convenient might be: ceph_open_layout(path, flags, mode, layout, replication) I think this makes the most sense, since changing the layout of a file after it's been created can't happen, and this interface makes that the most clear. It also avoids maintaining extra state in libcephfs between calls. Since replication count is a per-pool setting, I think the hadoop bindings would have to translate from a vfs request to a pool with the requested replication level. So something like this, where layout is a struct containing stripe unit, stripe count, and object size (the subset of struct ceph_file_layout related to objects that's useful currently): ceph_open_layout(path, flags, mode, layout, pool_name) BTW, for anyone interested, there's a nice description of the layout parameters here: http://ceph.com/docs/master/dev/file-striping/ where layout and replication are used with O_CREAT | O_EXCL, or and interface for setting these values explicitly on newly created files: ceph_open(path, O_CREAT|O_EXCL) ceph_set_layout(path, layout, replication) where ceph_set_layout would succeed ostensibly on zero-length files. Any thoughts on how to handle this? Thanks, Noah -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fail to build the latest ceph tree on Fedora 17
On Sat, Nov 17, 2012 at 3:29 AM, Chen Baozi wrote: > Hi, everyone. > > I was tring to build the latest ceph tree on my fedora 17 box. > However, there is an error message when linking radosgw as following: > > CXXLD radosgw > /usr/bin/ld: radosgw-rgw_resolve.o: undefined reference to symbol > '__res_nquery@@GLIBC_2.2.5' > /usr/bin/ld: note: '__res_nquery@@GLIBC_2.2.5' is defined in DSO > /lib64/libresolv.so.2 so try adding it to the linker command line > /lib64/libresolv.so.2: could not read symbols: Invalid operation > collect2: error: ld returned 1 exit status > make[3]: *** [radosgw] Error 1 > make[3]: Leaving directory `/home/cbz/src/ceph/src' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory `/home/cbz/src/ceph/src' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/home/cbz/src/ceph/src' > make: *** [all-recursive] Error 1 > > I've also tried build the version 0.53 which is checked out from > fedora's pkg repo. And it can pass the building process without this > error. > > Any suggestion? Linking with libresolv failed. Garry, any idea? Yehuda -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
libcephfs create file with layout and replication
The Hadoop VFS layer assumes that block size and replication can be set on a per-file basis, which is important to users for file layout/workload optimizations. The libcephfs interface doesn't make this entirely easy. Here is one approach, but it isn't thread safe as the default values are global variables in the client. orig_obj_size = ceph_get_default_object_size() //save set_default_object_size(new size) open(path, O_CREAT) set_default_object_size(new size) //reset Something more convenient might be: ceph_open_layout(path, flags, mode, layout, replication) where layout and replication are used with O_CREAT | O_EXCL, or and interface for setting these values explicitly on newly created files: ceph_open(path, O_CREAT|O_EXCL) ceph_set_layout(path, layout, replication) where ceph_set_layout would succeed ostensibly on zero-length files. Any thoughts on how to handle this? Thanks, Noah -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Fail to build the latest ceph tree on Fedora 17
Hi, everyone. I was tring to build the latest ceph tree on my fedora 17 box. However, there is an error message when linking radosgw as following: CXXLD radosgw /usr/bin/ld: radosgw-rgw_resolve.o: undefined reference to symbol '__res_nquery@@GLIBC_2.2.5' /usr/bin/ld: note: '__res_nquery@@GLIBC_2.2.5' is defined in DSO /lib64/libresolv.so.2 so try adding it to the linker command line /lib64/libresolv.so.2: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[3]: *** [radosgw] Error 1 make[3]: Leaving directory `/home/cbz/src/ceph/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/cbz/src/ceph/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/cbz/src/ceph/src' make: *** [all-recursive] Error 1 I've also tried build the version 0.53 which is checked out from fedora's pkg repo. And it can pass the building process without this error. Any suggestion? Yours, Chen Baozi -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html