-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Bug fix for auto-resizer 1.8.1 not reading command arguments #559
Bug fix for auto-resizer 1.8.1 not reading command arguments #559
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
…n empty values from function, because FillInDefaults_ will not set any values from defaultConfig because configMapConfig has empty string values
5523b7d
to
2178c50
Compare
@@ -163,6 +163,7 @@ func loadNannyConfiguration(configDir string, defaultConfig *nannyconfigalpha.Na | |||
} else if configMapConfig, err = decodeNannyConfiguration(data, scheme, codecs); err != nil { | |||
glog.V(0).Infof("Unable to decode Nanny Configuration from config map, using default parameters") | |||
} | |||
nannyconfigalpha.SetDefaults_NannyConfiguration(configMapConfig) | |||
glog.Infof("%s", configMapConfig.BaseCPU) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete this line, it doesn't look helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 167?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
@@ -163,6 +163,7 @@ func loadNannyConfiguration(configDir string, defaultConfig *nannyconfigalpha.Na | |||
} else if configMapConfig, err = decodeNannyConfiguration(data, scheme, codecs); err != nil { | |||
glog.V(0).Infof("Unable to decode Nanny Configuration from config map, using default parameters") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to set:
configMapConfig = &nannyconfigalpha.NannyConfiguration{}
Otherwise configMapConfig will be nil and line 166 will fail.
… returns nil object if err != nil.
/lgtm |
I'm seeing the same issue, even in 1.8.1 prometheus-operator/prometheus-operator#997 I didn't notice that this is not included in 1.8.1 but is a fix for that version. When is the new version going to be deployed? |
Cpu and memory arguments from command line are not read at all, leaving them empty.
nannyConfigurationFromFlags
sets default values to argument values. InloadNannyConfiguration
it attempts to read from config, but if config is not set it just creates an emptyconfigMapConfig
. Since this is empty callingnannyconfigalpha.FillInDefaults_NannyConfiguration
doesn't actually do anything as it compares the values against default values, so when all values are empty this does nothing. In the end function just returns empty values for everything and never uses command line arguments.Starting container in acs-engine leads to these errors now: