Bug 1203129 - Fail to start openshift-node service due not to support "--master" option when using ansible to install environment
Summary: Fail to start openshift-node service due not to support "--master" option whe...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-18 08:11 UTC by xjia
Modified: 2015-10-30 03:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-30 03:31:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description xjia 2015-03-18 08:11:51 UTC
Description of problem:
The "openshift start node" command don't have "--master
" option. And check the value of OPTIONS in /etc/sysconfig/openshift-node. OPTIONS="--master=https://10.14.6.120:8443 --loglevel=4". This is the root cause of problem.

[root@ose3-minion2 sysconfig]# openshift start node -h
Start an OpenShift node
This command helps you launch an OpenShift node.  Running

    $ openshift start node --master=<masterIP>

will start an OpenShift node that attempts to connect to the master on the provided IP. The 
node will run in the foreground until you terminate the process.

Usage: 
  openshift start node [options]

Options:
      --cert-dir="openshift.local.certificates": The certificate data directory.
      --config="": Location of the node configuration file to run from, or write to (when used with --write-config). When running from a configuration file, all other command-line arguments are ignored.
      --create-certs=true: Create any missing certificates required for launch or for writing the config file.
      --hostname="ose3-minion2.example.com": The hostname to identify this node with the master.
      --images="openshift/origin-${component}:${version}": When fetching images used by the cluster for important components, use this format on both master and nodes. The latest release will be used by default.
      --kubeconfig="": Path to the kubeconfig file to use for requests to the Kubernetes API.
      --kubernetes=https://localhost:8443: The address of the Kubernetes server (host, host:port, or URL). If specified, no Kubernetes components will be started.
      --latest-images=false: If true, attempt to use the latest images for the cluster instead of the latest release.
      --listen=https://0.0.0.0:8443: The address to listen for connections on (host, host:port, or URL).
      --volume-dir="openshift.local.volumes": The volume storage directory.
      --write-config=false: Indicates that the command should build the configuration from command-line arguments, write it to the location specified by --config, and exit.

Global Options:
  -h, --help=false: help for node
      --loglevel=0: Set the level of log output (0-5)

Log from /var/log/message:
Mar 18 11:09:09 openshift-v3 openshift: unknown flag: --images
Mar 18 11:09:09 openshift-v3 openshift: Usage:
Mar 18 11:09:09 openshift-v3 openshift: openshift start node [options]
Mar 18 11:09:09 openshift-v3 openshift: Options:
Mar 18 11:09:09 openshift-v3 openshift: --cert-dir="openshift.local.certificates": The certificate data directory.
Mar 18 11:09:09 openshift-v3 openshift: --config="": Location of the node configuration file to run from, or write to (when used with --write-config). When running from a configuration file, all other command-line arguments are ignored.
Mar 18 11:09:09 openshift-v3 openshift: --create-certs=true: Create any missing certificates required for launch or for writing the config file.
Mar 18 11:09:09 openshift-v3 openshift: --hostname="ose3-minion2.example.com": The hostname to identify this node with the master.
Mar 18 11:09:09 openshift-v3 openshift: --images="openshift/origin-${component}:${version}": When fetching images used by the cluster for important components, use this format on both master and nodes. The latest release will be used by default.
Mar 18 11:09:09 openshift-v3 openshift: --kubeconfig="": Path to the kubeconfig file to use for requests to the Kubernetes API.
Mar 18 11:09:09 openshift-v3 openshift: --kubernetes=https://localhost:8443: The address of the Kubernetes server (host, host:port, or URL). If specified, no Kubernetes components will be started.
Mar 18 11:09:09 openshift-v3 openshift: --latest-images=false: If true, attempt to use the latest images for the cluster instead of the latest release.
Mar 18 11:09:09 openshift-v3 openshift: --listen=https://0.0.0.0:8443: The address to listen for connections on (host, host:port, or URL).
Mar 18 11:09:09 openshift-v3 openshift: --volume-dir="openshift.local.volumes": The volume storage directory.
Mar 18 11:09:09 openshift-v3 openshift: --write-config=false: Indicates that the command should build the configuration from command-line arguments, write it to the location specified by --config, and exit.
Mar 18 11:09:09 openshift-v3 openshift: Global Options:
Mar 18 11:09:09 openshift-v3 openshift: -h, --help=false: help for node
Mar 18 11:09:09 openshift-v3 openshift: --loglevel=0: Set the level of log output (0-5)
Mar 18 11:09:09 openshift-v3 systemd: openshift-node.service: main process exited, code=exited, status=1/FAILURE

