[Sheepdog] The system is still booting
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Fri Apr 9 15:00:36 CEST 2010
Hi,
Thanks for trying.
On 2010/04/09 21:21, Wido den Hollander wrote:
> root at osd1:~# /usr/local/bin/qemu-img create -f sheepdog vm002 50G
> Formatting 'vm002', fmt=sheepdog size=53687091200
> do_sd_create 1143: The system is still booting, vm002
> qemu-img: Error while formatting
> root at osd1:~#
>
> Now that seems odd, but when checking my cluster i got:
>
> root at osd1:~# shepherd info -t cluster
> startup
>
> Ctime Epoch Nodes
Did you run `shepherd mkfs`?
Sheepdog doesn't accept any operations until mkfs is invoked.
> root at osd1:~# shepherd info -t sheep
> Id Size Used Use%
>
> Total 0.0 MB 0.0 MB -2147483648%, total virtual VDI Size 0.0 MB
> root at osd1:~#
>
> As you can see the sizes of the nodes is not detected correctly..
>
I think you can get the right information after running `shepherd mkfs`.
The following patch fix showing wrong message when shepherd cannot any
information from cluster nodes.
diff --git a/shepherd/shepherd.c b/shepherd/shepherd.c
index 471c0e1..fb554b0 100644
--- a/shepherd/shepherd.c
+++ b/shepherd/shepherd.c
@@ -926,6 +926,7 @@ int info(enum info_type type, enum format_type format, char *name,
int i, ret = -1;
uint64_t total_size = 0, total_avail = 0, total_vdi_size = 0;
char total_str[8], avail_str[8], vdi_size_str[8];
+ int success;
if (real_time) {
setupterm(NULL, 1, (int *)0);
@@ -983,6 +984,7 @@ rerun:
case INFO_SHEEP:
printf("Id\tSize\tUsed\tUse%%\n");
+ success = 0;
for (i = 0; i < nr_nodes; i++) {
char name[128];
int fd;
@@ -1010,9 +1012,11 @@ rerun:
size_to_str(rsp->store_size, store_str, sizeof(store_str));
size_to_str(rsp->store_size - rsp->store_free, free_str,
sizeof(free_str));
- if (!ret && rsp->result == SD_RES_SUCCESS)
+ if (!ret && rsp->result == SD_RES_SUCCESS) {
printf("%2d\t%s\t%s\t%3d%%\n", i, store_str, free_str,
(int)(((double)(rsp->store_size - rsp->store_free) / rsp->store_size) * 100));
+ success++;
+ }
total_size += rsp->store_size;
total_avail += rsp->store_free;
@@ -1020,6 +1024,12 @@ rerun:
printf("\n");
+ if (success == 0) {
+ fprintf(stderr, "cannot get information from any nodes\n");
+ ret = -1;
+ break;
+ }
+
parse_vdi(cal_total_vdi_size, &total_vdi_size);
size_to_str(total_size, total_str, sizeof(total_str));
More information about the sheepdog
mailing list