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 flag to disable dynamic provisioning #8426

Merged
merged 1 commit into from
Apr 15, 2016

Conversation

markturansky
Copy link
Member

  1. Refactor "VolumeConfig" to "NodeVolumeConfig"
  2. Add MasterVolumeConfig w/ boolean to turn off DP
  3. Only start provisioning controller when the flag is true.
  4. Set true by default

OpenShift Online would like to disable the default dynamic provisioning inherent in Kube. We're implementing our own provisioning controller that will run in a pod on the cluster.

@liggitt @deads2k @ironcladlou @abhgupta

@smarterclayton approved this new boolean config item.

@liggitt
Copy link
Contributor

liggitt commented Apr 8, 2016

shouldn't that already be expressable with controllers: *,-DynamicProvisioningController or something like that? (would still need changes to honor that internally, and would probably want to assign names to all controllers)

// MasterVolumeConfig contains options for configuring volumes on the node.
type MasterVolumeConfig struct {
// EnableDynamicProvisioning is a boolean that toggles the dynamic provisioning feature on/off
EnableDynamicProvisioning bool
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really want a one-off flag for a particular controller, I'd rather work to make the controllers config param effective for disabling a subset of controllers

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have time for the broader refactor. It's too risky a change for
1.2. DynamicProvisioning as a feature flag is ok.

On Fri, Apr 8, 2016 at 11:14 AM, Jordan Liggitt [email protected]
wrote:

In pkg/cmd/server/api/types.go
#8426 (comment):

// LocalQuota contains options for controlling local volume quota on the node.
LocalQuota LocalQuota

}

+// MasterVolumeConfig contains options for configuring volumes on the node.
+type MasterVolumeConfig struct {

  • // EnableDynamicProvisioning is a boolean that toggles the dynamic provisioning feature on/off
  • EnableDynamicProvisioning bool

I don't really want a one-off flag for a particular controller, I'd rather
work to make the controllers config param effective for disabling a
subset of controllers


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/8426/files/e58a75d0de05e59a0b4fe05a06e20adc90aec313#r59040426

Copy link
Contributor

Choose a reason for hiding this comment

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

As a general rule, controllers enablement is about sharding controllers
(admin operational performance concern). Disabling dynamic provisioning is
an operational admin feature.

On Fri, Apr 8, 2016 at 11:20 AM, Clayton Coleman [email protected]
wrote:

We don't have time for the broader refactor. It's too risky a change for
1.2. DynamicProvisioning as a feature flag is ok.

On Fri, Apr 8, 2016 at 11:14 AM, Jordan Liggitt [email protected]
wrote:

In pkg/cmd/server/api/types.go
#8426 (comment):

// LocalQuota contains options for controlling local volume quota on the node.
LocalQuota LocalQuota
}

