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

Execute into a pod with API for runtime V1 #596

Merged
merged 6 commits into from Dec 19, 2017

Conversation

shawn-hurley
Copy link
Contributor

Describe what this PR does and why we need it:
moves runtime v1 credential extraction to the remote API
Changes proposed in this pull request

  • update to vendor so that the remote api can be used
  • update ext from pod to use the remote execution

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 14, 2017
@shawn-hurley shawn-hurley added bug needs-review and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 14, 2017
@shawn-hurley
Copy link
Contributor Author

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 99b1f92 on shawn-hurley:remote-execution into ** on openshift:master**.

Copy link
Contributor

@eriknelson eriknelson left a comment

Choose a reason for hiding this comment

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

The deps sound like a nightmare, thanks for sorting through that :)

log.Warning("[%s] Retry attempt %d: Failed to exec into the container", podname, r)
default:
log.Infof("command output: %v - err: %v", stdoutBuffer.String(), stderrBuffer.String())
log.Warningf("retry attempt: %v pod: %v in namespace: %v failed to exec into the container", r, podname, namespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed this got bumped up to a Warning level a while back in the old code with previous iterations of the credential extractions. I don't think this should be of a warning level since the "tried to get credentials but they weren't ready yet" branch of execution is expected to get hit a few times during a normal run of an APB.

If we agree this isn't a warning, probably drop v2 back down to Info as well, either in this PR or a small follow up.

Copy link
Member

@djzager djzager left a comment

Choose a reason for hiding this comment

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

LGTM


const (
// GatherCredentialsCommand - Command used when execing for bind credentials
// moving this constant here because eventuall Extrating creds will
Copy link
Member

Choose a reason for hiding this comment

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

nit: eventually

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for putting the reason for the move here.

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 15, 2017
@shawn-hurley
Copy link
Contributor Author

@djzager @eriknelson I could not find the Warningf log in watch pod, am I missing where the log would be now?

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d217b66 on shawn-hurley:remote-execution into ** on openshift:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d217b66 on shawn-hurley:remote-execution into ** on openshift:master**.

@eriknelson
Copy link
Contributor

@shawn-hurley it's possible it got removed, I just remember it being I think in the old ext_creds or something. Wouldn't worry about it now.

Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

All looks good except the one typo in the comment. Feel free to merge after fixing it.

podFailed := strings.Contains(string(output), "current phase is Failed")
podCompleted := strings.Contains(string(output), "current phase is Succeeded") ||
strings.Contains(string(output), "cannot exec into a container in a completed pod")
// NOTE: kubectl exec simply sets the API path to /api when where is no
Copy link
Contributor

Choose a reason for hiding this comment

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

when where?

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling cebac6c on shawn-hurley:remote-execution into ** on openshift:master**.

@coveralls
Copy link

coveralls commented Dec 15, 2017

Coverage Status

Changes Unknown when pulling e0a0d64 on shawn-hurley:remote-execution into ** on openshift:master**.

@shawn-hurley shawn-hurley merged commit ae8af57 into openshift:master Dec 19, 2017
jianzhangbjz pushed a commit to jianzhangbjz/ansible-service-broker that referenced this pull request May 17, 2018
* first pass rebase out

* Adding vendor dep changes for remotecommand

* adding ability to remote execute with client-go api

* fixing log level for expected log.

* left over fmt instead of log statements

* fixing a comment typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review 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.

None yet

6 participants