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

cmd: Fix the flag error caused by pflag #277

Merged
merged 2 commits into from
Jan 10, 2018
Merged

cmd: Fix the flag error caused by pflag #277

merged 2 commits into from
Jan 10, 2018

Conversation

gaocegege
Copy link
Member

@gaocegege gaocegege commented Jan 10, 2018

Close #275

Signed-off-by: Ce Gao [email protected]


This change is Reviewable

Signed-off-by: Ce Gao <[email protected]>
@k8s-ci-robot
Copy link

Hi @gaocegege. Thanks for your PR.

I'm waiting for a kubernetes or tensorflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

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.

@coveralls
Copy link

coveralls commented Jan 10, 2018

Coverage Status

Coverage increased (+0.1%) to 30.551% when pulling 3c6d909 on gaocegege:log into 9c93d5f on tensorflow:master.

@coveralls
Copy link

coveralls commented Jan 10, 2018

Coverage Status

Coverage remained the same at 30.446% when pulling 3c6d909 on gaocegege:log into 9c93d5f on tensorflow:master.

@zjj2wry
Copy link
Member

zjj2wry commented Jan 10, 2018

/ok-to-test

@zjj2wry
Copy link
Member

zjj2wry commented Jan 10, 2018

this changed lgtm, can you paste some log when use ./tf_operator --help.

@gaocegege
Copy link
Member Author

gaocegege commented Jan 10, 2018

Of course

Usage of ./kubeflow-controller:
  -alsologtostderr
    	log to standard error as well as files
  -chaos-level int
    	DO NOT USE IN PRODUCTION - level of chaos injected into the TfJob created by the operator. (default -1)
  -controller_config_file string
    	Path to file containing the controller config.
  -gc-interval duration
    	GC interval (default 10m0s)
  -log_backtrace_at value
    	when logging hits line file:N, emit a stack trace
  -log_dir string
    	If non-empty, write log files in this directory
  -logtostderr
    	log to standard error instead of files
  -stderrthreshold value
    	logs at or above this threshold go to stderr
  -v value
    	log level for V logs
  -version
    	Show version and quit
  -vmodule value
    	comma-separated list of pattern=N settings for file-filtered logging

And if we want to print the logs in stderr, we need to add -logtostderr:

I0110 17:44:37.041618   30686 server.go:60] tf_operator Version: 0.3.0+git
I0110 17:44:37.041719   30686 server.go:61] Git SHA: Not provided.
I0110 17:44:37.041724   30686 server.go:62] Go Version: go1.8.3
I0110 17:44:37.041726   30686 server.go:63] Go OS/Arch: linux/amd64
I0110 17:44:37.044308   30686 server.go:149] No controller_config_file provided; using empty config.
I0110 17:44:37.044330   30686 controller.go:78] Setting up event handlers
CustomResourceDefinition.apiextensions.k8s.io "tfjobs.tensorflow.org" is invalid: spec.names.singular: Invalid value: "TfJob": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')

@gaocegege
Copy link
Member Author

PTAL

@zjj2wry
Copy link
Member

zjj2wry commented Jan 10, 2018

/lgtm yes, i think we should set --logtostderr=true default.

Copy link
Member

@zjj2wry zjj2wry left a comment

Choose a reason for hiding this comment

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

lgtm

@jlewi jlewi merged commit e701fc5 into kubeflow:master Jan 10, 2018
@gaocegege gaocegege deleted the log branch January 10, 2018 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants