Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-4213

Do not retry signature verification error

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0, 3.0.0-report
    • Labels:
    • Backlog:
      yes
    • Days in progress:
      0

      Description

      The Mender client currently does not distinguish between different error types, which leads to Mender client retrying several times on signature verification failure (the normal retry loop). Originated on a MH thread

      Log from a user:

      -- Logs begin at Thu 1970-01-01 00:00:06 UTC. --
      Dec 01 09:57:35 imx6ulevk mender[293]: time="2020-12-01T09:57:35Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 2"
      Dec 01 09:57:35 imx6ulevk mender[293]: time="2020-12-01T09:57:35Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 2"
      Dec 01 09:57:35 imx6ulevk mender[293]: time="2020-12-01T09:57:35Z" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]"
      Dec 01 09:57:36 imx6ulevk mender[293]: time="2020-12-01T09:57:36Z" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
      Dec 01 09:57:37 imx6ulevk mender[293]: time="2020-12-01T09:57:37Z" level=info msg="Correct request for getting image from: https://s3.amazonaws.com/hosted-mender-artifacts/5f02d290608e2bc4c8a6b7d0/2e089875-5b43-4259-8992-898b70480461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAQWI25QR6MOCESDWO%2F20201201%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201201T095736Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&response-content-type=application%2Fvnd.mender-artifact&X-Amz-Signature=648dfb1359a7e3362a42ad3b95ac879fd9cf2c841291309b248b7b14e3df114d [name: demo-false-signed; devices: [imx6ulevk]]"
      Dec 01 09:57:37 imx6ulevk mender[293]: time="2020-12-01T09:57:37Z" level=info msg="State transition: update-check [Sync] -> update-fetch [Download_Enter]"
      Dec 01 09:57:37 imx6ulevk mender[293]: time="2020-12-01T09:57:37Z" level=info msg="Running Mender client version: 2.4.1-build2-dirty"
      Dec 01 09:57:43 imx6ulevk mender[293]: time="2020-12-01T09:57:43Z" level=info msg="State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]"
      Dec 01 09:57:44 imx6ulevk mender[293]: time="2020-12-01T09:57:44Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 09:57:44 imx6ulevk mender[293]: time="2020-12-01T09:57:44Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 09:57:44 imx6ulevk mender[293]: time="2020-12-01T09:57:44Z" level=info msg="State transition: update-store [Download_Enter] -> fetch-install-retry-wait [Download_Enter]"
      Dec 01 09:58:44 imx6ulevk mender[293]: time="2020-12-01T09:58:44Z" level=info msg="State transition: fetch-install-retry-wait [Download_Enter] -> update-fetch [Download_Enter]"
      Dec 01 09:58:57 imx6ulevk mender[293]: time="2020-12-01T09:58:57Z" level=info msg="State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]"
      Dec 01 09:58:58 imx6ulevk mender[293]: time="2020-12-01T09:58:58Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 09:58:58 imx6ulevk mender[293]: time="2020-12-01T09:58:58Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 09:58:58 imx6ulevk mender[293]: time="2020-12-01T09:58:58Z" level=info msg="State transition: update-store [Download_Enter] -> fetch-install-retry-wait [Download_Enter]"
      Dec 01 09:59:58 imx6ulevk mender[293]: time="2020-12-01T09:59:58Z" level=info msg="State transition: fetch-install-retry-wait [Download_Enter] -> update-fetch [Download_Enter]"
      Dec 01 09:59:59 imx6ulevk mender[293]: time="2020-12-01T09:59:59Z" level=info msg="State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]"
      Dec 01 10:00:00 imx6ulevk mender[293]: time="2020-12-01T10:00:00Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 10:00:00 imx6ulevk mender[293]: time="2020-12-01T10:00:00Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 10:00:00 imx6ulevk mender[293]: time="2020-12-01T10:00:00Z" level=info msg="State transition: update-store [Download_Enter] -> fetch-install-retry-wait [Download_Enter]"
      Dec 01 10:01:00 imx6ulevk mender[293]: time="2020-12-01T10:01:00Z" level=info msg="State transition: fetch-install-retry-wait [Download_Enter] -> update-fetch [Download_Enter]"
      Dec 01 10:01:18 imx6ulevk mender[293]: time="2020-12-01T10:01:18Z" level=info msg="State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]"
      Dec 01 10:01:18 imx6ulevk mender[293]: time="2020-12-01T10:01:18Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 10:01:18 imx6ulevk mender[293]: time="2020-12-01T10:01:18Z" level=error msg="Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: reader: invalid signature: crypto/rsa: verification error"
      Dec 01 10:01:18 imx6ulevk mender[293]: time="2020-12-01T10:01:18Z" level=info msg="State transition: update-store [Download_Enter] -> fetch-install-retry-wait [Download_Enter]"
      Dec 01 10:01:18 imx6ulevk mender[293]: time="2020-12-01T10:01:18Z" level=info msg="State transition: fetch-install-retry-wait [Download_Enter] -> update-error [ArtifactFailure]"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=info msg="State transition: update-error [ArtifactFailure] -> cleanup [Error]"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=info msg="State transition: cleanup [Error] -> update-status-report [none]"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=info msg="State transition: update-status-report [none] -> idle [Idle]"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=info msg="authorization data present and valid"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=info msg="State transition: idle [Idle] -> check-wait [Idle]"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 2"
      Dec 01 10:01:19 imx6ulevk mender[293]: time="2020-12-01T10:01:19Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 2"
      Dec 01 10:01:20 imx6ulevk mender[293]: time="2020-12-01T10:01:20Z" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]"
      Dec 01 10:01:20 imx6ulevk mender[293]: time="2020-12-01T10:01:20Z" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
      Dec 01 10:01:20 imx6ulevk mender[293]: time="2020-12-01T10:01:20Z" level=info msg="State transition: update-check [Sync] -> check-wait [Idle]"
      Dec 01 10:01:21 imx6ulevk mender[293]: time="2020-12-01T10:01:21Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
      Dec 01 10:01:21 imx6ulevk mender[293]: time="2020-12-01T10:01:21Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 2"
      Dec 01 10:01:21 imx6ulevk mender[293]: time="2020-12-01T10:01:21Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 2"
      Dec 01 10:01:22 imx6ulevk mender[293]: time="2020-12-01T10:01:22Z" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]"
      Dec 01 10:01:22 imx6ulevk mender[293]: time="2020-12-01T10:01:22Z" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
      Dec 01 10:01:22 imx6ulevk mender[293]: time="2020-12-01T10:01:22Z" level=info msg="State transition: update-check [Sync] -> check-wait [Idle]"
      Dec 01 10:01:23 imx6ulevk mender[293]: time="2020-12-01T10:01:23Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
      

      Acceptance criteria

      • Do not retry when signature verification fails

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mirzak Mirza Krak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: