Skip to content

Commit

Permalink
Merge pull request #20344 from smarterclayton/goodbye_kubelet
Browse files Browse the repository at this point in the history
Remove `openshift start node` and cut kubelet dependencies
  • Loading branch information
openshift-merge-robot authored Aug 14, 2018
2 parents e2fd943 + 0ac2242 commit b5f4f96
Show file tree
Hide file tree
Showing 37 changed files with 333 additions and 2,730 deletions.
453 changes: 0 additions & 453 deletions contrib/completions/bash/openshift

Large diffs are not rendered by default.

453 changes: 0 additions & 453 deletions contrib/completions/zsh/openshift

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions contrib/systemd/atomic-openshift-node.service

This file was deleted.

21 changes: 0 additions & 21 deletions contrib/systemd/origin-node.service

This file was deleted.

15 changes: 0 additions & 15 deletions contrib/systemd/origin-node.sysconfig

This file was deleted.

16 changes: 0 additions & 16 deletions contrib/vagrant/provision-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,3 @@ cmd="/usr/bin/openshift start master --loglevel=${LOG_LEVEL} \
--network-plugin=${NETWORK_PLUGIN}"
os::provision::start-os-service "openshift-master" "OpenShift Master" \
"${cmd}" "${DEPLOYED_CONFIG_ROOT}"

if [[ "${SDN_NODE}" = "true" ]]; then
os::provision::start-node-service "${DEPLOYED_CONFIG_ROOT}" \
"${SDN_NODE_NAME}"

# Disable scheduling for the sdn node - its purpose is only to ensure
# pod network connectivity on the master.
#
# This will be performed separately for dind to allow as much time
# as possible for the node to register itself. Vagrant can deploy
# in parallel but dind deploys serially for simplicity.
if ! os::provision::in-container; then
os::provision::disable-node "${OS_ROOT}" "${DEPLOYED_CONFIG_ROOT}" \
"${SDN_NODE_NAME}"
fi
fi
27 changes: 0 additions & 27 deletions contrib/vagrant/provision-node.sh

This file was deleted.

10 changes: 0 additions & 10 deletions contrib/vagrant/provision-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,6 @@ os::provision::copy-config() {
fi
}

os::provision::start-node-service() {
local config_root=$1
local node_name=$2

cmd="/usr/bin/openshift start node --loglevel=${LOG_LEVEL} \
--config=$(os::provision::get-node-config ${config_root} ${node_name})"
os::provision::start-os-service "openshift-node" "OpenShift Node" "${cmd}" \
"${config_root}"
}

OS_WAIT_FOREVER=-1
os::provision::wait-for-condition() {
local msg=$1
Expand Down
2 changes: 0 additions & 2 deletions docs/man/man1/.files_generated_openshift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions docs/man/man1/openshift-start-node.1

This file was deleted.

3 changes: 0 additions & 3 deletions docs/man/man1/openshift-start-template-service-broker.1

This file was deleted.

16 changes: 5 additions & 11 deletions hack/lib/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down Expand Up @@ -474,11 +472,7 @@ function os::start::internal::start_node() {

os::log::debug "Starting OpenShift node"
local openshift_env=( "OPENSHIFT_ON_PANIC=crash" )
$(os::start::internal::openshift_executable) openshift start node \
--config="${NODE_CONFIG_DIR}/node-config.yaml" \
--loglevel=4 --logspec='*importer=5' \
--latest-images="${use_latest_images}" \
&>"${LOG_DIR}/node.log" &
$(which hyperkube) kubelet $(openshift-node-config --config="${NODE_CONFIG_DIR}/node-config.yaml" --loglevel=4) &>"${LOG_DIR}/node.log" &
export NODE_PID=$!

os::log::debug "OpenShift node start at: $( date )"
Expand Down Expand Up @@ -543,7 +537,7 @@ function os::start::internal::determine_hostnames() {
local hostnames
hostnames="${PUBLIC_MASTER_HOST},"
hostnames+="localhost,172.30.0.1,"
for address in $(openshift start --print-ip); do
for address in $(openshift start master --print-ip); do
hostnames+="${address},"
done
hostnames+="kubernetes.default.svc.cluster.local,"
Expand Down
4 changes: 2 additions & 2 deletions hack/lib/util/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ readonly -f os::util::environment::setup_tmpdir_vars
function os::util::environment::setup_kubelet_vars() {
KUBELET_SCHEME="${KUBELET_SCHEME:-https}"
export KUBELET_SCHEME
KUBELET_BIND_HOST="${KUBELET_BIND_HOST:-$(openshift start --print-ip || echo "127.0.0.1")}"
KUBELET_BIND_HOST="${KUBELET_BIND_HOST:-$(openshift start master --print-ip || echo "127.0.0.1")}"
export KUBELET_BIND_HOST
KUBELET_HOST="${KUBELET_HOST:-${KUBELET_BIND_HOST}}"
export KUBELET_HOST
Expand Down Expand Up @@ -232,7 +232,7 @@ function os::util::environment::setup_server_vars() {
KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}"
export KUBE_CACHE_MUTATION_DETECTOR

API_BIND_HOST="${API_BIND_HOST:-$(openshift start --print-ip || echo "127.0.0.1")}"
API_BIND_HOST="${API_BIND_HOST:-$(openshift start master --print-ip || echo "127.0.0.1")}"
export API_BIND_HOST
API_HOST="${API_HOST:-${API_BIND_HOST}}"
export API_HOST
Expand Down
10 changes: 0 additions & 10 deletions images/node/scripts/origin-node-run.sh

This file was deleted.

14 changes: 1 addition & 13 deletions origin.spec
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,9 @@ Summary: %{product_name} Test Suite

%package node
Summary: %{product_name} Node
Requires: %{name} = %{version}-%{release}
Requires: %{name}-hyperkube = %{version}-%{release}
Requires: docker >= %{docker_version}
Requires: util-linux
Requires: socat
Requires: nfs-utils
Requires: cifs-utils
Requires: ethtool
Requires: device-mapper-persistent-data >= 0.6.2
Requires: conntrack-tools
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Expand Down Expand Up @@ -187,6 +180,7 @@ Requires: bridge-utils
Requires: ethtool
Requires: procps-ng
Requires: iproute
Requires: conntrack-tools
Obsoletes: openshift-sdn-ovs < %{package_refactor_version}

%description sdn-ovs
Expand Down Expand Up @@ -308,11 +302,6 @@ done

install -d -m 0755 %{buildroot}%{_sysconfdir}/origin/{master,node}

# different service for origin vs aos
# install -m 0644 contrib/systemd/%{name}-node.service %{buildroot}%{_unitdir}/%{name}-node.service
# same sysconfig files for origin vs aos
install -m 0644 contrib/systemd/origin-node.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}-node

# Install man1 man pages
install -d -m 0755 %{buildroot}%{_mandir}/man1
install -m 0644 docs/man/man1/* %{buildroot}%{_mandir}/man1/
Expand Down Expand Up @@ -394,7 +383,6 @@ touch --reference=%{SOURCE0} $RPM_BUILD_ROOT/usr/sbin/%{name}-docker-excluder
%files node
%{_bindir}/openshift-node-config
%{_sysconfdir}/systemd/system.conf.d/origin-accounting.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-node
%defattr(-,root,root,0700)
%config(noreplace) %{_sysconfdir}/origin/node

Expand Down
11 changes: 5 additions & 6 deletions pkg/cmd/openshift/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"k8s.io/apimachinery/pkg/util/wait"
kcmd "k8s.io/kubernetes/pkg/kubectl/cmd"
ktemplates "k8s.io/kubernetes/pkg/kubectl/cmd/templates"
kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
Expand All @@ -27,10 +28,7 @@ var (
openshiftLong = ktemplates.LongDesc(`
%[2]s
The %[3]s helps you build, deploy, and manage your applications on top of
Docker containers. To start an all-in-one server with the default configuration, run:
$ %[1]s start &`)
The %[3]s helps you build, deploy, and manage containerized applications.`)
)

// CommandFor returns the appropriate command for this base name,
Expand Down Expand Up @@ -68,8 +66,8 @@ func NewCommandOpenShift(name string) *cobra.Command {
Run: kcmdutil.DefaultSubCommandRun(out),
}

startAllInOne, _ := start.NewCommandStartAllInOne(name, out, errout)
root.AddCommand(startAllInOne)
root.AddCommand(start.NewCommandStart(name, out, errout, wait.NeverStop))

root.AddCommand(newCompletionCommand("completion", name+" completion"))
root.AddCommand(cmdversion.NewCmdVersion(name, osversion.Get(), os.Stdout))
root.AddCommand(newCmdOptions())
Expand Down Expand Up @@ -125,6 +123,7 @@ var (
* zsh completions are only supported in versions of zsh >= 5.2`)
)

// NewCmdCompletion creates a completion command.
func NewCmdCompletion(fullName string, out io.Writer) *cobra.Command {
cmdHelpName := fullName

Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/server/kubernetes/node/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package node
78 changes: 0 additions & 78 deletions pkg/cmd/server/kubernetes/node/node.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/cmd/server/kubernetes/node/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func setIfUnset(cmdLineArgs map[string][]string, key string, value ...string) {
}
}

// Some flags are *required* to be set when running from openshift start node. This ensures they are set.
// Some flags are *required* to be set when running from openshift-node-config. This ensures they are set.
// If they are not set, we fail. This is compensating for some lost integration tests.
func CheckFlags(args []string) error {
if needle := "--authentication-token-webhook=true"; !hasArg(needle, args) {
Expand Down
Loading

0 comments on commit b5f4f96

Please sign in to comment.