[sheepdog-users] Error in processing snapshot name in dog vdi command
Scott Devoid
devoid at anl.gov
Fri Apr 18 23:15:50 CEST 2014
I am getting an error with the following command:
vdi snapshot -s 87cfe950-fada-4cd8-960d-17d9227ff74a_disk_tmp
a68a173e-e6f0-414c-b036-c7a09abacbbb -a localhost -p 7000
Stderr: 'Please specify a non-integer value for a snapshot tag name'
This is with the 0.6.0 version which has the following for the vdi_parser
function (collie/vdi.c):
case 's':
vdi_cmd_data.snapshot_id = strtol(opt, &p, 10);
if (opt == p) {
vdi_cmd_data.snapshot_id = 0;
pstrcpy(vdi_cmd_data.snapshot_tag,
sizeof(vdi_cmd_data.snapshot_tag), opt);
} else if (vdi_cmd_data.snapshot_id == 0) {
fprintf(stderr,
"The snapshot id must be larger than zero\n");
exit(EXIT_FAILURE);
}
break;
The current version looks like this (dog/vdi.c):
case 's':
vdi_cmd_data.snapshot_id = strtol(opt, &p, 10);
if (opt == p || *p != '\0') {
vdi_cmd_data.snapshot_id = 0;
pstrcpy(vdi_cmd_data.snapshot_tag,
sizeof(vdi_cmd_data.snapshot_tag), opt);
} else if (vdi_cmd_data.snapshot_id == 0) {
fprintf(stderr,
"The snapshot id must be larger than zero\n");
exit(EXIT_FAILURE);
}
break;
Based on my reading, this will still have the problem, although my C is
quite rusty.
Thanks,
~ Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog-users/attachments/20140418/ebca60f2/attachment-0004.html>
More information about the sheepdog-users
mailing list