-
-
Notifications
You must be signed in to change notification settings - Fork 30
directly copies into the root #473
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
Conversation
fc09cf0 to
10c88de
Compare
NN708
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to improve dry run handling, as OciExportRootFs() now breaks the future root.
|
Yeah, true, I will look through everything. |
This prevents running out of space if there are too many changes.
10c88de to
c657e55
Compare
|
I added the clean up again. It might be useful if files are corrupted for some reason or in some edge cases. I renamed it though, since it would otherwise be a somewhat confusing variable name. |
d53a141 to
a20d5ee
Compare
14cd112 to
f692643
Compare
NN708
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taukakao Could you please create a new release in your repository? This would allow us to build a test image before merging.
2744089 to
b1b3161
Compare
|
@NN708 I made a release and tested it a bit. Everything seems to be as expected. |
Great work! I'll do some testing later as well. |
NN708
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The core functionality works, but there's an edge case bug when a dry-run is performed on a system where /part-future is empty.
$ pkexec abroot upgrade -d -f -V
(Verbose) NewABSystem: running...:info:
(Verbose) NewABImageFromRoot:info:running...
(Verbose) NewABImageFromRoot:info:found abimage.abr: sha256:04e948d0dd3b003343b69aecbe09c0d6fd7136f8425aedeb83a16f7970c92e1f
(Verbose) NewABRootManager:info:running...
(Verbose) ABRootManager.GetRootPartitions:info:running...
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUID120c6001-d845-4f27-9fff-70f6490aebc3has labelvos-a
(Verbose) ABRootManager.IdentifyPartition:info:running...
(Verbose) ABRootManager.IdentifyPartition:info:partition is present
(Verbose) ABRootManager.IsCurrent:info:running...
(Verbose) ABRootManager.IsCurrent:info:partition is current
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUID65a05a3a-3bab-41b6-a847-41501ce94d29has labelvos-b
(Verbose) ABRootManager.IdentifyPartition:info:running...
(Verbose) ABRootManager.IdentifyPartition:info:partition is future
(Verbose) ABRootManager.IsCurrent:info:running...
(Verbose) ABRootManager.IsCurrent:info:partition is not current
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUIDc708e82d-2911-4e99-8c4f-ebe6710d149fhas labelvos-var
(Verbose) ABRootManager.GetRootPartitions:info:successfully got root partitions
INFO Checking for system updates...
(Verbose) ABSystem.RunOperation:info:startingforce-upgrade
(Verbose) [Stage 0] -------- ABSystemRunOperation
(Verbose) ABSystem.LockOperation:info:lock file created
(Verbose) [Stage 1] -------- ABSystemRunOperation
(Verbose) ABSystem.CheckUpdate:info:running...
(Verbose) OCI.HasUpdate:info:Checking for updates ...
(Verbose) OCI.HasUpdate:info:checking image: ghcr.io/vanilla-arm/desktop:test
(Verbose) OCI.HasUpdate:info:no update available
(Verbose) ABSystem.RunOperation:warn(1.200000):No update available but --force is set. Proceeding...
(Verbose) [Stage 2] -------- ABSystemRunOperation
(Verbose) ABRootManager.GetPresent:info:running...
(Verbose) ABRootManager.GetPresent:info:successfully got present partition
(Verbose) ABRootManager.GetFuture:info:running...
(Verbose) ABRootManager.GetFuture:info:successfully got future partition
(Verbose) ABRootManager.GetBoot:info:running...
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUIDe981306e-0840-47ba-83f4-b63a792d3261has labelvos-boot
(Verbose) ABRootManager.GetBoot:info:successfully got boot partition
(Verbose) Partition.Unmount:info:running...
(Verbose) Partition.Unmount:err(0.000000):no mount point
(Verbose) Partition.Unmount:info:running...
(Verbose) Partition.Unmount:err(1.000000):device or resource busy
(Verbose) Partition.Mount:info:running...
(Verbose) Partition.Mount:info:successfully mounted/dev/mapper/vos--root-root--bto/part-future
(Verbose) [Stage 3] -------- ABSystemRunOperation
(Verbose) PackageManager.NewPackageManager:info:running...
(Verbose) PackageManager.GetFinalCmd:info:running...
(Verbose) PackageManager.GetAddPackagesString:info:running...
(Verbose) PackageManager.GetAddPackages:info:running...
(Verbose) PackageManager.getPackages:info:running...
(Verbose) PackageManager.getPackages:info:returning packages
(Verbose) PackageManager.GetAddPackagesString:info:done
(Verbose) PackageManager.GetRemovePackagesString:info:running...
(Verbose) PackageManager.GetRemovePackages:info:running...
(Verbose) PackageManager.getPackages:info:running...
(Verbose) PackageManager.getPackages:info:returning packages
(Verbose) PackageManager.GetRemovePackagesString:info:done
(Verbose) PackageManager.processUpgradePackages:info:no packages to install or remove
(Verbose) NewImageRecipe:info:running...
(Verbose) [Stage 4] -------- ABSystemRunOperation
(Verbose) [Stage 5] -------- ABSystemRunOperation
(Verbose) [Stage 6] -------- ABSystemRunOperation
(Verbose) NewChroot:info:running...
(Verbose) Chroot.Execute:info:running...
(Verbose) Chroot.Execute:info:running command:mount --bind / /
chroot: failed to run command ‘/bin/sh’: No such file or directory
(Verbose) Chroot.Execute:err(0.000000):exit status 127
(Verbose) NewChroot:err(1.000000):exit status 127
(Verbose) ABSystem.RunOperation:err(7.020000):exit status 127
(Verbose) Partition.Unmount:info:running...
(Verbose) Partition.Unmount:info:successfully unmounted/part-future
(Verbose) ABSystem.UnlockOperation:info:lock file removed
ERROR exit status 127This makes it possible to cancel the operation after downloading.
b1b3161 to
b0c517f
Compare
|
Makes sense, we can't run chroot in dryrun then. I made the change. |
This prevents running out of space if there are too many changes.
It also improves compatibility with non-CoW filesystems since it doesn't rely on reflink clones anymore.
The downside is that the time window in which the future root is unusable will be longer.
Though since we always have the current root, this should not really be a problem.