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

kubernetes-anywhere: make sure GCP project is allocated #9897

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Oct 23, 2018

With moving k-a to "--provider=local", the kubetest
function prepareGcp() is never called. Fix that by
handling "local" in prepare().

previous PR:
ref #9884
failing test:
ref kubernetes/kubernetes#70058

/area kubetest
/kind bug
/assign @BenTheElder @timothysc
cc @jberkus

@k8s-ci-robot k8s-ci-robot added area/kubetest kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 23, 2018
@neolit123
Copy link
Member Author

/priority critical-urgent

@k8s-ci-robot k8s-ci-robot added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Oct 23, 2018
@BenTheElder
Copy link
Member

/assign @krzyzacy

kubetest/main.go Outdated
if err := prepareGcp(o); err != nil {
return err
}
case "aws":
if err := prepareAws(o); err != nil {
return err
}
// kubernetes-anywhere jobs are treated as --provider=local
case "local":
Copy link
Member

Choose a reason for hiding this comment

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

this feels a bit odd but I'm not sure if we have a better option currently

Copy link
Member Author

Choose a reason for hiding this comment

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

i agree. ideas are welcome, of course.

Copy link
Member

Choose a reason for hiding this comment

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

I feel this is odd that provider local will need to set up gcp :-/ why provider is not kubernetes-anywhere here?

Copy link
Member

Choose a reason for hiding this comment

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

it only does if the deployer is set though.

It needs to because the tests do not support arbitrary providers 😬

Copy link
Member

Choose a reason for hiding this comment

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

alternatively the test code should select a no-op provider when it does not know the provider flag value? this would be closer to previous behavior..

Copy link
Member

Choose a reason for hiding this comment

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

The problem with that approach is that genuine typos (like --provider=gec instead of --provider=gce) then do not get detected.

before they created a warning in the logs.

Can't you use skeleton?

Well yes, the problem is other things are aware of which provider you're using... eg the log dump script in k/k's cluster/ dir. Here it's using """local""" but needs to also act like GCP because it's doing kubernetes-anywhere on GCE but not necessarily using the GCE provider.

Copy link
Member Author

Choose a reason for hiding this comment

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

^ @krzyzacy what do you think about calling prepareGcp() in getDeployer() for the k-a case?

Copy link
Member Author

Choose a reason for hiding this comment

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

let me just update this PR.
(might hide the above conversation).

Copy link
Member

Choose a reason for hiding this comment

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

if all k-a jobs are going to use local provider... why not just add something outside of the provider switch?

        if o.deployment == "kubernetes-anywhere" {
			if err := prepareGcp(o); err != nil {
				return err
			}
		}

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, makes sense. will update in a minute.

@neolit123
Copy link
Member Author

/hold
we might be going the route where we use null provider for unknown providers in the e2e-fw
this would mean we need to revert this patch:
https://github.com/kubernetes/test-infra/pull/9884/files

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 23, 2018
With moving k-a to "--provider=local", the kubetest
function prepareGcp() is never called. Fix that by
calling it in the case of a k-a deployer.
@neolit123
Copy link
Member Author

@krzyzacy @BenTheElder
updated.

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 23, 2018
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6c6514745a2721ebf1911ad66cbc09e250786429

Copy link
Member

@krzyzacy krzyzacy left a comment

Choose a reason for hiding this comment

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

/lgtm

@krzyzacy
Copy link
Member

/this-is-fine

@k8s-ci-robot
Copy link
Contributor

@krzyzacy: dog image

In response to this:

/this-is-fine

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.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 23, 2018
@BenTheElder
Copy link
Member

/hold

@timothysc
Copy link
Member

/approve

@BenTheElder - what's the hold for?

@neolit123
Copy link
Member Author

@timothysc

what's the hold for?

kubernetes/kubernetes#70141 (comment)

@BenTheElder
Copy link
Member

Yep, hold is for that. If we unhold this we also need to bump kubetest

@neolit123
Copy link
Member Author

neolit123 commented Oct 23, 2018

things are P0 at this point.
we are getting reports from old-release branch managers as we have a kubeadm-gce-xx release blocking for older releases too.

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, krzyzacy, neolit123, timothysc

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:
  • OWNERS [BenTheElder,krzyzacy]

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

@neolit123
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 24, 2018
@BenTheElder
Copy link
Member

[discussed at kubeadm office hours, going forward with this]

@k8s-ci-robot k8s-ci-robot merged commit f657468 into kubernetes:master Oct 24, 2018
@neolit123
Copy link
Member Author

@BenTheElder @krzyzacy thanks for the help!
i guess we will have to update kubetest.

@BenTheElder
Copy link
Member

... actually getting to that bump now, apologies.

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. area/kubetest cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants