You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--write-config has invalid ingress IP when run in cloud provider #10595
error: Invalid MasterConfig openshift.local.config/master/master-config.yaml
networkConfig.ingressIPNetworkCIDR[0]: Invalid value: "172.46.0.0/16": should not be provided when a cloud-provider is enabled
A new VM in GCE w/ Origin HEAD and openshift start --write-config="openshift.local.config" produces the error above with the basic start command (sudo -E _output/local/bin/linux/amd64/openshift start --master-config=... --node-config=...)
The default range was introduced in #10500, and will not be applied if --cloud-provider is supplied. If --cloud-provider is not specified, and the provider is set subsequently, then the ingress range would have to be manually cleared (as per the error message you're seeing).
How are you setting the cloud provider? Does openshift start set it automatically or are you editing the configuration post-creation?
I don't think it's possible to set the cloud provider at config generation time.
@smarterclayton Would it make sense to skip validation of ingress range and not start the controller when a cloud provider is configured? That seems preferable to having to document the need to clear the range when enabling a cloud provider.
This seems like WAD. Complex configs that don't validate and explain to
you what is going on aren't helping you, they're hiding problems. So a)
the error message needs to be able to help you solve the problem (did it?),
b) the fix should be obvious (how do I disable ingressIPNetworkCIDR - was
that obvious to you, and if not, what should the message say), and c)
automation occasionally will break.
On Tue, Aug 23, 2016 at 4:07 PM, Maru Newby [email protected]
wrote:
I don't think it's possible to set the cloud provider at config generation
time.
To be clear, generating the config and running OpenShift without editing always worked until this latest change. It was an OOTB good experience.
I always had to add cloud provider to the Kube components to make them functional (like accessing the GCE API for provisioning), but the basic Origin server still worked without editing. That is no longer the case.
Generating and running the openshift config without editing still works OOB.
By editing the generated config, you are responsible for making changes that are coherent with the default generated config. That now includes clearing the ingress IP range if you add in a cloud provider.
@smarterclayton What is the problem with not validating a value that can't be used? I get your point in the general case, but ingress as written can only run without a cloud provider. Enabling a cloud provider invalidates any range specified for ingress. Right now the master refuses to start with this error. I think starting and logging a warning should be sufficient.
To the issue of complexity, the fix would be a check on cloud provider being enabled on config validation and when the controller is started. The code configuring the ingress controller already has to know about whether a cloud provider is enabled, so the change would be minimal.
@liggitt As with @smarterclayton, I get your point in the general case. I don't believe your concerns are warranted in all cases though, so I'll agree to disagree.
Activity
markturansky commentedon Aug 23, 2016
Simply replacing the generated IP with "" works, but it means the generated config doesn't work OOTB.
marun commentedon Aug 23, 2016
The default range was introduced in #10500, and will not be applied if
--cloud-provideris supplied. If--cloud-provideris not specified, and the provider is set subsequently, then the ingress range would have to be manually cleared (as per the error message you're seeing).How are you setting the cloud provider? Does
openshift startset it automatically or are you editing the configuration post-creation?markturansky commentedon Aug 23, 2016
I edit various components of master-config to include the cloud provider. Specifically, I edit the Kube API server and controllerArguments bit.
Is there another way to generate config that would automatically set cloud provider and have the generated config work OOTB?
marun commentedon Aug 23, 2016
I don't think it's possible to set the cloud provider at config generation time.
@smarterclayton Would it make sense to skip validation of ingress range and not start the controller when a cloud provider is configured? That seems preferable to having to document the need to clear the range when enabling a cloud provider.
smarterclayton commentedon Aug 23, 2016
This seems like WAD. Complex configs that don't validate and explain to
you what is going on aren't helping you, they're hiding problems. So a)
the error message needs to be able to help you solve the problem (did it?),
b) the fix should be obvious (how do I disable ingressIPNetworkCIDR - was
that obvious to you, and if not, what should the message say), and c)
automation occasionally will break.
On Tue, Aug 23, 2016 at 4:07 PM, Maru Newby [email protected]
wrote:
liggitt commentedon Aug 23, 2016
An old config that set cloud provider and lacked the ingress IP should continue working as is.
If you are modifying a newly generated config that has the ingress ip setting, you'll need to clear it if you want to set the cloud provider.
smarterclayton commentedon Aug 23, 2016
The defaulter should not be defaulting the value if the cloud provider is
already on (I believe that was in the PR).
On Tue, Aug 23, 2016 at 6:12 PM, Jordan Liggitt [email protected]
wrote:
markturansky commentedon Aug 23, 2016
To be clear, generating the config and running OpenShift without editing always worked until this latest change. It was an OOTB good experience.
I always had to add cloud provider to the Kube components to make them functional (like accessing the GCE API for provisioning), but the basic Origin server still worked without editing. That is no longer the case.
liggitt commentedon Aug 23, 2016
Generating and running the openshift config without editing still works OOB.
By editing the generated config, you are responsible for making changes that are coherent with the default generated config. That now includes clearing the ingress IP range if you add in a cloud provider.
markturansky commentedon Aug 24, 2016
@liggitt ok. so this isn't a new bug that was introduced. Thanks for the help! I'll close this issue.
marun commentedon Aug 24, 2016
@smarterclayton What is the problem with not validating a value that can't be used? I get your point in the general case, but ingress as written can only run without a cloud provider. Enabling a cloud provider invalidates any range specified for ingress. Right now the master refuses to start with this error. I think starting and logging a warning should be sufficient.
To the issue of complexity, the fix would be a check on cloud provider being enabled on config validation and when the controller is started. The code configuring the ingress controller already has to know about whether a cloud provider is enabled, so the change would be minimal.
liggitt commentedon Aug 24, 2016
Config that contains invalid values that are ignored because of other values is a ticking time bomb.
Agreed, which is why it is not valid to specify both.
No, that config expresses two user intents that cannot both be satisfied. The master can't start, because the user has to choose which one they want.
marun commentedon Aug 24, 2016
@liggitt As with @smarterclayton, I get your point in the general case. I don't believe your concerns are warranted in all cases though, so I'll agree to disagree.