jamf / JamfMigrator

A tool to migrate data granularly between Jamf Pro servers
MIT License
140 stars 10 forks source link

Computer imports failing with "Update Error: Partition available must be a non-negative number" #56

Closed GabeShack closed 4 years ago

GabeShack commented 4 years ago

We keep seeing an error when attempting computer imports from old server to new server that state:"computername - Failed (409). Update error: Partition available must be a non-negative number." I am seeing this with any computer that had a disk image mounted on their desktop (for an installer specifically).

We are using 6.0.0b1 of Jamf-Migrator.

Gabe Shackney Princeton Public Schools

BIG-RAT commented 4 years ago

Right, grab the 5.3 beta. Probably should move this to latest release.

GabeShack commented 4 years ago

Just downloaded and tried one of the failed computer records again with 5.3b. Same result.

20200727_162707 jamf-migrator Version: 5.3.0b1 Build: 1 20200727_162714 ----------- Starting Migration ----------- 20200727_162737 ----------- Starting Migration ----------- 20200727_162738 [Json.getRecord] get endpoint: computers/id/3405 from server: https://casper.prs.k12.nj.us:8443 20200727_162739 [CreateEndpoints] Migrating computers 20200727_162739 [CreateEndpoints] [computers] CP-221-01 - Failed (409). Create error: Partition available must be a non-negative number.

Gabe Shackney Coordinator of Device Operations and Systems Integration Princeton Public Schools 609-806-4299 x2

On Jul 27, 2020, at 4:25 PM, Leslie Helou notifications@github.com<mailto:notifications@github.com> wrote:

Right, grab the 5.3 betahttps://github.com/jamf/JamfMigrator/releases/tag/5.3.0b1. Probably should move this to latest release.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jamf/JamfMigrator/issues/56#issuecomment-664619501, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMYXY7FCP25XRXFJDVTFZ63R5XPDHANCNFSM4PIXXQBA.

BIG-RAT commented 4 years ago

My mistake, was thinking about the size must be greater than 0 issue. Could I get the raw XML for the storage section of that machine. Would look something like the following:

    <storage>
        <device>
            <disk>disk0</disk>
            <model>APPLE SSD SM0512G</model>
            <revision>BXW1PA0Q</revision>
            <serial_number>S29ANYAG330470</serial_number>
            <size>500277</size>
            <drive_capacity_mb>500277</drive_capacity_mb>
            <connection_type>NO</connection_type>
            <smart_status>Verified</smart_status>
            <partitions>
                <partition>
                    <name>Macintosh HD (Boot Partition)</name>
                    <size>249832</size>
                    <type>boot</type>
                    <partition_capacity_mb>249832</partition_capacity_mb>
                    <percentage_full>7</percentage_full>
                    <available_mb>161256</available_mb>
                    <filevault_status>Encrypted</filevault_status>
                    <filevault_percent>100</filevault_percent>
                    <filevault2_status>Encrypted</filevault2_status>
                    <filevault2_percent>100</filevault2_percent>
                    <boot_drive_available_mb>161256</boot_drive_available_mb>
                    <lvgUUID></lvgUUID>
                    <lvUUID></lvUUID>
                    <pvUUID></pvUUID>
                </partition>
                <partition>
                    <name>Data</name>
                    <size>249832</size>
                    <type>other</type>
                    <partition_capacity_mb>249832</partition_capacity_mb>
                    <percentage_full>32</percentage_full>
                    <available_mb>161256</available_mb>
                    <filevault_status>Encrypted</filevault_status>
                    <filevault_percent>100</filevault_percent>
                    <filevault2_status>Encrypted</filevault2_status>
                    <filevault2_percent>100</filevault2_percent>
                </partition>
                <partition>
                    <name>primary</name>
                    <size>249966</size>
                    <type>other</type>
                    <partition_capacity_mb>249966</partition_capacity_mb>
                    <percentage_full>24</percentage_full>
                    <available_mb>189821</available_mb>
                    <filevault_status>Not Encrypted</filevault_status>
                    <filevault_percent>0</filevault_percent>
                    <filevault2_status>Not Encrypted</filevault2_status>
                    <filevault2_percent>0</filevault2_percent>
                </partition>
            </partitions>
        </device>
        <device>
            <disk>disk3</disk>
            <model></model>
            <revision></revision>
            <serial_number></serial_number>
            <size>0</size>
            <drive_capacity_mb>0</drive_capacity_mb>
            <connection_type></connection_type>
            <smart_status></smart_status>
            <partitions>
                <partition>
                    <name>Dropbox Installer</name>
                    <size>1</size>
                    <type>other</type>
                    <partition_capacity_mb>1</partition_capacity_mb>
                    <percentage_full>100</percentage_full>
                    <available_mb>0</available_mb>
                    <filevault_status>Not Encrypted</filevault_status>
                    <filevault_percent>0</filevault_percent>
                    <filevault2_status>Not Encrypted</filevault2_status>
                    <filevault2_percent>0</filevault2_percent>
                </partition>
            </partitions>
        </device>
        <device>
            <disk>disk4</disk>
            <model></model>
            <revision></revision>
            <serial_number></serial_number>
            <size>0</size>
            <drive_capacity_mb>0</drive_capacity_mb>
            <connection_type></connection_type>
            <smart_status></smart_status>
            <partitions>
                <partition>
                    <name>VLC media player</name>
                    <size>149</size>
                    <type>other</type>
                    <partition_capacity_mb>149</partition_capacity_mb>
                    <percentage_full>99</percentage_full>
                    <available_mb>2</available_mb>
                    <filevault_status>Not Encrypted</filevault_status>
                    <filevault_percent>0</filevault_percent>
                    <filevault2_status>Not Encrypted</filevault2_status>
                    <filevault2_percent>0</filevault2_percent>
                </partition>
            </partitions>
        </device>
    </storage>​

