Bug 1191357
| Summary: | master node is always shown in the output of `osc get mi` | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Johnny Liu <jialiu> |
| Component: | oc | Assignee: | Fabiano Franz <ffranz> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.0.0 | CC: | bleanhar, dmcphers, jokerman, libra-onpremise-devel, lmeyer, mmccomas, nicholas_schuetz |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | openshift-0.4-0.git.45.42737cc.el7ose.x86_64 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-09-08 17:35:20 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Johnny Liu
2015-02-11 07:07:24 UTC
If the master is listed there, the following error is always seen in log: Feb 11 15:17:01 jialiu-master openshift: I0211 15:17:01.408198 4529 http.go:54] HTTP probe error: Get http://jialiu-master:10250/healthz: dial tcp 10.66.79.140:10250: connection refused This happens because if you don't provide a node list it defaults to using 127.0.0.1 and adding cfg.Hostname to the NodeList. I'm trying to determine if there's a technical reason that we must have at least one node. I'm pretty sure it's an artifact of the "30 seconds admin experience" where we want as much as possible to be there out of the box for all-in-one environments. We should definitely figure out a reasonable way for this not to be the behavior when the master is started by systemd in OSE. I think we want to at least make sure 'openshift start' continues to start everything however if 'openshift start master' is explicitly started I think it would be OK to have an empty NodeList. Workaround: specify at least one node by adding --nodes=hostname to OPTIONS in /etc/sysconfig/openshift-master I'm a bit hesitant to submitting a PR to remove the default inclusion of localhost from the list of nodes as it makes it very simple to install both master and node on one host and have a working config. Without it you'll have to add localhost either via --nodes or via the API. I agree that having it add itself by default is very useful for user exp and doesn't really harm anything other than having an extra (inactive) entry in the node list. Perhaps we could have "--node=" (empty option, or "--no-node") on openshift-master OPTIONS as a hint not to add self and just wait for nodes to be added by API. I'd be fine with adding a new flag for the OSE production use case. This new flag would be the default for the openshift-master when started by the RPMs so it shouldn't impose any burden on all-in-one environments building from source or using docker images. I'd vote for calling it something like "--no-auto-node". "--no-node" might make people think that they want to run it without extra nodes and therefore would expect an all-in-one style environment. I'm not really seeing another flag just for this. You can actually already do it with --node= just by supplying a bogus node name, e.g. in sysconfig: OPTIONS="--loglevel=1 --nodes=*" The downside now is that you get errors in the master log about this being unresolvable etc. so it's definitely just a workaround. Would it be too cryptic to just make "--nodes=" disable all auto-node-adding and make that the default in openshift-master? I definitely prefer that there be a way for the master to know it's in OSE mode and avoid as much all-in-one stuff as possible and the need for extra flags. I didn't see something that wasn't a hack that would complicate the all-in-one setup. The first workaround I tried was to set "--nodes=". I didn't really like that error message and it would be really confusing to me as an admin to see it in a config file. Eventually I think we'll get to the point where we'll have enough 'all-in-one' assumptions that we'll need some concept of '--env=production' and have it read some other defaults or something. I'm on the fence over whether a new flag would be warranted... Having '--nodes=' be interpreted differently than not specifying --nodes seems a bit counter-intuitive to me. I would be okay with a special char/word being the trigger if we choose to not add a new flag. If we are going to add a new flag, then --no-local-node would make more sense to me than --no-auto-node (which would seem like it would disable some wanted behavior) and --no-node (which makes it seem like a node-less install). I could live with --no-local-node. Because bikeshedding is fun... How about `openshift start standalone-master`? Although I didn't see a response to comment #3 why we couldn't have `openshift start` start the all-in-one and `openshift start master` start a standalone master... I think I was worried about existing workflows breaking but that would definitely be my preference. If you don't have the master add itself by default, then the OSE all-in-one experience changes from: 1. systemctl start openshift-master openshift-node to: 1. systemctl start openshift-master openshift-node 2. osc create -f <file with ugly json> # just to get the local node At least (2) is *possible* now that adding a node via API actually works again. And it would have the advantage that nodes will tend to be defined uniformly (while the current master default fills in resource details that we didn't include in templates for non-master nodes, which appears to skew the scheduling). And it will probably be replaced with "openshift add-node" or similar later making it more sane. I guess there are technically two all-in-one scenarios. The one I'm most concerned with not breaking is 'openshift start'. Having that launch everything is how we are able to quickly run everything inside a docker container. I think we'd be able to make a case for 'openshift start master' and 'openshift start node' only doing that and move the local node creation to only the 'openshift start' case. A node is no longer created when running 'openshift start master' Verified this bug against the following packages, now master node is not listed there on master node. openshift-sdn-0.4-3.git.0.954ef11.el7ose.x86_64 openshift-master-0.4-0.git.43.e57c9a8.el7ose.x86_64 openshift-sdn-master-0.4-3.git.0.954ef11.el7ose.x86_64 openshift-0.4-0.git.43.e57c9a8.el7ose.x86_64 Closing this as part of a bulk update/cleanup of multiple bugs that were VERIFIED before OSE 3.0 GA but were left open and haven't been updated since. If this bug was meant to stay open for some reason please reopen. |