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

Wrong argument in update manager service unit template #63

Closed
vasilvas99 opened this issue Jul 27, 2023 · 2 comments · Fixed by #64
Closed

Wrong argument in update manager service unit template #63

vasilvas99 opened this issue Jul 27, 2023 · 2 comments · Fixed by #64
Assignees
Labels
bug Something isn't working task Single unit of work
Milestone

Comments

@vasilvas99
Copy link

Issue

The update manager recipe compiles and installs the UM config.json and binary in the final image, but the service unit fails to start the service. Looking at the logs, we can see the following error:

Jul 27 08:25:40 qemux86-64 systemd[1]: Stopped Eclipse Kanto - Update Manager.
Jul 27 08:25:40 qemux86-64 systemd[1]: Started Eclipse Kanto - Update Manager.
Jul 27 08:25:41 qemux86-64 update-manager[347]: flag provided but not defined: -configFile

Comparing the error log and the help of UM we can see there is an error in the service unit template here:
https://github.com/eclipse-kanto/meta-kanto/blob/kirkstone/recipes-management/update-manager/files/service.template#L10

Currently L10 is:

ExecStart=@UM_BIN_DD@/update-manager -configFile @UM_CFG_DD@/update-manager/config.json

But should be:

ExecStart=@UM_BIN_DD@/update-manager -config-file @UM_CFG_DD@/update-manager/config.json

That is, the option name is -config-file and not -configFile.

Expected Behavior

The service unit is patched with the proper option name and it starts successfully.

@stoyan-zoubev
Copy link
Contributor

The origin of the problem comes from the service template file that is committed in update-manager repository: https://github.com/eclipse-kanto/update-manager/blob/2025fdb8d813a070842934d017f4e0364ef32ef9/resources/update-manager.service

Currently, it's a little bit of a mess with this config file flag between the Kanto components. There are several separate options used:

I think all these should be aligned with each other and limit the differences. Only the update manager is a new Kanto component, that has never been released up to now, the others are released with their different config options already.

I see two options to fix the reported problem:

  • update the service file in update-manager repository, and update-manager service.template files in meta-kanto main and kirkstone branches to use correct flag that matches the implementation. The implementation may be updated to used shorter cfg-file instead of current config-file, just to match the container-management implementation.
  • update the update manager implementation and change the flag from config-file to configFile. Perhaps also the other update manager flags should be updated to use camelCase keys. With such a change, the update manager will be aligned with the rest of Kanto components, the only difference will remain with the container-management component.

@k-gostev @dimitar-dimitrow What do you think? Which approach shall we go? Please, create the corresponding ticket in the update-manager issue tracker. In any case, a change in update-manager repository is required - either implementation or service resource needs to be fixed.

@k-gostev
Copy link
Member

Let's stick for now with config-file, but I agree that we need to align all properties in the different components, because it's a mess now. I will open the tickets and PRs for the update-manager.

@k-gostev k-gostev linked a pull request Jul 27, 2023 that will close this issue
@k-gostev k-gostev self-assigned this Jul 27, 2023
@k-gostev k-gostev added bug Something isn't working task Single unit of work labels Jul 27, 2023
@k-gostev k-gostev added this to the M4 milestone Jul 27, 2023
k-gostev added a commit that referenced this issue Jul 28, 2023
[#63] Wrong argument in update manager service unit template

--------------
Signed-off-by: Kristiyan Gostev <kristiyan.gostev@bosch.com>
k-gostev added a commit that referenced this issue Jul 28, 2023
[#63] Wrong argument in update manager service unit template

--------------
Signed-off-by: Kristiyan Gostev <kristiyan.gostev@bosch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working task Single unit of work
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants