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

Adding run-remotely.sh script #441

Conversation

alexanderConstantinescu
Copy link
Contributor

This PR introduces a run-remotely.sh script which allows us to run the CNO against a remotely running cluster. It's based off of run-locally.sh and takes only a kubeconfig argument. It strips off some of the logic surrounding manifests, install-config, etc that the run-locally.sh script has.

I am not familiar with the reasons behind having the PLUGIN_IMAGE variable. But I kept it, in case someone was using it to modify the env.sh using that mechanism.

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 8, 2020
@danwinship
Copy link
Contributor

This PR introduces a run-remotely.sh script which allows us to run the CNO against a remotely running cluster.

That's what run-locally.sh is for... (The CNO binary is local, but the cluster is remote.) Rather than having a separate script, it would make more sense to just modify run-locally's "attach" mode to be able to work with a kubeconfig directly rather than only a cluster dir.

@dcbw
Copy link
Member

dcbw commented Jan 8, 2020

FWIW, PLUGIN_IMAGE is for if you have a custom ovnkube or SDN docker image that you want to run in the cluster to test changes. It's less useful now that we have infrastructure for running CI with ovnkube (which we didn't have at the time). But perhaps still useful.

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 9, 2020
@alexanderConstantinescu
Copy link
Contributor Author

/test e2e-gcp-upgrade

@alexanderConstantinescu
Copy link
Contributor Author

/test e2e-gcp

1 similar comment
@alexanderConstantinescu
Copy link
Contributor Author

/test e2e-gcp

@alexanderConstantinescu
Copy link
Contributor Author

/test e2e-gcp

flake, flake, flake....man, what is it snowing?!

@alexanderConstantinescu
Copy link
Contributor Author

/test e2e-gcp

@alexanderConstantinescu
Copy link
Contributor Author

/assign @danwinship

hack/run-locally.sh Show resolved Hide resolved
hack/run-locally.sh Outdated Show resolved Hide resolved
hack/run-locally.sh Outdated Show resolved Hide resolved
hack/run-locally.sh Outdated Show resolved Hide resolved
@@ -239,7 +254,13 @@ echo "rebuilding the CNO"
hack/build-go.sh

# Autodetect the state of the cluster to determine which mode to run in
if [[ -z "$(ls -A ${CLUSTER_DIR} 2> /dev/null | grep -v install-config.yaml | grep -v .openshift_install | grep -v env.sh)" ]]; then
if [[ ! -z "${KUBECONFIG}" ]]; then
export CLUSTER_DIR=$PWD
Copy link
Contributor

Choose a reason for hiding this comment

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

hm... what does this end up getting used for? Would it be better to use a temporary directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is used for the ${CLUSTER_DIR}/env.sh which contains the image overrides. I could use a temporary directory. Would /tmp/env.sh be fine?

Copy link
Contributor

Choose a reason for hiding this comment

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

Use mktemp -d.
Alternatively, write the environment to ${KUBECONFIG}.cno-env.sh ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Used mktemp -d

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Acutally, I've been re-thinking this. Usually what we want is also to just create a env.sh and modify the image targeted, then re-deploy.

I thus think it would be easier if we just use CLUSTER_DIR=/tmp if we only have a $KUBECONFIG. Then modify the /tmp/env.sh and re-deploy. I think it's easier as such.

@alexanderConstantinescu
Copy link
Contributor Author

/test e2e-gcp-upgrade
/test e2e-gcp

@alexanderConstantinescu
Copy link
Contributor Author

/test e2e-gcp

@alexanderConstantinescu
Copy link
Contributor Author

@danwinship Could you have a final look at this?Thanks in advance!

Copy link
Contributor

@knobunc knobunc left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2020
@knobunc
Copy link
Contributor

knobunc commented Feb 7, 2020

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexanderConstantinescu, knobunc

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 Feb 7, 2020
@alexanderConstantinescu
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@alexanderConstantinescu: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

/bugzilla refresh

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

4 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit d1a1df3 into openshift:master Feb 19, 2020
@openshift-ci-robot
Copy link
Contributor

@alexanderConstantinescu: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-gcp-ovn 05ceffc link /test e2e-gcp-ovn

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants