Bug 1473438 - [DOCS] Logging secure forward patch command formatting
Summary: [DOCS] Logging secure forward patch command formatting
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Brandi Munilla
QA Contact: Anping Li
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-20 20:46 UTC by Steven Walter
Modified: 2020-08-13 09:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-23 17:27:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Steven Walter 2017-07-20 20:46:43 UTC
Document URL: 
https://docs.openshift.com/container-platform/3.4/install_config/aggregate_logging.html

Section Number and Name: 
Understanding Deployment -> Fluentd ->  Configuring Fluentd to Send Logs to an External Log Aggregator

Describe the issue: 
The patch commands are a tad confusing. 

$ oc patch secrets/logging-fluentd --type=json \
  --patch "[{'op':'add','path':'/data/your_ca_cert','value':'$(base64 /path/to/your_ca_cert.pem)'}]"
$ oc patch secrets/logging-fluentd --type=json \
  --patch "[{'op':'add','path':'/data/your_private_key','value':'$(base64 /path/to/your_private_key.pem)'}]"

It points to /data/your_ca_cert and /data/your_private_key -- it is misleading and people mistake this to mean /path/to/your/cert/on/this/host when in reality this is a path inside the json. In the json it's {"data": {"your_private_key"}} but this is not obvious to the outside view

Error you get when you think that "path" is asking for path on your machine:

Error from server: jsonpatch add operation does not apply: doc is missing path: /etc/origin/master/ca.crt


Suggestions for improvement: 
Add a note saying "Replace 'your_private_key' with some generic name. This is not a path on your host system, but is the link to the JSON path." or something similar to that. 

Additional information:

Comment 1 Brandi Munilla 2018-06-22 20:27:56 UTC
Added the note in the following PR:

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

Anping, PTAL. 

Thanks!

Comment 2 Anping Li 2018-06-29 07:24:31 UTC
LGTM

Comment 3 openshift-github-bot 2018-07-19 20:02:15 UTC
Commits pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/7b16a9abe2f67c7409771de3a8c09557bad2349d
Bug 1473438 Clarify your_private_key in patch commands

https://github.com/openshift/openshift-docs/commit/141eeb898b0e152d5e23447cfe02a34eb279c2d9
Merge pull request #10368 from bmcelvee/BZ1473483

Bug 1473438 Clarify your_private_key in patch commands


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