Skip to content

Conversation

pacevedom
Copy link
Contributor

Command microshift show-config must show the running configuration. This command loaded the configuration from /etc/microshift/config.yaml if it existed, possibly showing wrong information (editing the file without restarting microshift yields wrong data).
Having no configuration file fills the config with defaults. This might also be wrong in the event of a hostname change, when this is automatically fixed to use the previous name. This command would show the new name when MicroShift is using the previous one.

New approach stores the running configuration upon start and returns it when asked for it.
If MicroShift is not running this command returns the last active config.

Which issue(s) this PR addresses:

Closes #

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 7, 2023
@openshift-ci-robot
Copy link

@pacevedom: This pull request references Jira Issue OCPBUGS-15740, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Command microshift show-config must show the running configuration. This command loaded the configuration from /etc/microshift/config.yaml if it existed, possibly showing wrong information (editing the file without restarting microshift yields wrong data).
Having no configuration file fills the config with defaults. This might also be wrong in the event of a hostname change, when this is automatically fixed to use the previous name. This command would show the new name when MicroShift is using the previous one.

New approach stores the running configuration upon start and returns it when asked for it.
If MicroShift is not running this command returns the last active config.

Which issue(s) this PR addresses:

Closes #

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.

@openshift-ci openshift-ci bot requested review from jerpeter1 and pliurh July 7, 2023 12:33
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2023
@pacevedom
Copy link
Contributor Author

/cc @dhellmann @pmtk

@openshift-ci openshift-ci bot requested review from dhellmann and pmtk July 7, 2023 12:33
@pacevedom
Copy link
Contributor Author

/test ci/prow/microshift-e2e

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 7, 2023

@pacevedom: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test e2e-openshift-conformance-reduced
  • /test images
  • /test microshift-e2e
  • /test test-srpm
  • /test test-unit
  • /test verify

The following commands are available to trigger optional jobs:

  • /test e2e-openshift-conformance-reduced-arm
  • /test microshift-e2e-arm
  • /test microshift-metal-tests
  • /test microshift-metal-tests-arm
  • /test test-rebase

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-microshift-main-e2e-openshift-conformance-reduced
  • pull-ci-openshift-microshift-main-e2e-openshift-conformance-reduced-arm
  • pull-ci-openshift-microshift-main-images
  • pull-ci-openshift-microshift-main-microshift-e2e
  • pull-ci-openshift-microshift-main-microshift-e2e-arm
  • pull-ci-openshift-microshift-main-test-unit
  • pull-ci-openshift-microshift-main-verify

In response to this:

/test ci/prow/microshift-e2e

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.

@pacevedom
Copy link
Contributor Author

/test microshift-e2e

@pacevedom
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 7, 2023
@openshift-ci-robot
Copy link

@pacevedom: This pull request references Jira Issue OCPBUGS-15740, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @gangwgr

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot requested a review from gangwgr July 7, 2023 15:15
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic doesn't look right.

If we're going to cache the entire set of config somewhere, then we always need to update those settings in case the user has modified the input file.

Maybe we can focus this change on just reading the nodename file and using that value for the host name override?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bit open to interpretation I think. The microshift show-config command should return the active config when microshift is running, right? Which means the configuration that is currently loaded. If you modify the config file then that wont take effect until next restart, which will persist the file again. But before restarting it any changes a user may do are not visible to microshift and displaying them in show-config might be misleading?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you're interpreting the command's purpose differently than it was originally intended.

It was meant to show the combination of what is in /etc/microshift/config.yaml and any defaults that are not explicitly in the file. You are correct that the results may not be the same as what the current process is using, of course. Those settings are logged, so it's easy to get them from journalctl. It's harder to look at a partial configuration file and understand what other settings will be added to make up the full configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then you are right. I changed the logic to copy the run behavior and update it accordingly.
What I find misleading is the name of the command and the comment, but we can take that in a different PR.

@pacevedom pacevedom force-pushed the OCPBUGS-15740 branch 2 times, most recently from a050418 to 28bebaa Compare July 10, 2023 08:56
Command `microshift show-config` shows the combination of what's in
`/etc/microshift/config.yaml` and the defaults that are not in the
file.
In the event of a hostname change this file does not show the correct
hostnameOverride and subjectAltNames, as they are changed right before
starting microshift to preserve the original node name.
This fix runs the same logic when showing the configuration or when
starting microshift.
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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, pacevedom

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [dhellmann,pacevedom]

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 Jul 10, 2023

@pacevedom: The following tests 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/e2e-openshift-conformance-reduced-arm e0cfaba link false /test e2e-openshift-conformance-reduced-arm
ci/prow/microshift-e2e-arm e0cfaba link false /test microshift-e2e-arm

Full PR test history. Your PR dashboard.

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.

@openshift-merge-robot openshift-merge-robot merged commit 5aa2178 into openshift:main Jul 10, 2023
@openshift-ci-robot
Copy link

@pacevedom: Jira Issue OCPBUGS-15740: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-15740 has been moved to the MODIFIED state.

In response to this:

Command microshift show-config must show the running configuration. This command loaded the configuration from /etc/microshift/config.yaml if it existed, possibly showing wrong information (editing the file without restarting microshift yields wrong data).
Having no configuration file fills the config with defaults. This might also be wrong in the event of a hostname change, when this is automatically fixed to use the previous name. This command would show the new name when MicroShift is using the previous one.

New approach stores the running configuration upon start and returns it when asked for it.
If MicroShift is not running this command returns the last active config.

Which issue(s) this PR addresses:

Closes #

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.

@pacevedom pacevedom deleted the OCPBUGS-15740 branch December 18, 2023 22:28
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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants