Skip to content

munet: Configurable environment variables within Linux Namespace nodes #51

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liambrady
Copy link
Contributor

@liambrady liambrady commented Apr 18, 2025

Previously, configured env variables would not appear within Linux namespace nodes. This commit adds support for such a capability through the env config. e.g:

topology:
  nodes:
    - name: r1
      env:
        - name: foo
          value: bar

sets the appropriate env variable in both all run commands and in opened windows.

Closes #22

@liambrady liambrady requested a review from choppsv1 April 18, 2025 14:09
@liambrady liambrady changed the title Configurable environment variables within Linux Namespace nodes munet: Configurable environment variables within Linux Namespace nodes Apr 18, 2025
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

Attention: Patch coverage is 26.66667% with 22 lines in your changes missing coverage. Please review.

Project coverage is 58.66%. Comparing base (2d75685) to head (3ba9bc3).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
munet/native.py 38.09% 13 Missing ⚠️
munet/base.py 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   58.83%   58.66%   -0.18%     
==========================================
  Files          19       19              
  Lines        5728     5755      +27     
==========================================
+ Hits         3370     3376       +6     
- Misses       2358     2379      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Previously, configured env variables would not appear
within Linux namespace nodes. This commit adds support
for such a capability through the `env` config. e.g:

```
topology:
  nodes:
    - name: r1
      env:
        - name: foo
          value: bar
```

sets the appropriate env variable in both all run
commands and in opened windows.

Fixes LabNConsulting#22

Signed-off-by: Liam Brady <[email protected]>
Adds a few mutests that check to confirm that
env variables are being properly set within
Linux Namespace nodes.

Signed-off-by: Liam Brady <[email protected]>
@liambrady liambrady force-pushed the liambrady/env_namespace branch from 8cb1d4b to 3ba9bc3 Compare April 28, 2025 12:50
@liambrady liambrady marked this pull request as draft June 25, 2025 18:03
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.

Environment variables not configured in Linux namespaces
1 participant