-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
clusterup add .skip_pv marker #16631
clusterup add .skip_pv marker #16631
Conversation
/retest |
@smarterclayton new flag to |
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.
LGTM - two minor nits
@@ -81,7 +80,8 @@ for i in $(seq -f "%%04g" 1 %[1]d); do | |||
done | |||
` | |||
|
|||
func (h *Helper) SetupPersistentStorage(authorizationClient authorizationtypedclient.ClusterRoleBindingsGetter, kclient kclientset.Interface, securityClient securityclient.Interface, dir string) error { | |||
// SetupPersistentStorage setup persistent storage |
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.
sets up ?
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.
SetsUpPersistenStorage?
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.
no, the second word :)
pkg/oc/bootstrap/docker/up.go
Outdated
@@ -269,6 +270,7 @@ func (config *CommonStartConfig) Bind(flags *pflag.FlagSet) { | |||
flags.StringVar(&config.HTTPProxy, "http-proxy", "", "HTTP proxy to use for master and builds") | |||
flags.StringVar(&config.HTTPSProxy, "https-proxy", "", "HTTPS proxy to use for master and builds") | |||
flags.StringArrayVar(&config.NoProxy, "no-proxy", config.NoProxy, "List of hosts or subnets for which a proxy should not be used") | |||
flags.IntVar(&config.PVCount, "pv-count", 100, "Number of PV to be created. Default 100.") |
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.
Suggest "Number of persistent volumes to be created"
Not really. Why aren't we creating enough PVs for this never to be a problem? |
@smarterclayton the request came from the minishift team to have the option to set the count to 0 if desired. |
@mangirdaz, I talked to @smarterclayton and came up with an alternative for adding a flag. Basically if there's directories inside the pv directory you specify, skip creating the pv's. |
239c58e
to
79148fb
Compare
@csrwng added 2 options:
|
@mangirdaz thinking about it some more, I think we should just go with option 2 |
79148fb
to
af102e5
Compare
/test extended_conformance_gce |
@csrwng So these will hang on now until master branch will be unlocked? |
@mjudeikis yes |
@csrwng @jim-minter Can you please review the code when you have a spare minute? :) |
@csrwng is the option implemented in this PR, skipping the PV creation on marker file existence satisfactory to the use case that triggered this issue, from the minishift team? Haven't seen any conversation. |
@jorgemoralespou sorry no, but I will have the conversation with the minishift team. It is imho the best we can do without adding new flags to cluster up. Because minishift passes the directory to use for pv's to cluster up, the contents of that directory are under their control. |
@csrwng I think it would solve the original issue of permissions for us. Now we can create the pv (dirs) ourself and then fix the permission if required. cc @hferentschik |
@LalatenduMohanty the code to be modified/related to this is: Ref: https://github.com/minishift/minishift/blob/40c37de0cc16651d821cccf826082fff97e6cf9e/pkg/minishift/clusterup/clusterup.go#L217 |
@csrwng what about if we start doing something like hidden flags? the ones which do not appear in -h? not nice? we used to do something similar with few other RH products. |
Personally, I am more in favour of flags and have no issue with them being hidden. I think this keeps things together. A marker file is a bit of a backdoor hack imo. That said, it would work as well of course.
@LalatenduMohanty, not quite. If we are going down the marker file route, we need to do things before we call cluster up. The code you are pointing out is something we do after cluster up and in fact, the PV creation job has completed. I guess the code you point out might change in a way that we would create PVs at this point ourselves. So it's related ;-) |
I agree, this is also in my opinion a workaround. it can work, but not very charming. @hferentschik as mentioned, it is related, as some of the backstory was missing. it has been nearly 6 months since the request and the offered implementation. Yes, the implementation would happen before |
pvSetupJobName = "persistent-volume-setup" | ||
pvInstallerSA = "pvinstaller" | ||
pvSetupNamespace = "default" | ||
pvIgnoreMarkerFile = ".dont_create_pv" |
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.
s/.dont_create_pv/.skip_pv/
(just suggestion)
skip_pv seems more concise
@mjudeikis a minor suggestion and can you also update the title/description of the PR? Other than that, it should be ready to merge. |
af102e5
to
5973127
Compare
5973127
to
922a15d
Compare
922a15d
to
04f0fdb
Compare
04f0fdb
to
7f448c0
Compare
Adding this test to standard test was breaking other tests. |
/retest |
1 similar comment
/retest |
@csrwng done |
/lgtm |
/assign @bparees |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, csrwng, mjudeikis The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
/restest |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 17289, 16631). |
@mjudeikis: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
Added .skip_pv marker for oc cluster up command.
When the marker is detected in the PV folder - no PV's will be created leaving this configuration for the user.
as per https://trello.com/c/HbpYqEkm/1250-1-cluster-up-option-to-set-number-of-pvs-to-create-clusterup added pv count.
@csrwng @jim-minter