[sheepdog] bug: Invalid free space size '0': must be an integer between 0
levin li
levin108 at gmail.com
Sun Aug 5 17:57:23 CEST 2012
On 08/05/2012 11:42 PM, Jens WEBER wrote:
>> Sheep doesn't allow user to specify disk space size to 0, for gateway-only
>> mode, use -g
> yes, but then
> fprintf(stderr, "Invalid free space size '%s': "
> - "must be an integer between 0 and %lu\n",
> optarg, UINT64_MAX);
> should be
> fprintf(stderr, "Invalid free space size '%s': "
> + "must be an integer between 1 and %lu\n",
> optarg, UINT64_MAX);
>
>> argument directly, but sorry, I can not reproduce the crash bug as you
>> described, it works
>> well in my environment:
>>
>> + collie/collie node list -p 7000
>> M Id Host:Port V-Nodes Zone
>> - 0 127.0.0.1:7000 27 0
>> - 1 127.0.0.1:7001 54 1
>> - 2 127.0.0.1:7002 110 2
>> - 3 127.0.0.1:7003 0 3
>>
>> as the output above, node with Id 3 is a gateway-only node.
>>
>> Can you give the crash log ?
>>
>> thanks,
>>
>> levin
>>
>
> DAEMON_ARGS="-d -p 7000 -g -z 999"
> Aug 05 17:16:03 [main] init_disk_space(478) disk free space is 0M
> Aug 05 17:16:03 [main] create_cluster(1169) use corosync cluster driver as default
> Aug 05 17:16:03 [main] create_cluster(1198) zone id = 999
> Aug 05 17:16:03 [main] send_join_request(1034) IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:16:03 [main] init_signal(171) register signal_handler for 12
> Aug 05 17:16:03 [main] main(394) sheepdog daemon (version 0.4.0) started
> Aug 05 17:16:03 [main] cdrv_cpg_confchg(568) mem:1, joined:1, left:0
> Aug 05 17:16:03 [main] cdrv_cpg_deliver(454) 0
> Aug 05 17:16:03 [main] sd_check_join_cb(938) IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:16:03 [main] cdrv_cpg_deliver(454) 1
> Aug 05 17:16:03 [main] sd_join_handler(1063) join IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:16:03 [main] sd_join_handler(1065) [0] IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:16:03 [main] update_cluster_info(817) status = 2, epoch = 0, finished: 0
> Aug 05 17:16:03 [main] sockfd_cache_add_group(252) 1
> Aug 05 17:16:03 [main] crash_handler(409) sheep pid 15320 exited unexpectedly.
>
> [FAIL] sheepdog gateway-only (-d -p 7000 -g -z 999 /var/lib/sheepdog/disc0) is not running ... failed!
> [ ok ] sheepdog for Disk A (-d -p 7001 -z 1 /var/lib/sheepdog/disc1) is running.
> [ ok ] sheepdog for Disk B (-d -p 7002 -z 2 /var/lib/sheepdog/disc2) is running.
> [ ok ] sheepdog for Disk C (-d -p 7003 -z 3 /var/lib/sheepdog/disc3) is running.
> [ ok ] sheepdog for Disk D (-d -p 7004 -z 4 /var/lib/sheepdog/disc4) is running.
> [ ok ] sheepdog for Disk E (-d -p 7005 -z 5 /var/lib/sheepdog/disc5) is running.
> [ ok ] sheepdog for Disk F (-d -p 7006 -z 6 /var/lib/sheepdog/disc6) is running.
>
> This problem occurs to me yesterday after commit 543c44b368543b51ecb50477c7fe7b31b83b661c. If i use -s 1 instead of -g then it works.
>
> M Id Host:Port V-Nodes Zone
> - 0 172.30.0.80:7000 0 999
> - 1 172.30.0.80:7001 74 1
> - 2 172.30.0.80:7002 74 2
> - 3 172.30.0.80:7003 74 3
> - 4 172.30.0.80:7004 74 4
> - 5 172.30.0.80:7005 74 5
> - 6 172.30.0.80:7006 74 6
>
> Aug 05 17:34:45 [main] init_disk_space(478) disk free space is 1M
> Aug 05 17:34:45 [main] create_cluster(1169) use corosync cluster driver as default
> Aug 05 17:34:45 [main] create_cluster(1198) zone id = 999
> Aug 05 17:34:45 [main] send_join_request(1034) IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:34:45 [main] init_signal(171) register signal_handler for 12
> Aug 05 17:34:45 [main] main(394) sheepdog daemon (version 0.4.0) started
> Aug 05 17:34:45 [main] cdrv_cpg_confchg(568) mem:1, joined:1, left:0
> Aug 05 17:34:45 [main] cdrv_cpg_deliver(454) 0
> Aug 05 17:34:45 [main] sd_check_join_cb(938) IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:34:45 [main] cdrv_cpg_deliver(454) 1
> Aug 05 17:34:45 [main] sd_join_handler(1063) join IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:34:45 [main] sd_join_handler(1065) [0] IPv4 ip:172.30.0.80 port:7000
> Aug 05 17:34:45 [main] update_cluster_info(817) status = 2, epoch = 0, finished: 0
> Aug 05 17:34:45 [main] sockfd_cache_add_group(252) 1
> Aug 05 17:34:45 [main] recalculate_vnodes(806) node 7000 has 64 vnodes, free space 1
> Aug 05 17:34:45 [main] sd_join_handler(1074) join Sheepdog cluster
> Aug 05 17:34:45 [main] cdrv_cpg_confchg(568) mem:2, joined:1, left:0
> Aug 05 17:34:45 [main] cdrv_cpg_confchg(568) mem:3, joined:1, left:0
>
Thanks a lot for your feedback, I've submitted a patch to fix this bug.
thanks,
levin
More information about the sheepdog
mailing list