Skip to content

Remove hard-coded usage of aktualizr-lite#27

Merged
doanac merged 1 commit intofoundriesio:masterfrom
doanac:use-sota-client
Sep 26, 2021
Merged

Remove hard-coded usage of aktualizr-lite#27
doanac merged 1 commit intofoundriesio:masterfrom
doanac:use-sota-client

Conversation

@doanac
Copy link
Copy Markdown
Member

@doanac doanac commented Sep 24, 2021

meta-updater code in OE allows the actual ota client to be configurable
via the SOTA_CLIENT setting. This change removes our hard coded
dependency on aktualizr-lite so that it can be used with any proper
SOTA_CLIENT.

Signed-off-by: Andy Doan [email protected]

meta-updater code in OE allows the actual ota client to be configurable
via the SOTA_CLIENT setting. This change removes our hard coded
dependency on aktualizr-lite so that it can be used with any proper
SOTA_CLIENT.

Signed-off-by: Andy Doan <[email protected]>
Comment thread src/main.cpp
try {
if (!lock.try_lock_sharable()) {
cerr << "ERROR: aktualizr-lite daemon appears to be running" << endl;
cerr << "ERROR: " SOTA_CLIENT " daemon appears to be running" << endl;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we're assuming that the custom client will also use the same lock file (/var/lock/aklite.lock), is this something done/handled by the lite library as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the library should handle this, so the name is fine. That said - the library isn't doing the lock, so i need to work on that logic now also. can be done independently of this.

Comment thread src/main.cpp
cout << "Starting aktualizr-lite daemon" << endl;
_spawn("systemctl start aktualizr-lite");
cout << "Starting " SOTA_CLIENT " daemon" << endl;
_spawn("systemctl start " SOTA_CLIENT);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here but for the systemd service job, but I think this should be fine.

Copy link
Copy Markdown
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@doanac doanac merged commit dd8fe0a into foundriesio:master Sep 26, 2021
@doanac doanac deleted the use-sota-client branch September 26, 2021 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants