openshift / assisted-installer-agent

Apache License 2.0
24 stars 74 forks source link

MGMT-17867: fix multipath inventory to include wwn #733

Closed linoyaslan closed 2 weeks ago

linoyaslan commented 3 weeks ago

Currently, if the cluster has multipath configured, the multipath inventory does not include the WWN. This occurs because the ghw package returns "unknown" if it fails to detect the WWN, and we then set it to empty. With my changes, if ghw returns "unknown," the code retrieves the WWN differently and returns it instead of an empty string.

openshift-ci-robot commented 3 weeks ago

@linoyaslan: This pull request references MGMT-17867 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift/assisted-installer-agent/pull/733): >Currently, if the cluster has multipath configured, the multipath inventory does not include the WWN. This occurs because the `ghw` package returns "unknown" if it fails to detect the WWN, and we then set it to empty. With my changes, if `ghw` returns "unknown," the code retrieves the WWN differently and returns it instead of an empty string. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fassisted-installer-agent). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
linoyaslan commented 3 weeks ago

/cc @avishayt @eliorerz

linoyaslan commented 3 weeks ago

/cc @danmanor

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 59.91%. Comparing base (10f41e2) to head (12e9816).

:exclamation: Current head 12e9816 differs from pull request most recent head c8fd286

Please upload reports for the commit c8fd286 to get more accurate results.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/openshift/assisted-installer-agent/pull/733/graphs/tree.svg?width=650&height=150&src=pr&token=ZYXZPU4167&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)](https://app.codecov.io/gh/openshift/assisted-installer-agent/pull/733?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) ```diff @@ Coverage Diff @@ ## master #733 +/- ## ======================================= Coverage 59.91% 59.91% ======================================= Files 74 74 Lines 3705 3710 +5 ======================================= + Hits 2220 2223 +3 - Misses 1328 1329 +1 - Partials 157 158 +1 ``` | [Files](https://app.codecov.io/gh/openshift/assisted-installer-agent/pull/733?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) | Coverage Δ | | |---|---|---| | [src/inventory/disks.go](https://app.codecov.io/gh/openshift/assisted-installer-agent/pull/733?src=pr&el=tree&filepath=src%2Finventory%2Fdisks.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-c3JjL2ludmVudG9yeS9kaXNrcy5nbw==) | `90.44% <100.00%> (+0.15%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/openshift/assisted-installer-agent/pull/733/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)
avishayt commented 3 weeks ago

Please use consts and add a unit test

linoyaslan commented 3 weeks ago

/retest

avishayt commented 3 weeks ago

/lgtm

openshift-ci[bot] commented 3 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avishayt, linoyaslan

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](https://github.com/openshift/assisted-installer-agent/blob/master/OWNERS)~~ [avishayt] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci-robot commented 2 weeks ago

/retest-required

Remaining retests: 0 against base HEAD 10f41e28048f31179046c8af78c63d4454cfc340 and 2 for PR HEAD c8fd286ebe1594a5b39227e11d0878af9d0742cf in total

linoyaslan commented 2 weeks ago

/retest

openshift-ci[bot] commented 2 weeks ago

@linoyaslan: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-bot commented 2 weeks ago

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-agent-installer-node-agent-container-v4.17.0-202406301513.p0.g239015e.assembly.stream.el9 for distgit ose-agent-installer-node-agent. All builds following this will include this PR.