Another small issue is "openshift start node" gives the wrong message if using "--master" option. It needs to say "unknown flag: --master" instead of "unknown flag: --images"
 
Version-Release number of selected component (if applicable):
puddle: 3.0/2015-03-17.1/
openshift-sdn-node-0.4-3.git.0.954ef11.el7ose.x86_64
openshift-0.4.1-0.git.248.d642df7.el7ose.x86_64
openshift-sdn-0.4-3.git.0.954ef11.el7ose.x86_64
openshift-node-0.4.1-0.git.248.d642df7.el7ose.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Using ansible to install v3 environment.
2.Check openshift-node service on minions

Actual results:
[root@ose3-minion1 openshift-ansible]# systemctl status openshift-node
openshift-node.service - OpenShift Node
   Loaded: loaded (/usr/lib/systemd/system/openshift-node.service; disabled)
   Active: failed (Result: exit-code) since Wed 2015-03-18 11:09:15 CST; 3min 28s ago
     Docs: https://github.com/openshift/origin
  Process: 6174 ExecStart=/usr/bin/openshift start $ROLE --images=${IMAGES} --kubeconfig=${KUBECONFIG} $OPTIONS (code=exited, status=1/FAILURE)
 Main PID: 6174 (code=exited, status=1/FAILURE)

Mar 18 11:09:15 ose3-minion1.example.com openshift[6174]: --latest-images=false: If true, attempt to use the latest images for the cluster instead of the latest release.
Mar 18 11:09:15 ose3-minion1.example.com openshift[6174]: --listen=https://0.0.0.0:8443: The address to listen for connections on (host, host:port, or URL).
Mar 18 11:09:15 ose3-minion1.example.com openshift[6174]: --volume-dir="openshift.local.volumes": The volume storage directory.
Mar 18 11:09:15 ose3-minion1.example.com openshift[6174]: --write-config=false: Indicates that the command should build the configuration from command-line arguments, write it ..., and exit.
Mar 18 11:09:15 ose3-minion1.example.com openshift[6174]: Global Options:
Mar 18 11:09:15 ose3-minion1.example.com openshift[6174]: -h, --help=false: help for node
Mar 18 11:09:15 ose3-minion1.example.com openshift[6174]: --loglevel=0: Set the level of log output (0-5)
Mar 18 11:09:15 ose3-minion1.example.com systemd[1]: openshift-node.service: main process exited, code=exited, status=1/FAILURE
Mar 18 11:09:15 ose3-minion1.example.com systemd[1]: Failed to start OpenShift Node.
Mar 18 11:09:15 ose3-minion1.example.com systemd[1]: Unit openshift-node.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

Expected results:
2. Succeed

Additional info:

Comment 2 David Eads 2015-03-26 11:55:26 UTC
See https://github.com/openshift/origin/pull/1257.  I will make the upstream pull request and then we'll probably merge this in.

Comment 3 Scott Dodson 2015-03-26 13:18:24 UTC
Previous versions of the ansible installer appended the --master parameter to the node invocation. This is fixed in Jason's reworkNodeRegistration branch that will be merged soon.

You can find his current work at 
https://github.com/detiber/openshift-ansible/tree/reworkNodeRegistration

Comment 4 xjia 2015-04-21 05:56:28 UTC
Now it works. Could you move it "ON_QA"?

Comment 5 xjia 2015-04-22 09:32:01 UTC
Version:
3.0/2015-04-21.3/

Verify:
[root@minion1 ~]# openshift start node -h | grep master
Start an OpenShift node
This command helps you launch an OpenShift node.  Running

    $ openshift start node --master=<masterIP>

will start an OpenShift node that attempts to connect to the master on the provided IP. The 
node will run in the foreground until you terminate the process.

