-
Notifications
You must be signed in to change notification settings - Fork 346
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
organize the process around the namespace in init #371
Conversation
Codecov Report
@@ Coverage Diff @@
## main #371 +/- ##
==========================================
+ Coverage 73.15% 73.17% +0.02%
==========================================
Files 48 48
Lines 7721 7717 -4
==========================================
- Hits 5648 5647 -1
+ Misses 2073 2070 -3 |
// namespace. We also have to enter into mount namespace last since | ||
// namespace may be bind to /proc path. The /proc path will need to be | ||
// accessed before pivot_root. | ||
fn apply_rest_namespaces( |
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.
I am not sure if we should refactor this into a separate function. The namespaces logic is already isolated to namespaces.apply_namespaces call. The rest bits will give us the flexibility to control the order of these operations, which sometimes can be important.
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.
That's true. I am going to add a test by isolating it to a function. Do you have any good names or ways to separate them?
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.
I think there are already tests for namespaces.apply_namespaces
. If not, that's where we should write the test related to entering into namespaces.
Or if you want to test the host name change part together with this, then we can use the current change. If we need to move things around later, then let's worry about it later.
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.
Let's do this now and worry about the potential change when we get there.
No description provided.