diff --git a/hack/lib/start.sh b/hack/lib/start.sh index d110ad3e222b..a3519ef1ab24 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}" \ --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 03a1f5597fc4..441f6c8abf90 100755 --- a/test/cmd/admin.sh +++ b/test/cmd/admin.sh @@ -32,7 +32,7 @@ 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' diff --git a/test/cmd/help.sh b/test/cmd/help.sh index 3402f39d0930..1f6557d73c0d 100755 --- a/test/cmd/help.sh +++ b/test/cmd/help.sh @@ -41,7 +41,7 @@ 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 'oc project --help' 'Switch to another project'