Skip to content

--write-config has invalid ingress IP when run in cloud provider #10595

Closed

Description

@markturansky
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=...)

#10455 is the change that causes this error.

Is there something else I need to do when generating config or was this bug introduced with #10455?

@smarterclayton @marun

Activity

  1. markturansky commented on Aug 23, 2016

    @markturansky
    MemberAuthor

    Simply replacing the generated IP with "" works, but it means the generated config doesn't work OOTB.

  2. marun commented on Aug 23, 2016

    @marun
    Contributor

    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?

  3. markturansky commented on Aug 23, 2016

    @markturansky
    MemberAuthor

    I edit various components of master-config to include the cloud provider. Specifically, I edit the Kube API server and controllerArguments bit.

    1. openshift start --write-config
    2. edit config to include cloud provider
    3. run openshift w/ edited master config

    Is there another way to generate config that would automatically set cloud provider and have the generated config work OOTB?

  4. marun commented on Aug 23, 2016

    @marun
    Contributor

    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.

  5. smarterclayton commented on Aug 23, 2016

    @smarterclayton
    Contributor

    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.

    @smarterclayton https://github.com/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.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #10595 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/ABG_p5CHS3XqG4jvvUenwwBP4Q4TVXfIks5qi1MQgaJpZM4JrEFi
    .

  6. liggitt commented on Aug 23, 2016

    @liggitt
    Contributor

    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.

  7. smarterclayton commented on Aug 23, 2016

    @smarterclayton
    Contributor

    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:

    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.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #10595 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/ABG_p0iulL4hFgcWM62nYp8uRMvDzhPaks5qi3A4gaJpZM4JrEFi
    .

  8. markturansky commented on Aug 23, 2016

    @markturansky
    MemberAuthor

    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.

  9. liggitt commented on Aug 23, 2016

    @liggitt
    Contributor

    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.

  10. markturansky commented on Aug 24, 2016

    @markturansky
    MemberAuthor

    @liggitt ok. so this isn't a new bug that was introduced. Thanks for the help! I'll close this issue.

  11. marun commented on Aug 24, 2016

    @marun
    Contributor

    @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.

  12. liggitt commented on Aug 24, 2016

    @liggitt
    Contributor

    What is the problem with not validating a value that can't be used?

    Config that contains invalid values that are ignored because of other values is a ticking time bomb.

    Enabling a cloud provider invalidates any range specified for ingress.

    Agreed, which is why it is not valid to specify both.

    Right now the master refuses to start with this error. I think starting and logging a warning should be sufficient.

    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.

  13. marun commented on Aug 24, 2016

    @marun
    Contributor

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions