Skip to content

use conmon for exec#3143

Merged
openshift-merge-robot merged 2 commits into
containers:masterfrom
haircommander:conmon-exec
Jul 22, 2019
Merged

use conmon for exec#3143
openshift-merge-robot merged 2 commits into
containers:masterfrom
haircommander:conmon-exec

Conversation

@haircommander
Copy link
Copy Markdown
Collaborator

@haircommander haircommander commented May 16, 2019

This is a starter PR. Do not merge, it is not complete at all.
depends on: cri-o/cri-o#2377

The point of pushing here is mostly to get feedback on the design. there is still more work to do:

  • --user and --workdir don't currently work and I'm not sure why
  • a small tty bug
  • all the TODO FIXMES

The following items could be added in follow up PRs:

  • currently, exec sessions create an attach socket similarly to how creates create one, but with sessionID instead of containerID. Right now, there's no global tracking of sessionID, so there exists the opportunity (1/2^128) of there being a duplicate. Are we comfortable with this?
  • I'd like to query the version of conmon in the runtime to make sure we won't crash in a confusing manner. I need to figure out the best way to require this while also prohibiting the conmon versions built from the CRI-O repo that are tagged as 1.9 - 1.14
  • add exit codes to the define package
  • actually implement remote exec

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 16, 2019
@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 16, 2019
@haircommander
Copy link
Copy Markdown
Collaborator Author

@mheon @baude @jwhonce PTAL

@haircommander haircommander force-pushed the conmon-exec branch 3 times, most recently from b345fa2 to 5b1f1a7 Compare May 17, 2019 14:51
Comment thread libpod/container_internal.go Outdated
Comment thread libpod/oci_internal_linux.go Outdated
Comment thread libpod/oci_internal_linux.go Outdated
@rh-atomic-bot
Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #2844) made this pull request unmergeable. Please resolve the merge conflicts.

@haircommander haircommander force-pushed the conmon-exec branch 6 times, most recently from a6d124e to 9d5bc14 Compare May 17, 2019 22:41
@rh-atomic-bot
Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #3162) made this pull request unmergeable. Please resolve the merge conflicts.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 23, 2019
@haircommander haircommander force-pushed the conmon-exec branch 6 times, most recently from ab50020 to 15c83ab Compare May 25, 2019 02:10
@haircommander haircommander force-pushed the conmon-exec branch 3 times, most recently from 9ceab1b to adee9d8 Compare May 28, 2019 14:49
@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Jul 17, 2019

@haircommander Needs a rebase. I think @mheon wants to get this in...

@haircommander
Copy link
Copy Markdown
Collaborator Author

@rhatdan I rebased, but given Cirrus now builds from packages as opposed to github commits, I'm waiting on conmon v1.0.0 to get into fedora and ubuntu. @lsm5 and I are working on this.

@mheon
Copy link
Copy Markdown
Member

mheon commented Jul 17, 2019

@haircommander I'm good to merge once you're ready, so just say when.

@rh-atomic-bot
Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #3522) made this pull request unmergeable. Please resolve the merge conflicts.

@rh-atomic-bot
Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #3595) made this pull request unmergeable. Please resolve the merge conflicts.

@haircommander
Copy link
Copy Markdown
Collaborator Author

hey @mheon, the conmonPidFile for exec sessions now lives in the exec bundle path, as such, a deferred cleanup of it happens after it's created, and we shouldn't have the problem #3595 solves. can you look at the changes and verify I'm correct in thinking so?

@mheon
Copy link
Copy Markdown
Member

mheon commented Jul 18, 2019

I think we're set. We still (potentially) leak if you hit Podman itself with a SIGTERM or similar during the exec, so we don't hit the defer, but otherwise it seems fine.

@rh-atomic-bot
Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #3443) made this pull request unmergeable. Please resolve the merge conflicts.

@rh-atomic-bot
Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #3562) made this pull request unmergeable. Please resolve the merge conflicts.

@haircommander
Copy link
Copy Markdown
Collaborator Author

@mheon @TomSweeneyRedHat @QiWang19 @vrothberg @baude @rhatdan Here's an update:
We are passing all the tests this PR will pass. It will need to be force merged, as the in_podman images aren't updated until an hour or so after PRs are merged, and this PR needs to be merged for that to happen. that may mean the tests will be annoyed for a bit after merging this, so be wary of timing (cc: @cevich)

This PR is as ready as it will be, PTAL

@haircommander
Copy link
Copy Markdown
Collaborator Author

update, I actually just thought of a way to get this to pass organically, so hold on the manual merge

@haircommander
Copy link
Copy Markdown
Collaborator Author

update, i think I have a way to make in_podman green naturally. hold the force merge

Copy link
Copy Markdown
Member

@cevich cevich left a comment

Choose a reason for hiding this comment

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

All the CI changes LGTM, just one goof but it's my fault and won't affect anything.

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI- this is my bad...these aren't used anywhere. I've got a commit floating on a PR somewhere that just clobbers them all.

Comment thread pkg/varlinkapi/containers.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we have Jira cards or issues for these?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the entirety of remote exec is a big TODO, I can make a jira card

@TomSweeneyRedHat
Copy link
Copy Markdown
Member

Changes LGTM, but what head nods from @mheon and @vrothberg too, especially if you can't get the tests to green.

Personally, I think once merged, this should sit in upstream for a few weeks before we make a new kit with it and that kit should bump the version from 1.4 to 1.5 or 1.5 to 1.6.

This includes:
	Implement exec -i and fix some typos in description of -i docs
	pass failed runtime status to caller
	Add resize handling for a terminal connection
	Customize exec systemd-cgroup slice
	fix healthcheck
	fix top
	add --detach-keys
	Implement podman-remote exec (jhonce)
	* Cleanup some orphaned code (jhonce)
	adapt remote exec for conmon exec (pehunt)
	Fix healthcheck and exec to match docs
		Introduce two new OCIRuntime errors to more comprehensively describe situations in which the runtime can error
		Use these different errors in branching for exit code in healthcheck and exec
	Set conmon to use new api version

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
@mheon
Copy link
Copy Markdown
Member

mheon commented Jul 22, 2019

/lgtm

@mheon
Copy link
Copy Markdown
Member

mheon commented Jul 22, 2019

/approve

@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cevich, haircommander, mheon

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

The pull request process is described here

Details 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

@haircommander
Copy link
Copy Markdown
Collaborator Author

/hold cancel

@mheon
Copy link
Copy Markdown
Member

mheon commented Jul 23, 2019

Thanks for sticking with this one through the endless rebases, @haircommander - it's finally merged.

@debarshiray
Copy link
Copy Markdown
Member

This also fixed #3179

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.