From c15110bcc1dbf0335aa288f933adeda4f2e1235a Mon Sep 17 00:00:00 2001 From: "Sirlapu, Tejaswini" Date: Thu, 25 Jan 2024 13:54:55 -0800 Subject: [PATCH 1/2] [source] Remove ubuntuAptSource configuration tag and underlying code RTC 536910 Remove the UbuntuAptSource XML tag from the intel_manageability.conf file and its associated tag with it --- docs/Configuration Parameters.md | 2 ++ docs/In-Band Manageability Developer Guide.md | 4 +++- docs/In-Band Manageability User Guide - ThingsBoard.md | 1 + docs/Manifest Parameters.md | 1 + inbm/Changelog.md | 2 ++ .../fpm-template/etc/intel_manageability.conf | 3 --- inbm/dispatcher-agent/dispatcher/dispatcher_class.py | 6 ------ inbm/dispatcher-agent/dispatcher/sota/constants.py | 2 -- inbm/dispatcher-agent/dispatcher/sota/setup_helper.py | 3 +-- inbm/integration-reloaded/scripts/iotg_inb_developer.conf | 3 --- .../scripts/iotg_inb_developer_no_nw_check.conf | 3 --- .../windows-override/inbm/etc/intel_manageability.conf | 3 --- 12 files changed, 10 insertions(+), 23 deletions(-) diff --git a/docs/Configuration Parameters.md b/docs/Configuration Parameters.md index 26a92b009..265f61d79 100644 --- a/docs/Configuration Parameters.md +++ b/docs/Configuration Parameters.md @@ -50,6 +50,8 @@ The below tables represent the different sections of the configuration file. | certFile | /etc/ssl/certs/csl-ca-cert.pem | path the cert file | ### SOTA +Note: ubuntuAptSource tag is no longer used or required in current or newer versions + | Key | Default Value | Description | |:-----------------------|:----------------------:|:-----------------------------------------------------------------------------------------| | ubuntuAptSource | http://yoururl/ubuntu/ | Location used to update Ubuntu | diff --git a/docs/In-Band Manageability Developer Guide.md b/docs/In-Band Manageability Developer Guide.md index a488b67f6..7bdc8177e 100644 --- a/docs/In-Band Manageability Developer Guide.md +++ b/docs/In-Band Manageability Developer Guide.md @@ -534,6 +534,8 @@ To send the whole manifest with edited parameters at once, - To overwrite the existing configuration file with a new one then use the **Load Element Manifest**. +Note: ubuntuAptSource tag is no longer used or required for current or newer versions + The following commands are useful to append, remove values for parameters that have multiple values. Parameters that have multiple values are **trustedRepositories**, **sotaSW** and **ubuntuAptSource**. @@ -778,4 +780,4 @@ The log file contains the information such as the status, OTA type, time, metada #### Log File Sample ```text "{'Status': 'SUCCESS', 'Type': 'sota', 'Time': '2023-06-07 05:06:43', 'Metadata': 'ota
sotaremote
update
', 'Error': None, 'Version': 'v1'}" -``` \ No newline at end of file +``` diff --git a/docs/In-Band Manageability User Guide - ThingsBoard.md b/docs/In-Band Manageability User Guide - ThingsBoard.md index 07b5b9f7a..0dda55392 100644 --- a/docs/In-Band Manageability User Guide - ThingsBoard.md +++ b/docs/In-Band Manageability User Guide - ThingsBoard.md @@ -1170,6 +1170,7 @@ Events Log in the dashboard below the OTA buttons. **Required Fields**: Command and Path +ubuntuAptSource tag is no longer used or required in current or newer versions **NOTE:** > - Append is only applicable to three configuration tags i.e diff --git a/docs/Manifest Parameters.md b/docs/Manifest Parameters.md index 630f61976..278bae384 100644 --- a/docs/Manifest Parameters.md +++ b/docs/Manifest Parameters.md @@ -853,6 +853,7 @@ The query command can be used to gather information about the system and the Vis #### Configuration Append Manifest Example +* Note: ubuntuAptSource tag is no longer used or required for current or newer versions * Append is only applicable to three configuration tags, for example, **trustedRepositories**, **sotaSW** and **ubuntuAptSource** * Path takes in key value pair format, example: trustedRepositories: https://dummyURL.com diff --git a/inbm/Changelog.md b/inbm/Changelog.md index 31387c2a4..882c0a823 100644 --- a/inbm/Changelog.md +++ b/inbm/Changelog.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Changed - RTC 536078 - Added package list option to inbc, cloud, and internal manifest. This allows SOTA to run an install/upgrade command on a set of individual packages rather than all installed packages. + - RTC 536910 - [source] Remove ubuntuAptSource configuration tag and underlying code + ### Added - RTC 536601 - Added 'source' command to INBM. This command manages `/etc/apt/sources.list` and `/etc/apt/sources.list.d/*` and associated gpg keys on Ubuntu. diff --git a/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf b/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf index bf121ec3d..a91502a43 100644 --- a/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf +++ b/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf @@ -35,9 +35,6 @@ /etc/ssl/certs/csl-ca-cert.pem - - http://archive.ubuntu.com/ubuntu/ - true diff --git a/inbm/dispatcher-agent/dispatcher/dispatcher_class.py b/inbm/dispatcher-agent/dispatcher/dispatcher_class.py index d5ca167c5..da70d5ec3 100644 --- a/inbm/dispatcher-agent/dispatcher/dispatcher_class.py +++ b/inbm/dispatcher-agent/dispatcher/dispatcher_class.py @@ -569,12 +569,6 @@ def config_sanitize(the_payload: Any) -> Any: else: self.proceed_without_rollback = cleaned_payload - if config_name == "ubuntuAptSource": - if cleaned_payload is None: - logger.error("No ubuntuAptSource selected!") - else: - self._sota_repos = cleaned_payload - try: logger.debug('Subscribing to: %s', STATE_CHANNEL) self._dispatcher_broker.mqtt_subscribe(STATE_CHANNEL, self._on_message) diff --git a/inbm/dispatcher-agent/dispatcher/sota/constants.py b/inbm/dispatcher-agent/dispatcher/sota/constants.py index 0d8a60362..c25a8522a 100644 --- a/inbm/dispatcher-agent/dispatcher/sota/constants.py +++ b/inbm/dispatcher-agent/dispatcher/sota/constants.py @@ -14,8 +14,6 @@ # Mender artifact path MENDER_ARTIFACT_PATH = get_canonical_representation_of_path("/etc/mender/artifact_info") -GET_UBUNTU_PKG_REPO = "dispatcher/sota/ubuntuAptSource" - SOTA_STATE = 'normal' LOGPATH = '/var/lib/dispatcher/upload' diff --git a/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py b/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py index f2a9cf555..e3517da5c 100644 --- a/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py +++ b/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py @@ -15,7 +15,7 @@ from typing import Any, Optional from ..dispatcher_broker import DispatcherBroker -from .constants import GET_UBUNTU_PKG_REPO, APT_SOURCES_LIST_PATH, MENDER_FILE_PATH +from .constants import APT_SOURCES_LIST_PATH, MENDER_FILE_PATH from ..common import dispatcher_state logger = logging.getLogger(__name__) @@ -55,7 +55,6 @@ def __init__(self, sota_repos: Optional[str]) -> None: @param sota_repos: new Ubuntu/Debian mirror (or None) """ - self._list_path = GET_UBUNTU_PKG_REPO self._sota_repos = sota_repos super().__init__() diff --git a/inbm/integration-reloaded/scripts/iotg_inb_developer.conf b/inbm/integration-reloaded/scripts/iotg_inb_developer.conf index 5cf1f2fce..5f83d0216 100644 --- a/inbm/integration-reloaded/scripts/iotg_inb_developer.conf +++ b/inbm/integration-reloaded/scripts/iotg_inb_developer.conf @@ -39,9 +39,6 @@ /etc/ssl/certs/csl-ca-cert.pem - - http://archive.ubuntu.com/ubuntu/ - true diff --git a/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf b/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf index 9b9570d83..a3b8ff5ac 100644 --- a/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf +++ b/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf @@ -39,9 +39,6 @@ /etc/ssl/certs/csl-ca-cert.pem - - http://archive.ubuntu.com/ubuntu/ - true diff --git a/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf b/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf index 0fe8e8248..983ba8ff2 100644 --- a/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf +++ b/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf @@ -26,9 +26,6 @@ - - http://archive.ubuntu.com/ubuntu/ - true From e627b9b7c6b0acbe771e1463df6f0b38356e000c Mon Sep 17 00:00:00 2001 From: "Sirlapu, Tejaswini" Date: Thu, 25 Jan 2024 13:54:55 -0800 Subject: [PATCH 2/2] [source] Remove ubuntuAptSource configuration tag and underlying code RTC 536910 Remove the UbuntuAptSource XML tag from the intel_manageability.conf file and its associated tag with it --- docs/Configuration Parameters.md | 2 ++ docs/In-Band Manageability Developer Guide.md | 4 +++- docs/In-Band Manageability User Guide - ThingsBoard.md | 1 + docs/Manifest Parameters.md | 1 + inbm/Changelog.md | 2 ++ .../fpm-template/etc/intel_manageability.conf | 3 --- inbm/dispatcher-agent/dispatcher/dispatcher_class.py | 6 ------ inbm/dispatcher-agent/dispatcher/sota/constants.py | 2 -- inbm/dispatcher-agent/dispatcher/sota/setup_helper.py | 3 +-- inbm/integration-reloaded/scripts/iotg_inb_developer.conf | 3 --- .../scripts/iotg_inb_developer_no_nw_check.conf | 3 --- .../windows-override/inbm/etc/intel_manageability.conf | 3 --- 12 files changed, 10 insertions(+), 23 deletions(-) diff --git a/docs/Configuration Parameters.md b/docs/Configuration Parameters.md index 26a92b009..54e83056e 100644 --- a/docs/Configuration Parameters.md +++ b/docs/Configuration Parameters.md @@ -50,6 +50,8 @@ The below tables represent the different sections of the configuration file. | certFile | /etc/ssl/certs/csl-ca-cert.pem | path the cert file | ### SOTA +Note: ubuntuAptSource tag is no longer used in/After 4.2.0 Version + | Key | Default Value | Description | |:-----------------------|:----------------------:|:-----------------------------------------------------------------------------------------| | ubuntuAptSource | http://yoururl/ubuntu/ | Location used to update Ubuntu | diff --git a/docs/In-Band Manageability Developer Guide.md b/docs/In-Band Manageability Developer Guide.md index a488b67f6..d565dd63f 100644 --- a/docs/In-Band Manageability Developer Guide.md +++ b/docs/In-Band Manageability Developer Guide.md @@ -534,6 +534,8 @@ To send the whole manifest with edited parameters at once, - To overwrite the existing configuration file with a new one then use the **Load Element Manifest**. +Note: ubuntuAptSource tag is no longer used in/After 4.2.0 Version + The following commands are useful to append, remove values for parameters that have multiple values. Parameters that have multiple values are **trustedRepositories**, **sotaSW** and **ubuntuAptSource**. @@ -778,4 +780,4 @@ The log file contains the information such as the status, OTA type, time, metada #### Log File Sample ```text "{'Status': 'SUCCESS', 'Type': 'sota', 'Time': '2023-06-07 05:06:43', 'Metadata': 'ota
sotaremote
update
', 'Error': None, 'Version': 'v1'}" -``` \ No newline at end of file +``` diff --git a/docs/In-Band Manageability User Guide - ThingsBoard.md b/docs/In-Band Manageability User Guide - ThingsBoard.md index 07b5b9f7a..0dda55392 100644 --- a/docs/In-Band Manageability User Guide - ThingsBoard.md +++ b/docs/In-Band Manageability User Guide - ThingsBoard.md @@ -1170,6 +1170,7 @@ Events Log in the dashboard below the OTA buttons. **Required Fields**: Command and Path +ubuntuAptSource tag is no longer used or required in current or newer versions **NOTE:** > - Append is only applicable to three configuration tags i.e diff --git a/docs/Manifest Parameters.md b/docs/Manifest Parameters.md index 630f61976..7b38f5fba 100644 --- a/docs/Manifest Parameters.md +++ b/docs/Manifest Parameters.md @@ -853,6 +853,7 @@ The query command can be used to gather information about the system and the Vis #### Configuration Append Manifest Example +Note: ubuntuAptSource tag is no longer used in/After 4.2.0 Version * Append is only applicable to three configuration tags, for example, **trustedRepositories**, **sotaSW** and **ubuntuAptSource** * Path takes in key value pair format, example: trustedRepositories: https://dummyURL.com diff --git a/inbm/Changelog.md b/inbm/Changelog.md index 31387c2a4..882c0a823 100644 --- a/inbm/Changelog.md +++ b/inbm/Changelog.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Changed - RTC 536078 - Added package list option to inbc, cloud, and internal manifest. This allows SOTA to run an install/upgrade command on a set of individual packages rather than all installed packages. + - RTC 536910 - [source] Remove ubuntuAptSource configuration tag and underlying code + ### Added - RTC 536601 - Added 'source' command to INBM. This command manages `/etc/apt/sources.list` and `/etc/apt/sources.list.d/*` and associated gpg keys on Ubuntu. diff --git a/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf b/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf index bf121ec3d..a91502a43 100644 --- a/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf +++ b/inbm/configuration-agent/fpm-template/etc/intel_manageability.conf @@ -35,9 +35,6 @@ /etc/ssl/certs/csl-ca-cert.pem - - http://archive.ubuntu.com/ubuntu/ - true diff --git a/inbm/dispatcher-agent/dispatcher/dispatcher_class.py b/inbm/dispatcher-agent/dispatcher/dispatcher_class.py index d5ca167c5..da70d5ec3 100644 --- a/inbm/dispatcher-agent/dispatcher/dispatcher_class.py +++ b/inbm/dispatcher-agent/dispatcher/dispatcher_class.py @@ -569,12 +569,6 @@ def config_sanitize(the_payload: Any) -> Any: else: self.proceed_without_rollback = cleaned_payload - if config_name == "ubuntuAptSource": - if cleaned_payload is None: - logger.error("No ubuntuAptSource selected!") - else: - self._sota_repos = cleaned_payload - try: logger.debug('Subscribing to: %s', STATE_CHANNEL) self._dispatcher_broker.mqtt_subscribe(STATE_CHANNEL, self._on_message) diff --git a/inbm/dispatcher-agent/dispatcher/sota/constants.py b/inbm/dispatcher-agent/dispatcher/sota/constants.py index 0d8a60362..c25a8522a 100644 --- a/inbm/dispatcher-agent/dispatcher/sota/constants.py +++ b/inbm/dispatcher-agent/dispatcher/sota/constants.py @@ -14,8 +14,6 @@ # Mender artifact path MENDER_ARTIFACT_PATH = get_canonical_representation_of_path("/etc/mender/artifact_info") -GET_UBUNTU_PKG_REPO = "dispatcher/sota/ubuntuAptSource" - SOTA_STATE = 'normal' LOGPATH = '/var/lib/dispatcher/upload' diff --git a/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py b/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py index f2a9cf555..e3517da5c 100644 --- a/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py +++ b/inbm/dispatcher-agent/dispatcher/sota/setup_helper.py @@ -15,7 +15,7 @@ from typing import Any, Optional from ..dispatcher_broker import DispatcherBroker -from .constants import GET_UBUNTU_PKG_REPO, APT_SOURCES_LIST_PATH, MENDER_FILE_PATH +from .constants import APT_SOURCES_LIST_PATH, MENDER_FILE_PATH from ..common import dispatcher_state logger = logging.getLogger(__name__) @@ -55,7 +55,6 @@ def __init__(self, sota_repos: Optional[str]) -> None: @param sota_repos: new Ubuntu/Debian mirror (or None) """ - self._list_path = GET_UBUNTU_PKG_REPO self._sota_repos = sota_repos super().__init__() diff --git a/inbm/integration-reloaded/scripts/iotg_inb_developer.conf b/inbm/integration-reloaded/scripts/iotg_inb_developer.conf index 5cf1f2fce..5f83d0216 100644 --- a/inbm/integration-reloaded/scripts/iotg_inb_developer.conf +++ b/inbm/integration-reloaded/scripts/iotg_inb_developer.conf @@ -39,9 +39,6 @@ /etc/ssl/certs/csl-ca-cert.pem - - http://archive.ubuntu.com/ubuntu/ - true diff --git a/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf b/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf index 9b9570d83..a3b8ff5ac 100644 --- a/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf +++ b/inbm/integration-reloaded/scripts/iotg_inb_developer_no_nw_check.conf @@ -39,9 +39,6 @@ /etc/ssl/certs/csl-ca-cert.pem - - http://archive.ubuntu.com/ubuntu/ - true diff --git a/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf b/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf index 0fe8e8248..983ba8ff2 100644 --- a/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf +++ b/inbm/packaging/windows-override/inbm/etc/intel_manageability.conf @@ -26,9 +26,6 @@ - - http://archive.ubuntu.com/ubuntu/ - true