Skip to content

src/update_engine_client: handle -update with idle#10

Merged
tormath1 merged 1 commit intoflatcar-masterfrom
tormath1/356-fix-misleading-message
Jul 2, 2021
Merged

src/update_engine_client: handle -update with idle#10
tormath1 merged 1 commit intoflatcar-masterfrom
tormath1/356-fix-misleading-message

Conversation

@tormath1
Copy link
Copy Markdown
Contributor

@tormath1 tormath1 commented Jul 2, 2021

idle status was not correctly handled by the update_engine.

When a user wants to check for an update with update_engine_client -update
the command will fail with "Update failed" which can be misleading.
Actually, the update does not failed it is just cancelled because there
is no newer version.

Signed-off-by: Mathieu Tortuyaux mathieu@kinvolk.io

How to use

build a Flatcar image using this commit in coreos-base/update-engine ebuild.

$ update_engine_client -update
I0702 14:33:22.542590   963 update_engine_client.cc:251] Initiating update check and install.
I0702 14:33:22.555794   963 update_engine_client.cc:256] Waiting for update to complete.
LAST_CHECKED_TIME=0
PROGRESS=0.000000
CURRENT_OP=UPDATE_STATUS_IDLE
NEW_VERSION=0.0.0
NEW_SIZE=0
I0702 14:33:28.111543   963 update_engine_client.cc:194] Update cancelled -- remote version is not newer than the local one

Testing done

Closes flatcar/Flatcar#356

@tormath1 tormath1 self-assigned this Jul 2, 2021
@tormath1 tormath1 requested a review from a team July 2, 2021 14:38
exit(1);
}
if (current_op == "UPDATE_STATUS_IDLE") {
LOG(INFO) << "Update cancelled -- remote version is not newer than the local one";
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.

Suggested change
LOG(INFO) << "Update cancelled -- remote version is not newer than the local one";
LOG(INFO) << "No update available";

Whether the version is newer or not is not really guaranteed. I would also not call it cancelled, but maybe not available.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

make senses - also it's a clearer message :)

idle status was not correctly handled by the update_engine.

When a user wants to check for an update with `update_engine_client -update`
the command will fail with "Update failed" which can be misleading.
Actually, the update does not failed it is just cancelled because there
is no newer version.

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
@tormath1 tormath1 force-pushed the tormath1/356-fix-misleading-message branch from 538210d to e826e24 Compare July 2, 2021 15:11
@tormath1 tormath1 merged commit c3c45a0 into flatcar-master Jul 2, 2021
@tormath1 tormath1 deleted the tormath1/356-fix-misleading-message branch July 2, 2021 15:12
tormath1 pushed a commit to flatcar-archive/coreos-overlay that referenced this pull request Jul 2, 2021
related to: flatcar/update_engine#10,
flatcar/Flatcar#356

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
t-lo pushed a commit to flatcar/scripts that referenced this pull request Apr 17, 2023
related to: flatcar/update_engine#10,
flatcar/Flatcar#356

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
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.

update_engine_client: Improve feedback when an update is not needed

2 participants