Skip to content

[ID-Mapped Mount] Impl Channel & Message#3409

Open
YamasouA wants to merge 5 commits intoyouki-dev:mainfrom
YamasouA:ft/id-mapped-mount-channel-message
Open

[ID-Mapped Mount] Impl Channel & Message#3409
YamasouA wants to merge 5 commits intoyouki-dev:mainfrom
YamasouA:ft/id-mapped-mount-channel-message

Conversation

@YamasouA
Copy link
Copy Markdown
Contributor

@YamasouA YamasouA commented Feb 15, 2026

Description

“I implemented ID-mapped mount support based on runc’s approach. In this PR, I extended the channel between Main and Init to allow passing mount FDs, and added unit tests.”

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test updates
  • CI/CD related changes
  • Other (please describe):

Testing

  • Added new unit tests
  • Added new integration tests
  • Ran existing test suite
  • Tested manually (please provide steps)

Related Issues

Fixes #2307

Additional Context

The following PR has too many changes, so it will be split and submitted for review.
#3384

Signed-off-by: YamasouA <akiakiskyhand@gmail.com>
Signed-off-by: Akiyama <akiakiskyhand@gmail.com>
Signed-off-by: Akiyama <akiakiskyhand@gmail.com>
@YamasouA YamasouA marked this pull request as draft February 15, 2026 15:11
UnexpectedMessage {
expected: Message,
received: Message,
expected: Box<Message>,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Boxed to keep ChannelError small and avoid clippy::result_large_err.

Signed-off-by: Akiyama <akiakiskyhand@gmail.com>
@YamasouA YamasouA force-pushed the ft/id-mapped-mount-channel-message branch from 5719013 to 07afe2a Compare February 15, 2026 16:09
@YamasouA
Copy link
Copy Markdown
Contributor Author

/retest

@YamasouA YamasouA marked this pull request as ready for review February 19, 2026 15:10
@YamasouA YamasouA force-pushed the ft/id-mapped-mount-channel-message branch from 20bdaa6 to 07afe2a Compare February 19, 2026 15:12
@utam0k
Copy link
Copy Markdown
Member

utam0k commented Feb 20, 2026

Could you please share the final design plan using a sequence diagram or similar documentation?

@YamasouA
Copy link
Copy Markdown
Contributor Author

@utam0k
I’ve added the sequence diagram and a brief summary to the issue. Please let me know if it covers the information you were looking for.
#2307 (comment)

Copy link
Copy Markdown
Contributor

@nayuta723 nayuta723 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've left a few comments, so please take a look when you have a chance.

pub struct MountMsg {
pub source: String,
pub idmap: Option<MountIdMap>,
pub recursive: bool,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How is this field intended to be used in relation to recursive in MountIdMap?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nayuta723
This is an implementation I initially considered but no longer need.
I will delete it.

@@ -490,6 +569,53 @@ mod tests {
Ok(())
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you add a test for wait_for_mount_fd_request?

Comment on lines +179 to +183
expected: Box::new(Message::MountFdPlease(MountMsg {
source: String::new(),
idmap: None,
recursive: false,
})),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have a couple of questions on UnexpectedMessage:

  • Is the dummy expected value necessary?
    Since we don't have the actual "expected" info here, does this dummy value provide any real benefit for debugging?

  • Can we simplify it?
    Would it be better to just store the received message alone? I'm concerned that dummy values might be confusing for future maintenance.

I know the existing code uses this pattern, but I’d love to make this new part a bit cleaner if possible. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's right.
I'll correct it.

@nayuta723
Copy link
Copy Markdown
Contributor

@YamasouA
The DCO check failed because of a missing sign-off. Could you please amend your commit with the -s flag?

@YamasouA YamasouA force-pushed the ft/id-mapped-mount-channel-message branch from 87a095a to 1cdfcbd Compare April 11, 2026 07:35
@YamasouA
Copy link
Copy Markdown
Contributor Author

@nayuta723
Thanks for the heads-up. I’ve amended the commit with -s and force-pushed the branch.

Signed-off-by: YamasouA <akiakiskyhand@gmail.com>
@YamasouA YamasouA force-pushed the ft/id-mapped-mount-channel-message branch from 1cdfcbd to 8be375d Compare April 12, 2026 13:05
Copy link
Copy Markdown
Contributor

@nayuta723 nayuta723 left a comment

Choose a reason for hiding this comment

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

I've left a few comments, so please take a look when you have a chance.

UnexpectedMessage {
expected: Message,
received: Message,
expected: Option<Box<Message>>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How about this approach? I want to avoid Option as it leaves the meaning of None unclear.

Suggested change
expected: Option<Box<Message>>,
expected: &'static str,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support idmapped mount

3 participants