Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
0fc1f80
common: spaceallocator: identify outdated items by ID and version
Oct 19, 2026
6fe36b2
common: spaceallocator: add RemoveOutdatedItem
Oct 21, 2026
5884c27
common: imagemanager: add common image manager skeleton
Oct 21, 2026
d278ff6
common: tools: add eIntegrity error
al1img Oct 29, 2026
6fdeac9
common: spaceallocator: protect outdated items with partition lock
Oct 30, 2026
b920474
common: spaceallocator: clear outdated items on close
Oct 30, 2026
c54a0fd
common: spaceallocator: fix allocation count on resize
Oct 30, 2026
4227e63
common: imagemanager: implement item status provider
al1img Oct 29, 2026
495c089
common: imagemanager: implement InstallItem
al1img Oct 29, 2026
84dd9c4
common: imagemanager: implement RemoveItem
al1img Oct 30, 2026
16c89cf
common: imagemanager: handle outdated items
al1img Oct 30, 2026
91856e8
common: imagemanager: add item info provider
al1img Oct 30, 2026
2174ee4
common: imagemanager: remove outdated items when storage is full
al1img Oct 30, 2026
14c4305
common: imagemanager: remove expired items
al1img Oct 30, 2026
a02fe10
common: imagemanager: remove orphan blobs
al1img Oct 30, 2026
9a838f8
common: tools: add cancel context
al1img Oct 30, 2026
31eacb6
common: imagemanager: implement cancel
al1img Oct 30, 2026
e203404
common: imagemanager: make ParseDigest protected
al1img Nov 2, 2026
1be9aac
sonar: ignore cpp:S7032 for assignments in if init-statements
al1img Nov 2, 2026
aa14b00
common: imagemanager: add documentation
al1img Nov 2, 2026
9718844
cm: imagemanager: remove old implementation
Oct 31, 2026
3997bc8
cm: imagemanager: add interface and skeleton
Oct 31, 2026
ea1a12b
common: downloader: pass cancel context and URLs to Download
Oct 31, 2026
c6d4c6c
cm: imagemanager: implement DownloadBlob
Oct 31, 2026
61d3603
common: tools: add file modification time helpers
Oct 31, 2026
8a273ea
cm: imagemanager: manage download space
Oct 31, 2026
2322111
cm: imagemanager: implement GetBlobInfo
Oct 31, 2026
2dfba41
cm: database: use common image manager storage
Oct 31, 2026
48c1683
cm: communication: use common blob info provider
Oct 31, 2026
6f1af82
cm: updatemanager: use new image manager API
Oct 31, 2026
4ea60b3
cm: launcher: pass index digest in run instance request
Nov 3, 2026
9744115
cm: launcher: use common item info provider
Nov 3, 2026
0c515b8
cm: imagemanager: update module documentation
Nov 3, 2026
c717ee6
cm: database: inherit image manager storage virtually
Nov 4, 2026
7a05670
common: downloader: remove cancel by digest
Nov 4, 2026
42984df
common: tools: stop started threads if thread pool run fails
al1img Nov 3, 2026
a0b891f
cm: updatemanager: run install thread pool only during install
al1img Nov 3, 2026
ea654e1
cm: updatemanager: don't install installed or failed items
al1img Nov 3, 2026
45ef21e
common: imagemanager: set interrupted items to failed on start
al1img Nov 4, 2026
688b925
cm: updatemanager: install canceled items again
al1img Nov 4, 2026
61c2bd9
cm: updatemanager: remove items using thread pool
al1img Nov 4, 2026
4732775
common: imagemanager: add SetItemFail
al1img Nov 4, 2026
05f934b
cm: updatemanager: recover items with integrity error
al1img Nov 4, 2026
a3e7dd3
common: tools: report integrity errors in ReadFile
al1img Nov 4, 2026
982875c
sm: remove obsolete image manager interfaces and mocks
mlohvynenko Nov 3, 2026
006e1f9
sm: imagemanager: remove old implementation
mlohvynenko Nov 3, 2026
240a518
sm: imagemanager: add new implementation
mlohvynenko Nov 3, 2026
279086e
sm: use new image manager
mlohvynenko Nov 3, 2026
bb58193
sm: launcher: restart instance on integrity check failure
mlohvynenko Nov 4, 2026
214b3f9
common: tools: don't follow symlinks in CalculateSize
mlohvynenko Nov 4, 2026
9697d9b
sm: database: inherit image manager storage virtually
mlohvynenko Nov 6, 2026
47f889f
sm: launcher: allocate update buffers before starting thread pool
mlohvynenko Nov 6, 2026
15afa7a
common: spaceallocator: fit digests in outdated item ID
mlohvynenko Nov 6, 2026
921f188
common: imagemanager: allow image config without diff IDs
mlohvynenko Nov 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ sonar.coverage.exclusions=**/tests/**
# Ignore cpp:S5028 (macros should not define constants) in config.hpp/testconfig.hpp files only:
# these headers define AOS_CONFIG_* build-time knobs with #ifndef/#define guards so they can be
# overridden by the build system before this header is included, which constexpr/enum can't do.
sonar.issue.ignore.multicriteria=e1,e2,e3,e4,e5,e6,e7,e8
#
# Ignore cpp:M23_163 (MISRA C++:2023 13.1.1, classes should not be inherited virtually) in the CM
# and SM database interfaces and the SM image manager storage interface only: DatabaseItf lists all
# storage interfaces the CM or SM database implements,
# and the application database implements the image manager storage in a common base class, so
# StorageItf is inherited virtually to keep a single instance of it in the diamond. StorageItf is
# a pure interface without data.
sonar.issue.ignore.multicriteria=e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12
sonar.issue.ignore.multicriteria.e1.ruleKey=cpp:M23_356
sonar.issue.ignore.multicriteria.e1.resourceKey=**/*
sonar.issue.ignore.multicriteria.e2.ruleKey=cpp:S6022
Expand All @@ -53,5 +60,13 @@ sonar.issue.ignore.multicriteria.e7.ruleKey=cpp:S5028
sonar.issue.ignore.multicriteria.e7.resourceKey=**/config.hpp
sonar.issue.ignore.multicriteria.e8.ruleKey=cpp:S5028
sonar.issue.ignore.multicriteria.e8.resourceKey=**/testconfig.hpp
sonar.issue.ignore.multicriteria.e9.ruleKey=cpp:S7032
sonar.issue.ignore.multicriteria.e9.resourceKey=**/*
sonar.issue.ignore.multicriteria.e10.ruleKey=cpp:M23_163
sonar.issue.ignore.multicriteria.e10.resourceKey=**/cm/database/itf/database.hpp
sonar.issue.ignore.multicriteria.e11.ruleKey=cpp:M23_163
sonar.issue.ignore.multicriteria.e11.resourceKey=**/sm/database/itf/database.hpp
sonar.issue.ignore.multicriteria.e12.ruleKey=cpp:M23_163
sonar.issue.ignore.multicriteria.e12.resourceKey=**/sm/imagemanager/itf/storage.hpp

