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

Add timeout param for create machine #865

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

jichenjc
Copy link
Contributor

Add timeout for create machine param, so that we won't have a
fixed time for timeout, user can give param on timeout

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 31, 2019
@jichenjc jichenjc force-pushed the add_time_out_param branch 3 times, most recently from 0977b70 to f439625 Compare April 1, 2019 07:09
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 1, 2019
@gyliu513
Copy link
Contributor

gyliu513 commented Apr 1, 2019

@jichenjc can you please update your commit message by adding following:

Fixes #860

This can make sure your PR can be linked to #860 and the issue will be automatically closed once the PR got merged.

@jichenjc jichenjc force-pushed the add_time_out_param branch from f439625 to 78cb1d1 Compare April 1, 2019 09:07
@@ -968,7 +972,17 @@ func waitForClusterResourceReady(cs clientset.Interface) error {
}

func waitForMachineReady(cs clientset.Interface, machine *clusterv1.Machine) error {
err := util.PollImmediate(retryIntervalResourceReady, timeoutMachineReady, func() (bool, error) {
timeout := timeoutMachineReady
Copy link
Contributor

Choose a reason for hiding this comment

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

After second think, not sure if we can enhance the clusterctl create by adding a new flag to specify the timeoutMachineReady?

Let's get some comments from @vincepri @detiber .

Copy link
Member

Choose a reason for hiding this comment

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

In general, I would definitely prefer a flag to using environment variables, but if we extend this to other timeout values as well, then I would worry about how many flags would be needed to support the individual timeouts.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @detiber OK, let's stick on the environment variable.

@jichenjc
Copy link
Contributor Author

jichenjc commented Apr 3, 2019

I actually tried, it need to be transferred from several layers and this env is more convenient.. I agree if would be better if a flag is given but this means we may a lot of flags (see there are several timeout settings)

@gyliu513
Copy link
Contributor

gyliu513 commented Apr 3, 2019

/cc @vincepri @detiber

@k8s-ci-robot k8s-ci-robot requested a review from detiber April 3, 2019 03:22
Copy link
Member

@detiber detiber left a comment

Choose a reason for hiding this comment

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

minor nits around some of the documentation, otherwise lgtm.

cmd/clusterctl/README.md Outdated Show resolved Hide resolved
cmd/clusterctl/README.md Outdated Show resolved Hide resolved
@@ -968,7 +972,17 @@ func waitForClusterResourceReady(cs clientset.Interface) error {
}

func waitForMachineReady(cs clientset.Interface, machine *clusterv1.Machine) error {
err := util.PollImmediate(retryIntervalResourceReady, timeoutMachineReady, func() (bool, error) {
timeout := timeoutMachineReady
Copy link
Member

Choose a reason for hiding this comment

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

In general, I would definitely prefer a flag to using environment variables, but if we extend this to other timeout values as well, then I would worry about how many flags would be needed to support the individual timeouts.

@jichenjc jichenjc force-pushed the add_time_out_param branch from 78cb1d1 to 8a9faa7 Compare April 9, 2019 06:35
add an environment to make timeout configurable
for timeoutMachineReady
@jichenjc jichenjc force-pushed the add_time_out_param branch from 8a9faa7 to 6383e3f Compare April 9, 2019 08:45
@gyliu513
Copy link
Contributor

gyliu513 commented Apr 9, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 9, 2019
@bradtopol
Copy link

/lgtm Great job!

@detiber
Copy link
Member

detiber commented Apr 9, 2019

/assign @vincepri

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc, vincepri

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2019
@k8s-ci-robot k8s-ci-robot merged commit 3534230 into kubernetes-sigs:master Apr 9, 2019
detiber pushed a commit to detiber/cluster-api that referenced this pull request May 2, 2019
add an environment to make timeout configurable
for timeoutMachineReady
k8s-ci-robot pushed a commit that referenced this pull request May 2, 2019
* Update CRDs (#863)

Generated with `make generate`

* fix various shell bugs (#868)

* fix errors in scripts/ci-build.gitsh

* fix errors in scripts/ci-integration.sh

* fix errors in scripts/ci-is-vendor-in-sync.sh

* fix errors in scripts/ci-make.sh

* fix errors in scripts/ci-test.sh

* removed unused variables from scripts/fetch_ext_bins.sh

* fix errors in hack/update-bazel.sh

* fix errors in hack/verify_clientset.sh

* use gnu sed on all platforms (#867)

* Fix error message in getCluster (#871)

Previously it was showing 'Machine foo in namespace "cluster.k8s.io/cluster-name" doesn't specify "k8s-machine-api"  label, assuming nil cluster'

* minikube: use --profile instead of --p (#875)

It was reported that "minikube start" fails:
  minikube start --bootstrapper=kubeadm --p=clusterapi
  Error: unknown flag: --p

From "minikube start --help":
  -p, --profile string

Use --profile in minikube.go as --p does not work.
The alternative is -p.

* nit: fix log to replace Creating with Preparing (#872)

saw this log with following flag
--bootstrap-cluster-kubeconfig /root/.kube/config

I0403 17:32:28.339021   31615 createbootstrapcluster.go:27] Creating bootstrap cluster

actually we are reusing ,not creating

* Record machine sync error event (#880)

* make clusterapi wait timeout configurable (#865)

add an environment to make timeout configurable
for timeoutMachineReady

* Update klog to 0.3.0 release (#890)

Signed-off-by: Vince Prignano <[email protected]>

* Add missing namespace to Get function (#896)

* Add NodeName to Machine's additionalPrinterColumns (#895)

Because it is useful to cross-reference between Machines and Nodes.

Set priority to >0 so that node names will only be displayed in `-o wide` because the names are often quite long.

* additionalPrinterColumns for Machine, added correctly. (#897)

Co-authored-by: Danny Berger <[email protected]>

* Normalize clusterctl options to underscores (#899)

Matches current conventions and implementation of kubectl.
This change does not include warning messages when using the previous,
underscore option names, but it does recognize those names.

Co-authored-by: Leah Hanson <[email protected]>

* Update manager-role ClusterRole (#901)

* Update Go 1.12 (#898)

* Update Go 1.12

Signed-off-by: Vince Prignano <[email protected]>

* update

Signed-off-by: Vince Prignano <[email protected]>

* Update OWNERS_ALIASES and SECURITY_CONTACTS (#884)

* Update OWNERS_ALIASES and SECURITY_CONTACTS

* Add davidewatson to cluster-api-admins

* Clarify log message for machine-controller isDeleteAllowed (#905)

Users have noted that this log message is confusing and
does not lead to a clear path forward when deleting this
machine.

This commit makes it clear that the machine will not be
deleted.

* Clarify MachineDeployment watchers' comments (#887)

Signed-off-by: Vince Prignano <[email protected]>

* Simplify util.ParseMachinesYaml (#909)

Signed-off-by: Vince Prignano <[email protected]>

* Add support for passing namespace cmdline flag to the manager (#914)

* Bump kubectl version to v1.13.2 in ci (#923)

kubectl v1.10.2 does not compatible with cluster v1.14.x anymore

Signed-off-by: Hui Luo <[email protected]>

* Add /status to MachineSet and MachineDeployment kubebuilder directives (#922)

Signed-off-by: Vince Prignano <[email protected]>
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants