Skip to content
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

WIP: Add support for pinned sb implementation #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrunalp
Copy link
Contributor

@mrunalp mrunalp commented Oct 11, 2020

Signed-off-by: Mrunal Patel mrunalp@gmail.com

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add support for pinned namespace

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
@openshift-ci-robot openshift-ci-robot added release-note do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Oct 11, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrunalp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2020

impl Pod for PinnedSandbox {}
impl PinnedSandbox {
pub fn new(pinner: &str) -> Result<PinnedSandbox> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@saschagrunert We want to be able to setup a PinnedSandbox::new and then use it in the Sandbox but that doesn't work so we may need to use trait objects.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, yes it might be the better approach to use trait objects here. 👍

Comment on lines +34 to +38
let mut args = Vec::new();
args.push("-d");
args.push(&self.namespaces_dir);
args.push("-f");
args.push(&sd.id);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let mut args = Vec::new();
args.push("-d");
args.push(&self.namespaces_dir);
args.push("-f");
args.push(&sd.id);
let mut args = vec!["-d", &self.namespaces_dir, "-f", &sd.id];

if linux_namespaces.contains(LinuxNamespaces::UTS) {
args.push("-u");
}
let output = Command::new(&self.pinner_path).args(&args[..]).output().await?;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let output = Command::new(&self.pinner_path).args(&args[..]).output().await?;
let output = Command::new(&self.pinner_path).args(args).output().await?;

@openshift-ci-robot
Copy link

@mrunalp: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants