Skip to content

Conversation

@anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Apr 22, 2021

this builds on top of the dm-verity footer feature that
has been previously added. changes to opengcs have already been
made where the verity info (root hash, merkle tree etc) is expected
to be appended to the ext4 data and this change enables passing
in the actual verity information.

If dm-verity footer read fails, fallback to the original behavior as
if the footer wasn't present at all.

NOTE: Integration tests will be added in a separate PR, since there's a dependency on CRI/containerd

@anmaxvl anmaxvl force-pushed the read-vhd-verity-footer branch from b8852cf to 8c2754d Compare April 29, 2021 09:43
@anmaxvl anmaxvl force-pushed the read-vhd-verity-footer branch from 8c2754d to f16bb86 Compare May 25, 2021 21:12
@dcantah
Copy link
Contributor

dcantah commented Jun 15, 2021

Anything new here?

@anmaxvl anmaxvl force-pushed the read-vhd-verity-footer branch from f16bb86 to 020f812 Compare June 21, 2021 05:50
@anmaxvl anmaxvl marked this pull request as ready for review June 23, 2021 16:51
@anmaxvl anmaxvl requested a review from a team as a code owner June 23, 2021 16:51
@anmaxvl anmaxvl force-pushed the read-vhd-verity-footer branch from 020f812 to bc7251a Compare June 23, 2021 20:17
MountPath: uvmPath,
}
if v, iErr := readVeritySuperBlock(ctx, hostPath); iErr != nil {
log.G(ctx).WithError(err).WithField("hostPath", hostPath).Debug("unable to read dm-verity information from VHD")

Choose a reason for hiding this comment

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

this doesn't error out the call though right, so we'd still make a guest request? I thought the only time we wanted to silently continue was when we get a ErrSuperBlockReadFailure error

Copy link
Contributor Author

@anmaxvl anmaxvl Jun 23, 2021

Choose a reason for hiding this comment

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

skipping the error here ensures we always have a fallback to the original behavior. whether it's the way to go about is debatable of course. what do you think?

Choose a reason for hiding this comment

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

so the idea is that if we fail to read the verity block then we just mount it as a normal vpmem device? But verity wouldn't be setup properly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, that's correct. we could also introduce something that will tell us to always enforce it, for example or vice-versa (i.e. ignore failure)

Choose a reason for hiding this comment

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

I see, so we always try to use dm-verity if possible. I think that might be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup

@katiewasnothere
Copy link

do we only want this for the default VPMem support?

@anmaxvl
Copy link
Contributor Author

anmaxvl commented Jun 23, 2021

do we only want this for the default VPMem support?

for now yes, I'll need to validate the other path, since we just merged it today 😄

@dcantah
Copy link
Contributor

dcantah commented Jun 23, 2021

Can you add the commit msg in the pr description?

this builds on top of the dm-verity footer feature that
has been previously added. changes to opengcs have already been
made where the verity info (root hash, merkle tree etc) is expected
to be appended to the ext4 data and this change enables passing
in the actual verity information.

If dm-verity footer read fails, fallback to the original behavior as
if the footer wasn't present at all.

Signed-off-by: Maksim An <[email protected]>
@anmaxvl anmaxvl force-pushed the read-vhd-verity-footer branch from bc7251a to 9dc13eb Compare June 23, 2021 22:43
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