Skip to content

Update composite disk mtime when disk spec matches existing - #3142

Merged
Elie-Kh merged 1 commit into
google:mainfrom
Elie-Kh:update_composite_mtime
Sep 10, 2026
Merged

Update composite disk mtime when disk spec matches existing#3142
Elie-Kh merged 1 commit into
google:mainfrom
Elie-Kh:update_composite_mtime

Conversation

@Elie-Kh

@Elie-Kh Elie-Kh commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

When CreateOrUpdateCompositeDisk determines that an existing composite disk already matches the target partition layout, it skips regenerating the disk file. However, if a component partition (such as persistent_vbmeta.img) was regenerated or touched during instance setup, the composite disk's modification time would remain older than that component. This causes subsequent assemble_cvd checks to falsely detect that a component was updated and fail with an mtime mismatch error.

Update the modification time of output_composite_path using utimensat when the existing disk spec is retained, ensuring the composite disk mtime remains up to date.

Bug: 554545294

@Elie-Kh
Elie-Kh force-pushed the update_composite_mtime branch from da7c225 to e1f39e6 Compare September 4, 2026 16:21
@Databean Databean added the kokoro:run Run e2e tests. label Sep 5, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 5, 2026
@Databean
Databean force-pushed the update_composite_mtime branch from e1f39e6 to 4a8ac09 Compare September 8, 2026 21:09

@Databean Databean left a comment

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.

This change is failing on linters

/usr/local/google/home/schuffelen/.cache/bazel/_bazel_schuffelen/e5255ea4f0651a267b9880f9e2ad5869/sandbox/linux-sandbox/801/execroot/_main/cuttlefish/host/libs/image_aggregator/image_aggregator.cc:371:67: error: no header providing "errno" is directly included [misc-include-cleaner,-warnings-as-errors]
   23 |                    << output_composite_path << "\": " << strerror(errno);
      |                                                                   ^

Comment thread base/cvd/cuttlefish/host/libs/image_aggregator/image_aggregator.cc Outdated
@Elie-Kh
Elie-Kh force-pushed the update_composite_mtime branch 3 times, most recently from 5ef4c7e to ddb6a3f Compare September 9, 2026 17:18
@Elie-Kh
Elie-Kh enabled auto-merge September 9, 2026 17:19
When CreateOrUpdateCompositeDisk determines that an existing composite
disk already matches the target partition layout, it skips regenerating
the disk file. However, if a component partition (such as
persistent_vbmeta.img) was regenerated or touched during instance setup,
the composite disk's modification time would remain older than that
component. This causes subsequent assemble_cvd checks to falsely detect
that a component was updated and fail with an mtime mismatch error.

Update the modification time of output_composite_path using utimensat
when the existing disk spec is retained, ensuring the composite disk
mtime remains up to date.

Bug: 554545294
@Elie-Kh
Elie-Kh force-pushed the update_composite_mtime branch from ddb6a3f to 595cc10 Compare September 9, 2026 19:57
@Databean Databean added the kokoro:run Run e2e tests. label Sep 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 9, 2026
@Elie-Kh
Elie-Kh added this pull request to the merge queue Sep 10, 2026
Merged via the queue into google:main with commit 5a065d7 Sep 10, 2026
29 checks passed
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.

3 participants