Options:
      --cert-dir='openshift.local.certificates': The certificate data directory.
      --config='': Location of the node configuration file to run from, or write to (when used with --write-config). When running from a configuration file, all other command-line arguments are ignored.
      --create-certs=true: Create any missing certificates required for launch or for writing the config file.
      --hostname='minion1.local': The hostname to identify this node with the master.
      --images='openshift/origin-${component}:${version}': When fetching images used by the cluster for important components, use this format on both master and nodes. The latest release will be used by default.
      --kubeconfig='': Path to the kubeconfig file to use for requests to the Kubernetes API.
      --kubernetes='https://localhost:8443': removed in favor of --kubeconfig
      --latest-images=false: If true, attempt to use the latest images for the cluster instead of the latest release.
      --listen='https://0.0.0.0:8443': The address to listen for connections on (scheme://host:port).
      --network-plugin='': The network plugin to be called for configuring networking for pods.
      --volume-dir='openshift.local.volumes': The volume storage directory.
      --write-config=false: Indicates that the command should build the configuration from command-line arguments, write it to the location specified by --config, and exit.

Use "openshift start --help" for a list of all commands available in openshift start.
Use "openshift start options" for a list of global command-line options (applies to all commands).
[root@minion1 ~]# systemctl status openshift-node
openshift-node.service - OpenShift Node
   Loaded: loaded (/usr/lib/systemd/system/openshift-node.service; disabled)
   Active: active (running) since Wed 2015-04-22 08:45:45 CST; 8h ago
     Docs: https://github.com/openshift/origin
 Main PID: 4442 (openshift)
   CGroup: /system.slice/openshift-node.service
           └─4442 /usr/bin/openshift start node --images=registry.access.redhat.com/openshift3_beta/ose-${component}:${version} --kubeconfig=/var/lib/openshift/openshift....

Apr 22 17:06:55 minion1.local openshift-node[4442]: a163ef364fe", ResourceVersion:"8410", CreationTimestamp:util.Time{Time:time.Time{sec:63565280631, nsec:0x0, ...c:api.PodS
Apr 22 17:06:55 minion1.local openshift-node[4442]: CreationTimestamp:util.Time{Time:time.Time{sec:63565280883, nsec:0x0, loc:(*time.Location)(0x33dd5e0)}}, Del...ruby-sampl
Apr 22 17:06:55 minion1.local openshift-node[4442]: .185:5000\"}},\"status\":\"Pending\",\"config\":{\"kind\":\"BuildConfig\",\"namespace\":\"zhouy\",\"name\":\...es:api.Res
Apr 22 17:06:55 minion1.local openshift-node[4442]: ntainerPort{Name:"", HostPort:0, ContainerPort:3306, Protocol:"TCP", HostIP:""}}, Env:[]api.EnvVar{api.EnvVa...s{Limits:a
Apr 22 17:06:55 minion1.local openshift-node[4442]: erfsVolumeSource)(nil)}}}, Containers:[]api.Container{api.Container{Name:"sti-build", Image:"registry.access...i.EnvVar{N
Apr 22 17:06:55 minion1.local openshift-node[4442]: (nil), Drop:[]api.CapabilityType(nil)}}}, RestartPolicy:"Never", DNSPolicy:"ClusterFirst", NodeSelector:map[...nerStatuse
Apr 22 17:06:55 minion1.local openshift-node[4442]: shift/mysql-55-centos7:latest", Command:[]string(nil), Args:[]string(nil), WorkingDir:"", Ports:[]api.Contai...ue:"test"}
Apr 22 17:06:55 minion1.local openshift-node[4442]: :[]api.ContainerPort{api.ContainerPort{Name:"", HostPort:0, ContainerPort:5432, Protocol:"TCP", HostIP:""}},...sampledb"}
Apr 22 17:06:55 minion1.local openshift-node[4442]: pi.ISCSIVolumeSource)(nil), Glusterfs:(*api.GlusterfsVolumeSource)(nil)}}}, Containers:[]api.Container{api.C..."", Ports:
Apr 22 17:06:55 minion1.local openshift-node[4442]: dition(nil), Message:"", HostIP:"", PodIP:"", ContainerStatuses:[]api.ContainerStatus(nil)}}, api.Pod{TypeMe...ces/zhouy1
Hint: Some lines were ellipsized, use -l to show in full.


Note You need to log in before you can comment on or make changes to this bug.