Advertisement
Guest User

Untitled

a guest
Jan 5th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. root@stack01:~# ./rados_over_ipv6
  2. server name not found: �.FՇ (Success)
  3. rados_connect failed: -22root@stack01:~# c^C
  4. root@stack01:~# cat rados_over_ipv6.c
  5. #include <stdio.h>
  6. #include "rados/librados.h"
  7.  
  8. int main(void) {
  9.  
  10. rados_t cluster;
  11.  
  12. int r;
  13.  
  14. r = rados_create(&cluster, "admin");
  15. if (r < 0) {
  16. printf("rados_create failed: %d", r);
  17. return -1;
  18. }
  19.  
  20. //rados_conf_set(cluster, "auth_supported", "cephx");
  21. rados_conf_set(cluster, "mon_host", "monitor.ceph.widodh.nl");
  22. //rados_conf_set(cluster, "keyring", "/etc/ceph/keyring.bin");
  23.  
  24. r = rados_connect(cluster);
  25. if (r < 0) {
  26. printf("rados_connect failed: %d", r);
  27. return -2;
  28. }
  29.  
  30. rados_shutdown(cluster);
  31.  
  32. }
  33. root@stack01:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement