Bug 1260240

Summary: oadm create-node-config command shown in docs does not work.
Product: OpenShift Container Platform Reporter: Ryan Howe <rhowe>
Component: DocumentationAssignee: brice <bfallonf>
Status: CLOSED CURRENTRELEASE QA Contact: Vikram Goyal <vigoyal>
Severity: low Docs Contact: Vikram Goyal <vigoyal>
Priority: medium    
Version: 3.0.0CC: aos-bugs, jokerman, mmasters, mmccomas, rhowe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-21 22:58:43 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 Ryan Howe 2015-09-04 21:59:19 UTC
Document URL: https://docs.openshift.com/enterprise/3.0/admin_guide/master_node_configuration.html#creating-new-configuration-files

Section Number and Name: https://docs.openshift.com/enterprise/3.0/admin_guide/master_node_configuration.html#creating-new-configuration-files

Describe the issue: 

Suggestions for improvement: 

Additional information: 

The doc say run to create a node configuration file and other related files in the specified directory:

$ oadm create-node-config --node-dir=/openshift.local.config/node-<node_hostname> --node=<node_hostname> --hostnames=<hostname>,<ip_address> 

- Nothing gets created 



Running the following ended up working and generated everything with out and error. 

[root@master node]# oadm create-node-config --node-dir=/etc/openshift/node/node-node3.example.com --node=node3.example.com --hostnames=node3.example.com,172.17.28.10 --certificate-authority="/etc/openshift/master/ca.crt" --signer-cert="/etc/openshift/master/ca.crt" --signer-key="/etc/openshift/master/ca.key" --signer-serial="/etc/openshift/master/ca.serial.txt" --node-client-certificate-authority="/etc/openshift/master/ca.crt"

Comment 2 brice 2015-09-28 05:56:19 UTC
Ryan,

Running both the first command, and your suggested command above did not work me. This might need more looking into. I'm thinking it might be something to do with the differences between the "openshift start" and the "oadm create-node-config" command. I feel no matter what we're creating, it should be consistent.

In them meantime, did this issue come from a customer case? Anymore information would be very useful.

Thanks.

Comment 3 Miciah Dashiel Butler Masters 2016-01-19 17:38:47 UTC
Note that /etc/openshift was moved to /etc/origin.  Otherwise, the command looks correct, and worked for me (with the correct path substituted for /etc/openshift) earlier today in a devenv.  What error are you seeing?

Comment 4 Ryan Howe 2016-08-19 19:42:55 UTC
This command does not work. 


└──> oadm create-node-config --node-dir=/etc/origin/node/ --node=test.test.com --hostnames=test.test.com
error: --certificate-authority must be a valid certificate file: open openshift.local.config/master/ca.crt: no such file or directory
See 'oadm create-node-config -h' for help and examples.


This is what works:

┌─[✗]─[root@master-0]─[~]
└──> oadm create-node-config --node-dir=/tmp/ --node=test.test.com --hostnames=test.test.com,123.1.2.3  --certificate-authority="/etc/origin/master/ca.crt" --signer-cert="/etc/origin/master/ca.crt" --signer-key="/etc/origin/master/ca.key" --signer-serial="/etc/origin/master/ca.serial.txt" --node-client-certificate-authority="/etc/origin/master/ca.crt" --network-plugin='redhat/openshift-ovs-subnet' --master='https://clusteroseapi.test.com:8443' --dns-ip='<IF_DNSMASQ_hostip_123.1.2.3>' --volume-dir='/var/lib/origin/openshift.local.volumes' 


Generating node credentials ...
Created node config for test.test.com in /tmp/
┌─[root@master-0]─[~]
└──> ll /tmp
total 176
-rw-r--r--. 1 root root   1066 Aug 19 15:20 ca.crt
-rw-r--r--. 1 root root   1119 Aug 19 15:20 master-client.crt
-rw-------. 1 root root   1675 Aug 19 15:20 master-client.key
-rw-r--r--. 1 root root   1066 Aug 19 15:20 node-client-ca.crt
-rw-r--r--. 1 root root    771 Aug 19 15:20 node-config.yaml
-rw-------. 1 root root   5670 Aug 19 15:20 node.kubeconfig
-rw-r--r--. 1 root root    338 Aug 19 15:20 node-registration.json
-rw-r--r--. 1 root root   2185 Aug 19 15:20 server.crt
-rw-------. 1 root root   1679 Aug 19 15:20 server.key



As I am testing this I believe this CLI command needs to be left out of the documentation as this does not contain all the node-config.yaml values that we set by default in the installer. It also adds some defaults, like mtu. 

Example with this cli it does not set the following in the node-config.yaml: 

proxyArguments:
  proxy-mode:
     - iptables


This may be needed for another bug but the node-config.yaml shown in this link is missing configs as well. 

https://docs.openshift.com/enterprise/3.2/install_config/master_node_configuration.html#node-configuration-files

Comment 5 brice 2016-12-12 03:55:58 UTC
This has taken me a while to get back to... But I spoke to Sully Ross and he explained it to me over email.

I've created a PR for this:

https://github.com/openshift/openshift-docs/pull/3361

Ryan, if you have any comments, please let me know.

Comment 6 openshift-github-bot 2017-02-13 01:51:42 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/6a44cc0b63f9589fb6a20df83ea509e4e12ae3d2
Merge pull request #3361 from bfallonf/startnode_1260240

Bug 1260240 fixed info on creating node config files