diff --git a/hack/lib/start.sh b/hack/lib/start.sh index 0f86ad380d90..f5050bac54c4 100644 --- a/hack/lib/start.sh +++ b/hack/lib/start.sh @@ -129,16 +129,14 @@ function os::start::internal::configure_master() { openshift_executable="$(os::start::internal::openshift_executable "${version}")" os::log::debug "Creating master configuration for the OpenShift server" - ${openshift_executable} start \ + ${openshift_executable} start master \ --create-certs=false \ --images="${USE_IMAGES}" \ --master="${MASTER_ADDR}" \ - --dns="tcp://${API_HOST}:53" \ - --hostname="${KUBELET_HOST}" \ - --volume-dir="${VOLUME_DIR}" \ + --dns="tcp://${API_HOST}:8053" \ --etcd-dir="${ETCD_DATA_DIR}" \ --network-plugin="${NETWORK_PLUGIN:-}" \ - --write-config="${SERVER_CONFIG_DIR}" \ + --write-config="${SERVER_CONFIG_DIR}/master" \ --listen="${API_SCHEME}://${API_BIND_HOST}:${API_PORT}" \ --public-master="${API_SCHEME}://${PUBLIC_MASTER_HOST}:${API_PORT}" diff --git a/pkg/cmd/server/start/start_network.go b/pkg/cmd/server/start/start_network.go index d249311aa945..4af0c886e457 100644 --- a/pkg/cmd/server/start/start_network.go +++ b/pkg/cmd/server/start/start_network.go @@ -185,6 +185,9 @@ func (o NodeOptions) RunNode() error { // After this call returns without an error, config files will exist on disk. It also returns // a string for messages indicating which config file contains the config. func (o NodeOptions) resolveNodeConfig() (*configapi.NodeConfig, string, error) { + if len(o.ConfigFile) == 0 { + return nil, "", fmt.Errorf("you must specify a configuration file with --config") + } glog.V(2).Infof("Reading node configuration from %s", o.ConfigFile) cfg, err := configapilatest.ReadAndResolveNodeConfig(o.ConfigFile) return cfg, o.ConfigFile, err diff --git a/pkg/oc/clusterup/coreinstall/kubelet/flags.go b/pkg/oc/clusterup/coreinstall/kubelet/flags.go index 073e06df70bb..7b95a226293d 100644 --- a/pkg/oc/clusterup/coreinstall/kubelet/flags.go +++ b/pkg/oc/clusterup/coreinstall/kubelet/flags.go @@ -36,8 +36,6 @@ func (opt KubeletStartFlags) MakeKubeletFlags(dockerClient dockerhelper.Interfac } createFlagsCmd := []string{ - "start", "node", - "--write-flags", "--config=/var/lib/origin/openshift.local.config/node/node-config.yaml", } @@ -46,7 +44,7 @@ func (opt KubeletStartFlags) MakeKubeletFlags(dockerClient dockerhelper.Interfac Bind(binds...). Env(env...). SaveContainerLogs(componentName, path.Join(basedir, "logs")). - Entrypoint("openshift"). + Entrypoint("openshift-node-config"). Command(createFlagsCmd...).Output() if err != nil { return "", errors.NewError("could not run %q: %v", componentName, err).WithCause(err) diff --git a/test/cmd/admin.sh b/test/cmd/admin.sh index 7f87301a744f..95c8d6e64cfc 100755 --- a/test/cmd/admin.sh +++ b/test/cmd/admin.sh @@ -32,12 +32,11 @@ os::test::junit::declare_suite_start "cmd/admin" os::test::junit::declare_suite_start "cmd/admin/start" # Check failure modes of various system commands -os::cmd::expect_failure_and_text 'openshift start network' 'kubeconfig must be set' +os::cmd::expect_failure_and_text 'openshift start network' 'you must specify a configuration file with --config' os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} --enable=kubelet' 'the following components are not recognized: kubelet' os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} --enable=kubelet,other' 'the following components are not recognized: kubelet, other' os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} --disable=other' 'the following components are not recognized: other' os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} --disable=dns,proxy,plugins' 'at least one node component must be enabled \(dns, plugins, proxy\)' -os::cmd::expect_failure_and_text 'openshift start --write-config=/tmp/test --hostname=""' 'error: --hostname must have a value' os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/admin/manage-node" diff --git a/test/cmd/help.sh b/test/cmd/help.sh index 3402f39d0930..36061ee4423b 100755 --- a/test/cmd/help.sh +++ b/test/cmd/help.sh @@ -41,18 +41,18 @@ os::cmd::expect_success_and_text 'oc login --help' 'insecure-skip-tls-verify' # help for given command with --help flag must be consistent os::cmd::expect_success_and_text 'oc get --help' 'Display one or many resources' -os::cmd::expect_success_and_text 'openshift start --help' 'Launch OpenShift components' +os::cmd::expect_success_and_text 'openshift start --help' 'Start components of OpenShift' os::cmd::expect_success_and_text 'openshift start master --help' 'Start a master' -os::cmd::expect_success_and_text 'openshift start network --help' 'Start networking' +os::cmd::expect_success_and_text 'openshift start network --help' 'Start node network' os::cmd::expect_success_and_text 'oc project --help' 'Switch to another project' os::cmd::expect_success_and_text 'oc projects --help' 'existing projects' os::cmd::expect_success_and_text 'oc get --help' 'oc' # help for given command through help command must be consistent os::cmd::expect_success_and_text 'oc help get' 'Display one or many resources' -os::cmd::expect_success_and_text 'openshift help start' 'Launch OpenShift components' +os::cmd::expect_success_and_text 'openshift help start' 'Start components of OpenShift' os::cmd::expect_success_and_text 'openshift help start master' 'Start a master' -os::cmd::expect_success_and_text 'openshift help start node' 'Start a node' +os::cmd::expect_success_and_text 'openshift help start network' 'Start node network' os::cmd::expect_success_and_text 'oc help project' 'Switch to another project' os::cmd::expect_success_and_text 'oc help projects' 'current active project and existing projects on the server'