From: GabeShack notifications@github.com Sent: Monday, July 27, 2020 4:29 PM To: jamf/JamfMigrator Cc: Leslie N. Helou; Comment Subject: Re: [jamf/JamfMigrator] Computer imports failing with "Update Error: Partition available must be a non-negative number" (#56)

Just downloaded and tried one of the failed computer records again with 5.3b. Same result.

20200727_162707 jamf-migrator Version: 5.3.0b1 Build: 1 20200727_162714 ----------- Starting Migration ----------- 20200727_162737 ----------- Starting Migration ----------- 20200727_162738 [Json.getRecord] get endpoint: computers/id/3405 from server: https://casper.prs.k12.nj.us:8443 20200727_162739 [CreateEndpoints] Migrating computers 20200727_162739 [CreateEndpoints] [computers] CP-221-01 - Failed (409). Create error: Partition available must be a non-negative number.

Gabe Shackney Coordinator of Device Operations and Systems Integration Princeton Public Schools 609-806-4299 x2

On Jul 27, 2020, at 4:25 PM, Leslie Helou notifications@github.com<mailto:notifications@github.com> wrote:

Right, grab the 5.3 betahttps://github.com/jamf/JamfMigrator/releases/tag/5.3.0b1. Probably should move this to latest release.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jamf/JamfMigrator/issues/56#issuecomment-664619501, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMYXY7FCP25XRXFJDVTFZ63R5XPDHANCNFSM4PIXXQBA.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/jamf/JamfMigrator/issues/56#issuecomment-664621606, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFJYQF56LPNHEQWU5HKA6C3R5XPTHANCNFSM4PIXXQBA.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/jamf/JamfMigrator/issues/56#issuecomment-664621606", "url": "https://github.com/jamf/JamfMigrator/issues/56#issuecomment-664621606", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

BIG-RAT commented 4 years ago

v5.3.1b1 may fix the issue. Was able to replicate the issue by altering value for the key in a device record.

GabeShack commented 4 years ago

Thanks! I’ll try when I get back to my home office later today.

Gabe Shackney Coordinator of Device Operations and Systems Integration Princeton Public Schools 609-806-4299 x2

On Jul 28, 2020, at 10:35 AM, Leslie Helou notifications@github.com wrote:



v5.3.1b1 may fix the issue. Was able to replicate the issue by altering value for the key in a device record.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jamf/JamfMigrator/issues/56#issuecomment-665077970, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMYXY7GMEZDAD44KNP6KE5LR53O37ANCNFSM4PIXXQBA.

GabeShack commented 4 years ago

That seemed to do the trick. Thanks!

Gabe Shackney Coordinator of Device Operations and Systems Integration Princeton Public Schools 609-806-4299 x2

On Jul 28, 2020, at 12:23 PM, Gabe Shackney gabeshackney@princetonk12.org<mailto:gabeshackney@princetonk12.org> wrote:

Thanks! I’ll try when I get back to my home office later today.

Gabe Shackney Coordinator of Device Operations and Systems Integration Princeton Public Schools 609-806-4299 x2

On Jul 28, 2020, at 10:35 AM, Leslie Helou notifications@github.com<mailto:notifications@github.com> wrote:



v5.3.1b1 may fix the issue. Was able to replicate the issue by altering value for the key in a device record.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jamf/JamfMigrator/issues/56#issuecomment-665077970, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMYXY7GMEZDAD44KNP6KE5LR53O37ANCNFSM4PIXXQBA.