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

fix(update-server): persist the machine-id after writing the rootfs to the unused partition. #13077

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

vegano1
Copy link
Contributor

@vegano1 vegano1 commented Jul 11, 2023

Overview

The /etc/machine-id on the Flex is not persisting through updates since the file gets overwritten during an update, this pr fixes that by writing the machine-id to the unused partition after the rootfs has been written to it.

This needs or-core-pr-87 openemdedded change to work

Test Plan

  • Make sure that the UUID in /etc/machine-id persists after an update

Changelog

  • After the new rootfs has been written to the unused partition, read the old /etc/machine-id and write it to the new rootfs.

Review requests

Risk assessment

Low, this changes a small part of the update mechanism.

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #13077 (fdb80af) into edge (11b4775) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #13077      +/-   ##
==========================================
- Coverage   72.51%   72.51%   -0.01%     
==========================================
  Files        2345     2345              
  Lines       64886    64889       +3     
  Branches     7152     7152              
==========================================
  Hits        47054    47054              
- Misses      16108    16111       +3     
  Partials     1724     1724              
Flag Coverage Δ
update-server 65.49% <0.00%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ate-server/otupdate/openembedded/update_actions.py 54.83% <0.00%> (-1.09%) ⬇️

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Ooh interesting. This looks correct to me and should get merged but I might also pop it over to a new alpha if we do one

@vegano1
Copy link
Contributor Author

vegano1 commented Jul 11, 2023

@sfoster1
Sounds good, once I test this ill merge it in.

@vegano1
Copy link
Contributor Author

vegano1 commented Jul 11, 2023

@sfoster1

This openembedded change is required to persist the machine-id, it bind-mounts /mnt -> userfs/var/mnt so the update-server change above can write the machine-id to the unused partition.

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