Bug 1260240 - oadm create-node-config command shown in docs does not work.
oadm create-node-config command shown in docs does not work.
Status: RELEASE_PENDING
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.0.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: brice
Vikram Goyal
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-04 17:59 EDT by Ryan Howe
Modified: 2017-02-12 20:51 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ryan Howe 2015-09-04 17:59:19 EDT
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 01:56:19 EDT
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 12:38:47 EST
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 15:42:55 EDT
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-11 22:55:58 EST
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-12 20:51:42 EST
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

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