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

Abort update if artifact name is missing

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      If `/etc/mender/artifact_info` is missing, the client continues the update process but the server API requires the artifact name (which is in this file), so it will give an error response.

      Basically this is what happens:
      1) artifact_info is missing
      2) client proceeds as it says knowing current artifact is not needed
      3) update fails because server says it needs to know current artifact

      Acceptance criteria

      • Client aborts update if it does not have the artifact name before it checks for update
      • Appropriate client log messages on how to resolve the issue

      Relevant log messages seen today:

       Mar 03 19:31:37 artik mender[8811]: level=error msg="Cannot determine
      current artifact. Update will continue anyways:
      /var/lib/mender/device_type : open /etc/mender/artifact_info: no such
      file or directory" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: time="2018-03-03T19:31:37Z"
      level=error msg="Cannot determine current artifact. Update will continue
      anyways: /var/lib/mender/device_type : open /etc/mender/artifact_info:
      no such file or directory" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: level=info msg="State transition:
      inventory-update [Sync] -> check-wait [Idle]" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: time="2018-03-03T19:31:37Z"
      level=info msg="State transition: inventory-update [Sync] -> check-wait
      [Idle]" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: level=info msg="State transition:
      check-wait [Idle] -> update-check [Sync]" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: level=error msg="could not get the
      current artifact name" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: time="2018-03-03T19:31:37Z"
      level=info msg="State transition: check-wait [Idle] -> update-check
      [Sync]" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: time="2018-03-03T19:31:37Z"
      level=error msg="could not get the current artifact name" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: level=warning msg="Client recieved
      invalid response status code: 400" module="client_update"
      
      Mar 03 19:31:37 artik mender[8811]: level=error msg="Error receiving
      scheduled update data: Invalid response received from server" module=mender
      
      Mar 03 19:31:37 artik mender[8811]: time="2018-03-03T19:31:37Z"
      level=warning msg="Client recieved invalid response status code: 400"
      module="client_update"
      

        Attachments

          Activity

            People

            • Assignee:
              oleorhagen Ole Petter Orhagen
              Reporter:
              a10003 Eystein Maloy Stenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support

                  Summary Panel