ostree pull-local corrupts commit objects #3415
Replies: 7 comments 9 replies
-
Same issue I am also facing. Would you please help here @cgwalters |
Beta Was this translation helpful? Give feedback.
-
Trying to reproduce with LmP (scarthgap), and this is working fine:
|
Beta Was this translation helpful? Give feedback.
-
Yes; we have unit and integration tests using pull-local, so it's either some ostree bug or a bug in one of its dependencies or the environment. (I know yocto uses a filesystem-operations-interception tool for example) For the corrupted objects, try comparing the two - do you see a size/content mismatch or is it just metadata? |
Beta Was this translation helpful? Give feedback.
-
Was able to reproduce the issue locally, and indeed, it only happens when the sysroot gets created via yocto, probably because it is not calling the commands as root (I can reproduce with fakeroot). Noticed the error when trying a pull-local as a normal user, and got: Calling with fakeroot made pull-local pass, but then ostree fsck failed: If I call with sudo instead of fakeroot, everything works as expected. @cgwalters this is probably not yocto specific (we might have similar issues with other build systems), and I know repo itself has an option for bare-user, but in this case the sysroot gets created with ostree admin, as you can see at https://github.com/uptane/meta-updater/blob/kirkstone/classes/image_types_ota.bbclass#L9 The flow is basically:
After that we just create the ota-ext4 image, which gets flashed on the device. |
Beta Was this translation helpful? Give feedback.
-
Approach1 i tried and its working fine. ostree --repo=shravan init --mode=archive-z2 Approach2 Ricardo already tried and its not working and it will work with sudo. ostree admin --sysroot="shravan1" init-fs --modern "shravan1" It means problem is not with pull-local command, problem with "ostree admin --sysroot="shravan1" init-fs --modern "shravan1"" command where we initialized the sysroot along with repo. @cgwalters Would you please help here |
Beta Was this translation helpful? Give feedback.
-
@jlebon if i change the mode from bare to archive then its working fine. ostree --repo=shravan1/ostree/repo init --mode=archive-z2 So can we use same command here as well before line9:https://github.com/uptane/meta-updater/blob/kirkstone/classes/image_types_ota.bbclass#L9 to resolve this issue?? |
Beta Was this translation helpful? Give feedback.
-
Then only way to maintain bare because that's the fundamental requirement of libostree is to create the originally repo with bare mode: uptane/meta-updater@646b792 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @cgwalters ,
I've integrated meta-updater with my yocto build to enable ostree. When ostree --repo=ota-sysroot/ostree/repo pull-local ostree_repo <branch> is done, it is corrupting the repo - ostree --repo=ota-sysroot/ostree/repo fsck is failing with metadata mismatch error.
Whereas, ostree --repo=ostree_repo fsck is passing.
Is this a bug in ostree pull-local? Is there any other alternative to check file system health with ostree enabled system/ is there any other way to create deployment in offline way(without pull-local) so that it doesn't corrupt the file system?
Beta Was this translation helpful? Give feedback.
All reactions