+// MasterVolumeConfig contains options for configuring volumes on the node.
+type MasterVolumeConfig struct {

  • // EnableDynamicProvisioning is a boolean that toggles the dynamic provisioning feature on/off
  • EnableDynamicProvisioning bool

I don't really want a one-off flag for a particular controller, I'd
rather work to make the controllers config param effective for disabling
a subset of controllers


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/8426/files/e58a75d0de05e59a0b4fe05a06e20adc90aec313#r59040426

Copy link
Member Author

Choose a reason for hiding this comment

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

@jsafrane @swagiaal The new consolidated controller coming in Kube 1.3 will need a constructor arg to enable/disable only one piece/subset of your overall controller. We can then use this proposed flag for that arg. A similar flag can be added to kube-controller-manager as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

in the external version, this has to be a *bool so we can tell the difference between unspecified (which needs to default to true for backwards compatibility with current configs) and false

@deads2k
Copy link
Contributor

deads2k commented Apr 8, 2016

@smarterclayton approved this new boolean config item.

Approved for 1.2 or 1.2.x?

@markturansky
Copy link
Member Author

@deads2k 1.2 so we can get this into OSE. OSO Ops would then update and configure this new flag.

@markturansky markturansky force-pushed the provisioning_flag branch 3 times, most recently from 019d74a to b5a4964 Compare April 8, 2016 16:32
@markturansky
Copy link
Member Author

@liggitt boolean pointer added to external types along with conversions funcs and fuzzer.

@@ -68,6 +69,11 @@ func fuzzInternalObject(t *testing.T, forVersion unversioned.GroupVersion, item
// The final value of OAuthConfig.MasterCA should never be nil
obj.OAuthConfig.MasterCA = &s
}
if time.Now().Second()%2 == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

if all the iterations happen in a second you'll only exercise one path
use c.RandBool()

Copy link
Contributor

Choose a reason for hiding this comment

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

actually, the FuzzNoCustom above should be doing that already

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. I tested without this and the serialization test works. Removed.

@markturansky
Copy link
Member Author

@liggitt as discussed in IRC, i inverted the opt-in to opt-out by changing to "Disable..." and removing the pointer from the bool. Since I got to remove code to make this change, it's the right way to go and it preserves current behavior.

@@ -71,13 +71,19 @@ type NodeConfig struct {
IPTablesSyncPeriod string `json:"iptablesSyncPeriod"`

// VolumeConfig contains options for configuring volumes on the node.
VolumeConfig VolumeConfig `json:"volumeConfig"`
VolumeConfig NodeVolumeConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

don't remove json tags

@markturansky
Copy link
Member Author

@liggitt all json tags added.

// LocalQuota contains options for controlling local volume quota on the node.
LocalQuota LocalQuota `json:"localQuota"`
LocalQuota LocalQuota
Copy link
Contributor

Choose a reason for hiding this comment

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

json tag

Copy link
Member Author

Choose a reason for hiding this comment

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

added

@@ -767,6 +767,6 @@ var map_VolumeConfig = map[string]string{
"localQuota": "LocalQuota contains options for controlling local volume quota on the node.",
}

func (VolumeConfig) SwaggerDoc() map[string]string {
func (NodeVolumeConfig) SwaggerDoc() map[string]string {
Copy link
Contributor

Choose a reason for hiding this comment

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

hack/update-generated-swagger-descriptions.sh should create one like this for MasterVolumeConfig

@markturansky
Copy link
Member Author

@liggitt I added code for types_test.go but I am getting diff errors in the test.

I am not familiar with these configs, so I am probably missing something obvious. Can you help me figure out how to get the test correct? I feel it's close, but something is missing....

@liggitt
Copy link
Contributor

liggitt commented Apr 8, 2016

I think you just put it in the wrong place... needs to be at the end of the master config, alphabetically

@markturansky
Copy link
Member Author

@liggitt and that was it :)

@liggitt
Copy link
Contributor

liggitt commented Apr 10, 2016

[test]
looks reasonable to me, go ahead and squash. @deads2k for a second, @smarterclayton for approval

@markturansky
Copy link
Member Author

@liggitt squashed. thanks!

@deads2k
Copy link
Contributor

deads2k commented Apr 11, 2016

lgtm

@smarterclayton smarterclayton added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 11, 2016
@smarterclayton
Copy link
Contributor

Explain to me why we are using Disabled* instead of DynamicallyProvisionVolumes *bool and defaulting nil to true? I do not like negative variable names.

@markturansky
Copy link
Member Author

@smarterclayton @liggitt I reverted back to *bool. PTAL. I'll squash that 2nd commit after you've had a chance to review it.

@smarterclayton
Copy link
Contributor

API docs need be updated.

On Mon, Apr 11, 2016 at 12:30 PM, OpenShift Bot [email protected]
wrote:

continuous-integration/openshift-jenkins/test FAILURE (
https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/2886/)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8426 (comment)

@markturansky
Copy link
Member Author

Unrelated failure? Both builds worked but the "conformance build" had a failure:

I0411 13:05:01.390585   19303 plugins.go:46] Registered cloud provider "aws"
I0411 13:05:01.391485   19303 plugins.go:46] Registered cloud provider "gce"
!!! Error in test/extended/conformance.sh:65
    'return $out' exited with status 1
Call stack:
    1: test/extended/conformance.sh:65 main(...)
Exiting with status 1

@smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 11, 2016
@smarterclayton
Copy link
Contributor

Approved but needs re-review

@@ -307,6 +307,23 @@ func addConversionFuncs(scheme *runtime.Scheme) {
out.Location = in.Location
return nil
},
func(in *MasterVolumeConfig, out *internal.MasterVolumeConfig, s conversion.Scope) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

simplify to

out.DynamicProvisioningEnabled = (in.DynamicProvisioningEnabled == nil) || (*in.DynamicProvisioningEnabled)

Copy link
Member Author

Choose a reason for hiding this comment

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

changed. this is more succinct.

@smarterclayton
Copy link
Contributor

[test]

On Mon, Apr 11, 2016 at 6:05 PM, OpenShift Bot [email protected]
wrote:

continuous-integration/openshift-jenkins/test FAILURE (
https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/2903/)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8426 (comment)

@markturansky
Copy link
Member Author

squashed

@markturansky
Copy link
Member Author

Unrelated flake:

Cannot find a valid baseurl for repo: extras/7/x86_64
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')

@markturansky
Copy link
Member Author

[test]

@smarterclayton
Copy link
Contributor

Tests passed except for the deployment flake

@markturansky
Copy link
Member Author

@smarterclayton @liggitt Anything else I can do to get this PR merged?

@markturansky
Copy link
Member Author

@abhgupta @smarterclayton @liggitt do we want to cherry pick this into 3.2 so Online can use it for the Dev Preview?

@liggitt
Copy link
Contributor

liggitt commented Apr 15, 2016

LGTM [test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to e056714

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/3012/)

@markturansky
Copy link
Member Author

Flake from conformance test. Two other Jenkins jobs both passed.

Stderr from the command:

info: password for stats user admin has been set to 6TKNeTuco5
I0415 13:55:50.696519   19448 plugins.go:62] Registered admission plugin "ServiceAccount"
I0415 13:55:50.712572   19448 plugins.go:46] Registered cloud provider "aws"
I0415 13:55:50.713638   19448 plugins.go:46] Registered cloud provider "gce"
I0415 13:55:52.815063   19549 plugins.go:62] Registered admission plugin "ServiceAccount"
I0415 13:55:52.827799   19549 plugins.go:46] Registered cloud provider "aws"
I0415 13:55:52.828855   19549 plugins.go:46] Registered cloud provider "gce"
Error: No such image or container: 889acc371ac6
Error: No such image or container: b58194f866d5
!!! Error in test/extended/conformance.sh:65
    'return $out' exited with status 1
Call stack:
    1: test/extended/conformance.sh:65 main(...)
Exiting with status 1

@liggitt
Copy link
Contributor

liggitt commented Apr 15, 2016

[merge]
please open an issue in the openshift-ansible repo with info about the option so it can be set for ansible-driven installs

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/5599/) (Image: devenv-rhel7_3978)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to e056714

@markturansky
Copy link
Member Author

@liggitt issue created openshift/openshift-ansible#1759

@openshift-bot openshift-bot merged commit 906d584 into openshift:master Apr 15, 2016
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants