[sheepdog-users] Error in processing snapshot name in dog vdi command

Andrew J. Hobbs ajhobbs at desu.edu
Tue Apr 22 16:31:20 CEST 2014


Yes, it needs to start with a non-numeric.  I preface my snapshots with daily- or hourly- to bypass.

On 04/18/2014 05:15 PM, Scott Devoid wrote:
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 --------------
A non-text attachment was scrubbed...
Name: ajhobbs.vcf
Type: text/x-vcard
Size: 353 bytes
Desc: ajhobbs.vcf
URL: <http://lists.wpkg.org/pipermail/sheepdog-users/attachments/20140422/6d3ae856/attachment-0005.vcf>


More information about the sheepdog-users mailing list