sonar.ws.timeout=600
5 changes: 3 additions & 2 deletions src/core/cm/communication/communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ It implements the following interfaces:
notification;
* [aos::cm::smcontroller::SenderItf](../smcontroller/itf/sender.hpp) - sends log messages;
* [aos::cm::launcher::SenderItf](../launcher/itf/senderitf.hpp) - sends override env vars statuses;
* [aos::cm::imagemanager::BlobInfoProviderItf](../imagemanager/itf/blobinfoprovider.hpp) - provides blobs info.
* [aos::common::imagemanager::BlobInfoProviderItf](../../common/imagemanager/itf/blobinfoprovider.hpp) - provides
blobs info.

It requires the following interfaces:

Expand Down Expand Up @@ -69,7 +70,7 @@ classDiagram
<<interface>>
}

class BlobInfoProviderItf["aos::cm::imagemanager::BlobInfoProviderItf"] {
class BlobInfoProviderItf["aos::common::imagemanager::BlobInfoProviderItf"] {
<<interface>>
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/cm/communication/itf/communication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
#define AOS_CORE_CM_COMMUNICATION_ITF_COMMUNICATION_HPP_

#include <core/cm/alerts/itf/sender.hpp>
#include <core/cm/imagemanager/itf/blobinfoprovider.hpp>
#include <core/cm/launcher/itf/sender.hpp>
#include <core/cm/monitoring/itf/sender.hpp>
#include <core/cm/rootcerts/itf/sender.hpp>
#include <core/cm/smcontroller/itf/sender.hpp>
#include <core/cm/storagestate/itf/sender.hpp>
#include <core/cm/updatemanager/itf/sender.hpp>
#include <core/common/cloudconnection/itf/cloudconnection.hpp>
#include <core/common/imagemanager/itf/blobinfoprovider.hpp>

namespace aos::cm::communication {

Expand All @@ -28,7 +28,7 @@ namespace aos::cm::communication {
*/
class CommunicationItf : public alerts::SenderItf,
public launcher::SenderItf,
public imagemanager::BlobInfoProviderItf,
public common::imagemanager::BlobInfoProviderItf,
public monitoring::SenderItf,
public rootcerts::SenderItf,
public smcontroller::SenderItf,
Expand Down
5 changes: 3 additions & 2 deletions src/core/cm/database/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ The database module provides persistent storage for various CM modules. It imple
following modules:

- [aos::cm::updatemanager::StorageItf](../updatemanager/itf/storage.hpp) - update manager storage interface;
- [aos::cm::imagemanager::StorageItf](../imagemanager/itf/storage.hpp) - image manager storage interface;
- [aos::common::imagemanager::StorageItf](../../common/imagemanager/itf/storage.hpp) - image manager storage interface,
inherited virtually so that the implementation may share it with a common image manager storage base class;
- [aos::cm::launcher::StorageItf](../launcher/itf/storage.hpp) - launcher storage interface;
- [aos::cm::storagestate::StorageItf](../storagestate/itf/storage.hpp) - storage state storage interface.

Expand All @@ -18,7 +19,7 @@ classDiagram
<<interface>>
}

class ImageManagerStorageItf ["aos::cm::imagemanager::StorageItf"] {
class ImageManagerStorageItf ["aos::common::imagemanager::StorageItf"] {
<<interface>>
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/cm/database/itf/database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#ifndef AOS_CORE_CM_DATABASE_ITF_DATABASE_HPP_
#define AOS_CORE_CM_DATABASE_ITF_DATABASE_HPP_

#include <core/cm/imagemanager/itf/storage.hpp>
#include <core/cm/launcher/itf/storage.hpp>
#include <core/cm/storagestate/itf/storage.hpp>
#include <core/cm/updatemanager/itf/storage.hpp>
#include <core/common/imagemanager/itf/storage.hpp>

namespace aos::cm::database {

Expand All @@ -22,7 +22,7 @@ namespace aos::cm::database {
* Database interface.
*/
class DatabaseItf : public updatemanager::StorageItf,
public imagemanager::StorageItf,
public virtual common::imagemanager::StorageItf,
public launcher::StorageItf,
public storagestate::StorageItf { };

Expand Down
22 changes: 10 additions & 12 deletions src/core/cm/imagemanager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2025 EPAM Systems, Inc.
# Copyright (C) 2026 EPAM Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -20,22 +20,20 @@ set(SOURCES imagemanager.cpp)
# Headers
# ######################################################################################################################

set(HEADERS
config.hpp
imagemanager.hpp
itf/blobinfoprovider.hpp
itf/imagemanager.hpp
itf/iteminfoprovider.hpp
itf/itemstatusprovider.hpp
itf/storage.hpp
)
set(HEADERS config.hpp imagemanager.hpp itf/imagemanager.hpp)

# ######################################################################################################################
# Libraries
# ######################################################################################################################

set(LIBRARIES aos::core::cm::fileserver aos::core::common::crypto aos::core::common::downloader
aos::core::common::ocispec aos::core::common::spaceallocator aos::core::common::tools
set(LIBRARIES
aos::core::cm::fileserver
aos::core::common::crypto
aos::core::common::downloader
aos::core::common::imagemanager
aos::core::common::ocispec
aos::core::common::spaceallocator
aos::core::common::tools
)

# ######################################################################################################################
Expand Down
34 changes: 4 additions & 30 deletions src/core/cm/imagemanager/config.hpp
Original file line number Diff line number Diff line change
@@ -1,47 +1,21 @@
/*
* Copyright (C) 2025 EPAM Systems, Inc.
* Copyright (C) 2026 EPAM Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef AOS_CORE_CM_IMAGEMANAGER_CONFIG_HPP_
#define AOS_CORE_CM_IMAGEMANAGER_CONFIG_HPP_

#include <core/common/consts.hpp>
#include <core/common/tools/string.hpp>
#include <core/common/imagemanager/config.hpp>

namespace aos::cm::imagemanager {

/**
* Image manager configuration.
* CM image manager config.
*/
struct Config {
StaticString<cFilePathLen> mImagePath;
size_t mPartLimit {};
struct Config : public common::imagemanager::Config {
StaticString<cFilePathLen> mDownloadPath;
Duration mUpdateItemTTL;
Duration mRemoveOutdatedPeriod;

/**
* Compares config.
*
* @param other config to compare.
* @return bool.
*/
friend bool operator==(const Config& lhs, const Config& other)
{
return lhs.mImagePath == other.mImagePath && lhs.mPartLimit == other.mPartLimit
&& lhs.mDownloadPath == other.mDownloadPath && lhs.mUpdateItemTTL == other.mUpdateItemTTL
&& lhs.mRemoveOutdatedPeriod == other.mRemoveOutdatedPeriod;
};

/**
* Compares config.
*
* @param other config to compare.
* @return bool.
*/
friend bool operator!=(const Config& lhs, const Config& other) { return !(lhs == other); };
};

} // namespace aos::cm::imagemanager
Expand Down
Loading
Loading