You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "Christopher Collins (JIRA)" <ji...@apache.org> on 2017/06/06 23:53:18 UTC

[jira] [Commented] (MYNEWT-752) Error in setting the "permanent" flag upon confirm with hash during image upgrade

    [ https://issues.apache.org/jira/browse/MYNEWT-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16039890#comment-16039890 ] 

Christopher Collins commented on MYNEWT-752:
--------------------------------------------

(Pull request: https://github.com/apache/incubator-mynewt-core/pull/313)

h3. Before fix:
{noformat}
[ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c ble-nimble-bleprph --name nimble-bleprph image test 5ff2addc0fb7bde71fd03dd161834e61ded2041652c37196f180b12091c2ff55
Images:
 slot=0
    version: 0.0.0
    bootable: true
    flags: active confirmed
    hash: bd42be9757549d4209ce873ab68f7cd290a9c494398d39af6b5702ec66aafb7d
 slot=1
    version: 2.2.2.2
    bootable: true
    flags: pending
    hash: 5ff2addc0fb7bde71fd03dd161834e61ded2041652c37196f180b12091c2ff55
Split status: N/A (0)
{noformat}

(reset device)

{noformat}
[ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c ble-nimble-bleprph --name nimble-bleprph image list
Images:
 slot=0
    version: 2.2.2.2
    bootable: true
    flags: active
    hash: 5ff2addc0fb7bde71fd03dd161834e61ded2041652c37196f180b12091c2ff55
 slot=1
    version: 0.0.0
    bootable: true
    flags: confirmed
    hash: bd42be9757549d4209ce873ab68f7cd290a9c494398d39af6b5702ec66aafb7d
Split status: N/A (0)

[ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c ble-nimble-bleprph --name nimble-bleprph image confirm 5ff2addc0fb7bde71fd03dd161834e61ded2041652c37196f180b12091c2ff55
Images:
 slot=0
    version: 2.2.2.2
    bootable: true
    flags: active confirmed
    hash: 5ff2addc0fb7bde71fd03dd161834e61ded2041652c37196f180b12091c2ff55
 slot=1
    version: 0.0.0
    bootable: true
    flags: pending permanent
    hash: bd42be9757549d4209ce873ab68f7cd290a9c494398d39af6b5702ec66aafb7d
Split status: N/A (0)
{noformat}

h3. After fix:
{noformat}
[ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c ble-nimble-bleprph --name nimble-bleprph image test 817b16111d40151345566e73a2a2f999fd2efd65d43a1a98cdccd991ee0be775
Images:
 slot=0
    version: 0.0.0
    bootable: true
    flags: active confirmed
    hash: 1c71f96bcff94e6f2307f9b28bd0249fa73f0bb0819a99ee5bacc4db4e2179e3
 slot=1
    version: 2.2.2.2
    bootable: true
    flags: pending
    hash: 817b16111d40151345566e73a2a2f999fd2efd65d43a1a98cdccd991ee0be775
Split status: N/A (0)
{noformat}

(reset device)

{noformat}
[ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c ble-nimble-bleprph --name nimble-bleprph image list
Images:
 slot=0
    version: 2.2.2.2
    bootable: true
    flags: active
    hash: 817b16111d40151345566e73a2a2f999fd2efd65d43a1a98cdccd991ee0be775
 slot=1
    version: 0.0.0
    bootable: true
    flags: confirmed
    hash: 1c71f96bcff94e6f2307f9b28bd0249fa73f0bb0819a99ee5bacc4db4e2179e3
Split status: N/A (0)

[ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c ble-nimble-bleprph --name nimble-bleprph image confirm 817b16111d40151345566e73a2a2f999fd2efd65d43a1a98cdccd991ee0be775
Images:
 slot=0
    version: 2.2.2.2
    bootable: true
    flags: active confirmed
    hash: 817b16111d40151345566e73a2a2f999fd2efd65d43a1a98cdccd991ee0be775
 slot=1
    version: 0.0.0
    bootable: true
    flags:
    hash: 1c71f96bcff94e6f2307f9b28bd0249fa73f0bb0819a99ee5bacc4db4e2179e3
Split status: N/A (0)
{noformat}

> Error in setting the "permanent" flag upon confirm with hash during image upgrade
> ---------------------------------------------------------------------------------
>
>                 Key: MYNEWT-752
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-752
>             Project: Mynewt
>          Issue Type: Bug
>      Security Level: Public(Viewable by anyone) 
>            Reporter: Aditi Hilbert
>            Assignee: Christopher Collins
>             Fix For: v1_1_0_rel
>
>
> This is an issue seen during image upgrade. When doing  a "confirm" with a hash, newtmgr always marks the "permanent" flag for Slot 1 image to "true", irrespective of which image the hash matches.
> This works fine when we skip the "test" step during image upgrade and we issue a "confirm" with a hash of the new image in Slot 1. 
> However, if we do the "test" step (when the new image is swapped into Slot 0), and we then do a "confirm" with a hash of the new image and reboot, the device marks the old image in Slot 1 as "permanent" and swaps it back to Slot 0. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)