Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update os-diff doc with package install instructions and correct usages #452

Merged
merged 21 commits into from
May 10, 2024

Conversation

matbu
Copy link
Contributor

@matbu matbu commented May 10, 2024

No description provided.

@jistr jistr requested a review from klgill May 10, 2024 12:25
Comment on lines 93 to 145

With the `hosts` key, os-diff will loop on each host provided and execute the command in `service_command` key:

----
ovs_external_ids:
path:
- ovs_external_ids.json
hosts:
- standalone
----

The service_command is the command which provides the required information.
It could be a simple cat from a config file. cat_output should be set to true
if you want os-diff to get the output of the command and store the output in a file specified by the key path

Then you can provide a mapping between in this case the EDPM CRD, and the ovs-vsctl output with config_mapping

----
service_command: 'ovs-vsctl list Open_vSwitch . | grep external_ids | awk -F '': '' ''{ print $2; }'''
cat_output: true
config_mapping:
ovn-bridge: edpm_ovn_bridge
ovn-bridge-mappings: edpm_ovn_bridge_mappings
ovn-encap-type: edpm_ovn_encap_type
ovn-match-northd-version: ovn_match_northd_version
ovn-monitor-all: ovn_monitor_all
ovn-ofctrl-wait-before-clear: edpm_ovn_ofctrl_wait_before_clear
ovn-remote-probe-interval: edpm_ovn_remote_probe_interval
----

Then you can use this command to compare the values:

----
os-diff diff ovs_external_ids.json edpm.crd --crd --service ovs_external_ids
----

Lets take the example of checking the /etc/yum.conf on every hosts, you will have to put this statement in the config.yaml,
lets call it yum_config:

----
services:
yum_config:
hosts:
- undercloud
- controller_1
- compute_1
- compute_2
service_command: "cat /etc/yum.conf"
cat_output: true
path:
- yum.conf
----

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matbu I started to format your new section as steps, but some of this information does not appear to be steps that customers must do to complete the procedure. What information is necessary downstream?

CC: @jistr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klgill Yes it's not a necessary "step" but more some guide and help for the usage. I put that in place, but if it's sounds confusing we can drop it.

@klgill klgill merged commit 1fdf18b into openstack-k8s-operators:main May 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants