imageloader UnmountComponent API |
||||||
Issue descriptionUmount all mount points of that component since otherwise 'deleted' components aren't actually freeing the disk space. We need to reduce ref count of component files (image) to 0 in order to reclaim space.
,
Dec 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/imageloader/+/6c573cf2a575fe8030ff02622a4ebe28556cba03 commit 6c573cf2a575fe8030ff02622a4ebe28556cba03 Author: Xiaochu Liu <xiaochu@chromium.org> Date: Fri Dec 01 04:30:16 2017 dbus API UnmountComponent UnmountComponent takes a component name and unmount all mount points of this component. The user of this API is component updater and the API does exactly what caller wants. BUG= chromium:781992 TEST=unmount a component on device successfully. an autotest will be added to cover this API. Change-Id: Ie4238e4a361608fb92086b966a6f1b70f0855b93 Reviewed-on: https://chromium-review.googlesource.com/791858 Commit-Ready: Xiaochu Liu <xiaochu@chromium.org> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Greg Kerr <kerrnel@chromium.org> [modify] https://crrev.com/6c573cf2a575fe8030ff02622a4ebe28556cba03/helper_process.cc [modify] https://crrev.com/6c573cf2a575fe8030ff02622a4ebe28556cba03/dbus_permissions/org.chromium.ImageLoader.conf [modify] https://crrev.com/6c573cf2a575fe8030ff02622a4ebe28556cba03/imageloader.cc [modify] https://crrev.com/6c573cf2a575fe8030ff02622a4ebe28556cba03/dbus_adaptors/org.chromium.ImageLoaderInterface.xml [modify] https://crrev.com/6c573cf2a575fe8030ff02622a4ebe28556cba03/imageloader.h [modify] https://crrev.com/6c573cf2a575fe8030ff02622a4ebe28556cba03/imageloader_main.cc
,
Dec 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/37284b23ac18636f58ad348143eb29f77382c05f commit 37284b23ac18636f58ad348143eb29f77382c05f Author: Xiaochu Liu <xiaochu@chromium.org> Date: Sat Dec 02 04:32:46 2017 platform_ImageLoader: test UnmountComponent API Load a component successfully and then calls UnmountComponent API to cleanup the mount point. BUG= chromium:781992 TEST=test passed. Change-Id: Ib2d97ad53e16795156f5b3ec1b6726902fdc2adf Reviewed-on: https://chromium-review.googlesource.com/791811 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Greg Kerr <kerrnel@chromium.org> [modify] https://crrev.com/37284b23ac18636f58ad348143eb29f77382c05f/client/site_tests/platform_ImageLoader/platform_ImageLoader.py
,
Dec 4 2017
,
Dec 6 2017
Looks like this causes a failure on 3.8 kernels. https://crosland.corp.google.com/log/10178.0.0..10179.0.0 https://wmatrix.googleplex.com/unfiltered?hide_missing=True&releases=tot&tests=platform_ImageLoaderServer&days_back=20
,
Dec 6 2017
i didn't see errors in client test. Only noticed errors in server test:
12/04 22:25:24.937 ERROR| utils:0280| [stderr] 2017-12-04 22:25:24 URL:http://100.115.185.228:8082/static/butterfly-release/R65-10187.0.0/autotest/packages/client-autotest.tar.bz2 [11952669/11952669] -> "/tmp/sysinfo/autoserv-azAmfX/packages/client-autotest.tar.bz2" [1]
12/04 22:25:31.907 ERROR| utils:0280| [stderr] 2017-12-04 22:25:31 URL:http://100.115.185.228:8082/static/butterfly-release/R65-10187.0.0/autotest/packages/packages.checksum [34907/34907] -> "/tmp/sysinfo/autoserv-azAmfX/packages.checksum" [1]
12/04 22:25:37.772 ERROR| utils:0280| [stderr] cat: /tmp/sysinfo/autoserv-azAmfX/.checksum: No such file or directory
12/04 22:27:40.029 ERROR| utils:0280| [stderr] 2017-12-04 22:27:39 URL:http://100.115.185.228:8082/static/butterfly-release/R65-10187.0.0/autotest/packages/packages.checksum [34907/34907] -> "/usr/local/autotest/packages.checksum" [1]
12/04 22:27:45.956 ERROR| utils:0280| [stderr] cat: /usr/local/autotest/.checksum: No such file or directory
12/04 22:29:35.237 ERROR| logging_manager:0626| tko parser: {'cidb_build_stage_id': 64184518, 'builds': "{'cros-version': 'butterfly-release/R65-10187.0.0'}", 'job_started': 1512455040, 'hostname': 'chromeos6-row1-rack3-host9', 'cidb_build_id': 2100233, 'status_version': 1, 'label': 'butterfly-release/R65-10187.0.0/bvt-perbuild/platform_ImageLoaderServer', 'parent_job_id': 160239922, 'drone': 'chromeos-server10.hot.corp.google.com', 'user': 'chromeos-test', 'suite': 'bvt-perbuild', 'job_queued': 1512452206, 'experimental': 'False', 'build': 'butterfly-release/R65-10187.0.0'}
12/04 22:29:35.239 ERROR| logging_manager:0626| tko parser: MACHINE NAME: chromeos6-row1-rack3-host9
12/04 22:29:35.239 ERROR| logging_manager:0626| tko parser: MACHINE GROUP: butterfly
12/04 22:29:35.240 ERROR| logging_manager:0626| tko parser: parsing partial test ---- SERVER_JOB
12/04 22:29:35.240 ERROR| logging_manager:0626| tko parser: parsing partial test platform_ImageLoaderServer platform_ImageLoaderServer
12/04 22:29:35.241 ERROR| logging_manager:0626| tko parser: RUNNING: RUNNING
12/04 22:29:35.241 ERROR| logging_manager:0626| Subdir: platform_ImageLoaderServer
12/04 22:29:35.241 ERROR| logging_manager:0626| Testname: platform_ImageLoaderServer
12/04 22:29:35.242 ERROR| logging_manager:0626|
12/04 22:29:35.242 ERROR| logging_manager:0626| tko parser: update RUNNING reason: Failed: platform_ImageLoader
12/04 22:29:35.242 ERROR| logging_manager:0626| tko parser: parsing test platform_ImageLoaderServer platform_ImageLoaderServer
12/04 22:29:35.243 ERROR| logging_manager:0626| tko parser: ADD: FAIL
12/04 22:29:35.243 ERROR| logging_manager:0626| Subdir: platform_ImageLoaderServer
12/04 22:29:35.243 ERROR| logging_manager:0626| Testname: platform_ImageLoaderServer
12/04 22:29:35.244 ERROR| logging_manager:0626| Failed: platform_ImageLoader
12/04 22:29:35.244 ERROR| logging_manager:0626| tko parser: parsing test ---- SERVER_JOB
,
Dec 6 2017
Ok you might be best off grabbing a 3.8 device and running the tests locally to see.
,
Dec 6 2017
This test starts to mount an ext4 image on kernel v3.8 which causes following errors: 2017-12-06T18:36:04.227981+00:00 ERR imageloader[18587]: mount, mount_point /run/imageloader/cros-termina/10146.0.0: Invalid argument 2017-12-06T18:36:04.228091+00:00 WARNING kernel: [ 2661.211406] JBD2: Unrecognised features on journal 2017-12-06T18:36:04.228097+00:00 ERR kernel: [ 2661.211423] EXT4-fs (dm-3): error loading journal 2017-12-06T18:36:04.232579+00:00 ERR imageloader[18587]: mount failed It looks like v3.8 does not mount ext4?
,
Dec 6 2017
,
Dec 8 2017
I tested on link(3.8)&nyan(3.10), both failed for the same reason. hi Sonny, is it feasible to support mounting ext4 image in kernel? Currently in production our only ext4 format component is vm container which is for eve only. Otherwise, I can disable ext4 image testing on these two kernel versions.
,
Dec 8 2017
It looks like whatever created the ext4 filesystem is using some features that those older kernels don't recognize -- you can likely add some flags to the filesystem creation to avoid those errors but I'd need to look more closely at the errors to give you exact command line options.
,
Dec 10 2017
thanks, Sonny. That would be very helpful. I will update the test image after you provide the command line options.
,
Dec 11 2017
#5, #6 and other: I downloaded the image that fails: gs://chromeos-localmirror-private/testing/components/prod_signed_10042.0.0.tar.gz And look at the image iteself on my workstation: /build/eve/sbin/dumpe2fs -h prod_signed_10042.0.0/image.ext4 ... Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3 ... 3.8 kernel does not support v3 (only v2). V3 has been added in 3.14.
,
Dec 11 2017
Digging in the code (https://git.backbone.ws/linux/backbone-sources/commit/834adfb2e2319aea050e3b5da85dcef09b221633?diffmode=sidebyside), it looks like an image on 3.12 and above always get v3 checksum, so that image will not work on 3.10 and 3.8. If an image is created on 3.8/3.10 with v2 checksum, it will be automatically updated in 3.14. The image fails the test has been introduced with https://chromium-review.googlesource.com/#/c/731726/, a server test. I wonder if the server test has only been used recently (after host upgrade): that would explain why we see the error only now.
,
Dec 12 2017
These images are all using dm-verity which means they're read-only? So we shouldn't need the journal, correct? Can we make a filesystem without a journal?
,
Dec 12 2017
Also -- command line to not include a journal would be this: mkfs.ext4 -O ^has_journal $DEVICE
,
Dec 12 2017
yes, it is read-only. let me try creating one without journal.
,
Dec 12 2017
i just realized ImageLoaderServer test can only accept component signed with prod key and I wasn't able to generate a prod component on my dev machine. smbarber will upload a prod image for Omaha to create a prod signed component.
,
Dec 13 2017
The new image without journal opts can be loaded successfully on v3.8&3.10. I updated the autotest here: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/825303 Thanks all.
,
Dec 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/191d267ebb129ef2b973465ba31c1ffb0e205897 commit 191d267ebb129ef2b973465ba31c1ffb0e205897 Author: Xiaochu Liu <xiaochu@chromium.org> Date: Thu Dec 14 01:26:08 2017 platform_ImageLoader: update ext4 image New image is built without journal opts and can be loaded on kernel 3.8&3.10 BUG= chromium:781992 TEST=test_that -b ${BOARD} ${IP} platform_ImageLoaderServer Change-Id: Ic5d3b6eb1c0aaa3f3b9ca30e86f98e768638b4f0 Reviewed-on: https://chromium-review.googlesource.com/825303 Commit-Ready: Xiaochu Liu <xiaochu@chromium.org> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Greg Kerr <kerrnel@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@google.com> [modify] https://crrev.com/191d267ebb129ef2b973465ba31c1ffb0e205897/server/site_tests/platform_ImageLoaderServer/platform_ImageLoaderServer.py [modify] https://crrev.com/191d267ebb129ef2b973465ba31c1ffb0e205897/client/site_tests/platform_ImageLoader/platform_ImageLoader.py
,
Dec 14 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by xiaochu@chromium.org
, Nov 27 2017