Add safety code for removed Update Control feature

Description

Acceptance criteria:

  • Add UpdateControlMaps key to our list of database keys like in Golang.

  • Upon startup, the key must be removed from the database if, and only if, there is no deployment ongoing (see StateMachine::LoadStateFromDb function).

  • If the key exists when loading deployment data, then this triggers an immediate deployment failure.

    • Make sure that log message explains that Update Control in both the deployment in the UI, as well as local applications, must be disabled.

  • Unit test

    • Most likely in state_test.cpp.

    • Make sure it is triggered after a reboot, which is the most likely scenario where it would occur for real.

Affects versions

None

Environment

None

Activity

Show:
Kristian Amlie
made 2 changes
October 4, 2023 at 1:47 PM
Status
In Progress
Done
Resolution
None
Fixed
Kristian Amlie
made 2 changes
October 3, 2023 at 9:04 AM
Status
Open
In Progress
Assignee
Unassigned
Kristian Amlie
Kristian Amlie
updated the descriptionAugust 7, 2023 at 8:18 AM
Acceptance criteria: * Add {{UpdateControlMaps}} key to our list of database keys like [in Golang|https://github.com/mendersoftware/mender/blob/accec86da779253f2545d58b090af9e28ce42e75/datastore/dbkeys.go#L60]. * Upon startup, the key must be removed from the database if, and only if, there is no deployment ongoing (see {{StateMachine::LoadStateFromDb}} function). * If the key exists when loading deployment data, then this triggers an immediate deployment failure. ** Make sure that log message explains that Update Control in both the deployment in the UI, as well as local applications, must be disabled. * Unit test ** Most likely in {{state_test.cpp}}. ** Make sure it is triggered after a reboot, which is the most likely scenario where it would occur for real.
Automation for Jira
updated the fix versionsAugust 4, 2023 at 6:25 AM
None
Mender C++ client i9: additional features
Kristian Amlie
changed the parentAugust 4, 2023 at 6:24 AM
None
MEN-6022
Kristian Amlie
created the IssueAugust 4, 2023 at 6:24 AM
Fixed

Details

Assignee

Reporter

Labels

Story Points

Priority

Days in progress

0

Backlog

yes

Zendesk Support

Checklist

Created August 4, 2023 at 6:24 AM
Updated June 25, 2024 at 11:55 AM
Resolved October 4, 2023 at 1:47 PM

Flag notifications