Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Multi-Assignments #833

Merged
merged 59 commits into from
May 16, 2019

Conversation

stefbehl
Copy link
Contributor

@stefbehl stefbehl commented May 7, 2019

One of the main paradigms of hawkBit is that a Distribution Set represents the currently installed software of a device. Hence, a device can have only one Distribution Set assigned/installed at a time. With the Multi-Assignments feature, this paradigm can be loosened up. Multi-Assignment allows to assign multiple Distribution Sets to a device simultaneously, without cancelling each other. As a consequence, an operator can trigger multiple campaigns (rollouts) addressing the same devices in parallel.

This feature can be activated via the system configuration property "multi.assignments.enabled". It is disabled by default.

When it is activated, all active deployment actions of a device are communicated to the device via a new DMF message topic "MULTI_ACTION" (instead of emitting DOWNLOAD, DOWNLOAD_AND_INSTALL, and /or CANCEL_DOWNLOAD messages). The message body of a MULTI_ACTION message can contain, update, download, and cancel tasks.

Signed-off-by: Stefan Behl stefan.behl@bosch-si.com

stefbehl and others added 9 commits March 6, 2019 16:43
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
getConfigurationValue method

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
@schabdo schabdo added this to the 0.3.0M3 milestone May 7, 2019
StefanKlt and others added 14 commits May 9, 2019 08:50
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
old tests

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
stefbehl added 2 commits May 15, 2019 10:23
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
@hawkbit-bot
Copy link

SonarQube analysis reported 13 issues

  • MINOR 13 minor

Watch the comments in this conversation to review them.

8 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MINOR AmqpMessageDispatcherService.java#: Add a new line at the end of this file. rule
  2. MINOR AmqpMessageHandlerService.java#: Add a new line at the end of this file. rule
  3. MINOR MultiActionEvent.java#: Add a new line at the end of this file. rule
  4. MINOR JpaDeploymentManagement.java#: Add a new line at the end of this file. rule
  5. MINOR TargetAssignmentOperations.java#: Add a new line at the end of this file. rule
  6. MINOR DistributionTable.java#: Add a new line at the end of this file. rule
  7. MINOR TargetTable.java#: Add a new line at the end of this file. rule
  8. MINOR UIComponentIdProvider.java#: Add a new line at the end of this file. rule

@schabdo schabdo merged commit 1ac40a7 into eclipse-hawkbit:master May 16, 2019
@schabdo schabdo deleted the feature_multi_assignments branch May 16, 2019 08:30
AmmarBikic pushed a commit to bosch-io/hawkbit that referenced this pull request Oct 2, 2020
* First draft of new assignment logic

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Enhancements of System Configuration view

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Drag&drop enhancements for multiple distribution set assignments

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Misc fixes

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* test that previous assignments are not canceled

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* add description and expected events to test

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* extend TenantConfigurationManagement by NullPointerException proof
getConfigurationValue method

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Hide "Required Migration Step" if Multi Assignments is enabled

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Make fields transient

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Add IDs for Required Migration Step elements

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Save work in progress

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Added new DMF message DmfMultiActionRequest

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* DMF enhancements to send out MultiActionRequest messages

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Minor changes

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Multi Assignment support for cancellations

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* fix permission problems and immutable lists

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* add message dispatcher tests for outgoing multiassignment messages, fix
old tests

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Implement Multi-Assignment support for rollout groups

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Minor changes

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Refactoring

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Register new deployment event with protobuff framework

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Allow same DS to be assigned multiple times

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix assignment with pending cancellations

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Reduce repository /DB calls

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Revert latest perf fix (causing a regression)

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* test if a rollout sends multiaction messages in multiassignment mode

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Minor changes

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Do not close new action if DS is already assigned (if multi-assign on)

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* add test that starts and finishes multiple rollouts in multiassignt mode

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* add javadoc to test method

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Prevent Multi-Assignments from being disabled via Repo Config UI

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Add link to Provisioning State Machine

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* test that Multiassignment can not be disabled via mgmt-api

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* refactor AmqpMessageHandlerService code

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Prevent Multi-Assignments feature from being disabled via Mgmt REST API

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* add license header, remove unused instance variables

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* fix tenantConfigurationManagement mock in test

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* return empty list instead of null

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* add ddi test for multiassignment, fix old test

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Prevent autoclose from being modified if Multi-Assignments is enabled

# WARNING: head commit changed in the meantime

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Add test for autoClose /multiAssign

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Javadoc improvements

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* change test method that waits for dmf messages to be dispatched

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* clean up code

Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>

* Fix UI-related PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings, Sonar issues, and test failures

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix Sonar findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants