-
Notifications
You must be signed in to change notification settings - Fork 275
CWCOW: Unmount CIM volume #2588
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Mahati Chamarthy <[email protected]>
|
I have tested this on nord1 and it works at least as well as before with the simple attestation report web server nanoserver based container. |
| BlockPath: physicalDevPath, | ||
| CimName: blockCimDevice.CimName, | ||
|
|
||
| // skip the merged cim and verify individual layer hashes |
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.
Do we have a written explanation anywhere of why we don't need to check the merged CIM root hash? I think it needs to be explained here.
| log.G(ctx).Tracef("WCOWBlockCIMMounts Add { %v}", wcowBlockCimMounts) | ||
|
|
||
| // The block device takes some time to show up. Wait for a few seconds. | ||
| time.Sleep(2 * time.Second) |
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.
As discussed (but not for today) this can't be a sleep before check but needs to be more like the LCOW scheme where it only sleeps if it fails. See
hcsshim/internal/guest/storage/scsi/scsi.go
Line 205 in cbc0126
| // todo (maksiman): add better retry logic, similar to how SCSI device mounts are |
| return fmt.Errorf("failed to get CIM verification info: %w", err) | ||
| } | ||
| layerDigests[i] = cimRootDigestBytes | ||
| layerHashes[i] = base64.URLEncoding.EncodeToString(cimRootDigestBytes) |
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.
As discussed (also not for today), the layer hash strings ought to be hex encoded as per the linux ones.
ResourceCloserlist as it is already unmounted previously i.e.lc.scratchMount.Release(ctx);