Skip to content

Conversation

@zshi-redhat
Copy link
Contributor

@zshi-redhat zshi-redhat commented Sep 16, 2022

Closes USHIFT-536

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 16, 2022
@zshi-redhat
Copy link
Contributor Author

/test e2e-openshift-conformance-sig-api-machinery

@zshi-redhat
Copy link
Contributor Author

cc @fzdarsky @mangelajo

@mangelajo
Copy link
Contributor

/approve

@dgrisonnet
Copy link
Member

Putting a hold for the API team to take some time to consider how to handle this new configuration parameter going forward. We are currently working on rewriting the existing configuration to be more in line with OCP so adding a dependency on the existing configuration of MicroShift will be problematic for us.

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 29, 2022
Copy link
Contributor

Choose a reason for hiding this comment

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

We found a way to have all of the configuration for ODF-LVM in a file outside of MicroShift's main config file. That will, eventually, allow us to provide a different CSI implementation that can also have its own separate file.

Some of the future use cases for MicroShift, especially upstream, make it desirable to be able to replace the CNI implementation as well, and following the same pattern with a similar clean separation for the configuration will make that more straightforward.

Let's talk about the approach we want to take this week.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dhellmann ack+, I updated the PR to follow the CSI approach and have a separate config file for ovn-kubernetes.

Copy link
Contributor

Choose a reason for hiding this comment

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

That looks good.

I'm not entirely comfortable with parsing YAML from bash, but what you have looks like it will work and we can consider whether we need something more "robust" in the future if we run into problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about using yq in the bash to parse yaml file, but it's not available in the existing repos. Adding the installation dependency sounds a bit heavy for this change in configure-ovs.sh since it is currently the only one I'm aware of that requires parsing yaml in bash in microshift project.
Another idea might be to use json config file and jq to parse it, jq is installed by default. The downside is that it is inconsistent with csi and microshift config files. I could write a small golang program to parse the yaml if we will have similar needs in microshift scripts. Or any other ideas?

Copy link
Contributor

Choose a reason for hiding this comment

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

Like I said, I think what you have is fine. We can consider other options as an improvement later if we have issues or establish a pattern based on other config.

@zshi-redhat
Copy link
Contributor Author

Putting a hold for the API team to take some time to consider how to handle this new configuration parameter going forward. We are currently working on rewriting the existing configuration to be more in line with OCP so adding a dependency on the existing configuration of MicroShift will be problematic for us.

/hold

@dgrisonnet The PR is updated to use a separate config file for ovn-kubernetes.

@zshi-redhat
Copy link
Contributor Author

/retest

@zshi-redhat zshi-redhat changed the title add user-facing config for ovn-kubernetes CNI USHIFT-536: add user-facing config for ovn-kubernetes CNI Oct 31, 2022
@zshi-redhat
Copy link
Contributor Author

/jira refresh

@dgrisonnet
Copy link
Member

Unholding since the initial concerns were cleared in this thread: #1030 (comment)

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 31, 2022
Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

Let's work on this, but wait until we branch for 4.13 to merge it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use yq to parse the YAML? How big is it and is it OK as a dependency?

If not, would it make sense to use a file format that is friendly for parsing with bash?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found it is not straight to install yq on rhel. It requires snapd pkg management.
yq on the fedora system is ~13M.
Would it be OK to use a config file in json format? jq is available in rhel.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe @zshi-redhat solution is OK, we avoid installing yq which based on his comments doesn't seem to be available in RHEL, and we keep yaml which is a more familiar config format in the k8s world, also more human friendly than json.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it likely that a systemd unit would find something in ~/.microshift? Should we just look in /etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!
agree, systemd may not find the config file in user root. I'll update to use /etc/ directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about passing ovnConfig here so the template can access any future settings without us having to extend this parameter list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, will update to pass ovnConfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@mangelajo
Copy link
Contributor

Waiting for last comments to be handled, looks good otherwise.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 2, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 2, 2022
@ggiguash
Copy link
Contributor

ggiguash commented Nov 2, 2022

/retest

Copy link
Contributor

@mangelajo mangelajo left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mangelajo, zshi-redhat

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [mangelajo,zshi-redhat]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 3, 2022

@zshi-redhat: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/periodic-ocp-4.13-images d5875a2d1ef76fa9076893bc8d7989ceed1542cb link true /test periodic-ocp-4.13-images

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@zshi-redhat
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 3529aee into openshift:main Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants