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

MGMT-14933: Detect if the host in running on OCI #585

Merged
merged 1 commit into from Aug 3, 2023

Conversation

adriengentil
Copy link
Contributor

Look at chassis.asset_tag to check if the host (VM or BM) runs on Oracle
Cloud Infrastructure (OCI).
If we find out that the host runs on OCI, we override the manufacturer.

Look at chassis.asset_tag to check if the host (VM or BM) runs on Oracle
Cloud Infrastructure (OCI).
If we find out that the host runs on OCI, we override the manufacturer.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 2, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 2, 2023

@adriengentil: This pull request references MGMT-14933 which is a valid jira issue.

In response to this:

Look at chassis.asset_tag to check if the host (VM or BM) runs on Oracle
Cloud Infrastructure (OCI).
If we find out that the host runs on OCI, we override the manufacturer.

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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 2, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 2, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 2, 2023
@adriengentil adriengentil changed the title MGMT-14933: Detect if the host in running in OCI MGMT-14933: Detect if the host in running on OCI Aug 2, 2023
@adriengentil
Copy link
Contributor Author

/test all

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #585 (e682458) into master (4aa932c) will increase coverage by 1.59%.
Report is 1 commits behind head on master.
The diff coverage is 83.33%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #585      +/-   ##
==========================================
+ Coverage   60.63%   62.23%   +1.59%     
==========================================
  Files          70       70              
  Lines        3534     3683     +149     
==========================================
+ Hits         2143     2292     +149     
+ Misses       1240     1236       -4     
- Partials      151      155       +4     
Files Changed Coverage Δ
src/util/dependencies.go 0.00% <0.00%> (ø)
src/inventory/system_vendor.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@adriengentil
Copy link
Contributor Author

/cc @avishayt @gamli75 @eliorerz

@adriengentil adriengentil marked this pull request as ready for review August 3, 2023 07:49
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 3, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 3, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 3, 2023

@adriengentil: all tests passed!

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 9b2da7e into openshift:master Aug 3, 2023
10 checks passed
openshift-merge-bot bot pushed a commit that referenced this pull request Nov 30, 2023
* NO-ISSUE: Bump github.com/coreos/ignition/v2 from 2.15.0 to 2.16.0 (#564)

Bumps [github.com/coreos/ignition/v2](https://github.com/coreos/ignition) from 2.15.0 to 2.16.0.
- [Release notes](https://github.com/coreos/ignition/releases)
- [Changelog](https://github.com/coreos/ignition/blob/main/docs/release-notes.md)
- [Commits](coreos/ignition@v2.15.0...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/coreos/ignition/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* NO-ISSUE: Bump golang.org/x/sys from 0.9.0 to 0.10.0 (#566)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.9.0 to 0.10.0.
- [Commits](golang/sys@v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MGMT-15235: Compile with CGO_ENABLED=1 for FIPS (#569)

https://issues.redhat.com/browse/MGMT-15235
In order to be FIPS compliant, we need to compile
all go code with CGO_ENABLED=1.

* NO-ISSUE: Bump github.com/PuerkitoBio/rehttp from 1.1.0 to 1.2.0 (#568)

Bumps [github.com/PuerkitoBio/rehttp](https://github.com/PuerkitoBio/rehttp) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/PuerkitoBio/rehttp/releases)
- [Commits](PuerkitoBio/rehttp@v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/PuerkitoBio/rehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* NO-ISSUE: Bump github.com/coreos/ignition/v2 from 2.16.0 to 2.16.2 (#574)

Bumps [github.com/coreos/ignition/v2](https://github.com/coreos/ignition) from 2.16.0 to 2.16.2.
- [Release notes](https://github.com/coreos/ignition/releases)
- [Changelog](https://github.com/coreos/ignition/blob/main/docs/release-notes.md)
- [Commits](coreos/ignition@v2.16.0...v2.16.2)

---
updated-dependencies:
- dependency-name: github.com/coreos/ignition/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* OCPBUGS-16373: Ignore arping errors on RHEL 9 (#576)

Newer versions of arping usually return 1 for usually spurious reasons.
Previous versions never returned 1. Actual errors are indicated by
returning 2 or -1.

Therefore treat return codes 0 and 1 as equivalent to give the same
behaviour on RHEL 9 as on RHEL 8.

* Updating ose-agent-installer-node-agent images to be consistent with ART (#575)

Reconciling with https://github.com/openshift/ocp-build-data/tree/8d4bab62fd4568f0a302cd46f27f2068a8869dfb/images/ose-agent-installer-node-agent.yml

Co-authored-by: AOS Automation Release Team <noreply@redhat.com>

* MGMT-15343: dependabot group updates (#579)

* MGMT-15343: dependabot remove docker (#581)

* MGMT-13111: Freeze on `404 Not Found` (#583)

Currently when the user deletes a host the next step runner receives a
`404 Not Found` response code from the server, logs it and tries again
with exponential backoff. After approximately 15 minutes it stops
retrying and exits, and then the main process of the agent will register
the host again. The net result is that the host is automatically
re-added after those 15 minutes, and we don't want that. To avoid that
this patch changes the next step runner so that it freezes the agent. To
register the host again the user will have to start the agent or else
reboot the host.

Related: https://issues.redhat.com/browse/MGMT-13111

Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>

* MGMT-15359: support appliance multipath virtual device (#584)

In order to support the multipath device that is used
by appliance nodes, return a disk with fake details
when such device is detected.

We can detect an appliance virtual device by the "agent"
prefix on '/sys/block/dm-0/dm/name'.
The returned disk contains some fake values in order to
avoid any validations and force installation on that disk.

* MGMT-14933: Detect if the host in running in OCI (#585)

Look at chassis.asset_tag to check if the host (VM or BM) runs on Oracle
Cloud Infrastructure (OCI).
If we find out that the host runs on OCI, we override the manufacturer.

* OCPBUGS-17251: Bumping golang.org/x/net (#586)

* Revert "MGMT-15235: Compile with CGO_ENABLED=1 for FIPS (#569)" (#582)

This reverts commit 809c532.

* MGMT-15235: Compile with CGO_ENABLED=1 for amd64 (#588)

https://issues.redhat.com/browse/MGMT-15235
To be FIPS-compliant, CGO_ENABLED=1 flag must be
specified for go code.
This flag along with the base image used doesn't
work for architectures other than amd64.
See previous revert PR for more information
#582

* MGMT-15235: Allow setting CGO_ENABLED flag (#589)

https://issues.redhat.com/browse/MGMT-15235
To be FIPS-compliant, CGO_ENABLED=1 flag must be
specified for go code.

This PR introduces the CGO_FLAG for builds that
need to change what CGO_ENABLED is set to
such as the ACM builds.

AMD64 builds will always set the CGO_FLAG to 1
for FIPs, which translates to CGO_ENABLED=1.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Crystal Chun <CrystalChun@users.noreply.github.com>
Co-authored-by: Zane Bitter <zbitter@redhat.com>
Co-authored-by: OpenShift Bot <openshift-bot@redhat.com>
Co-authored-by: AOS Automation Release Team <noreply@redhat.com>
Co-authored-by: Juan Hernández <juan.hernandez@redhat.com>
Co-authored-by: Daniel Erez <danielerez@gmail.com>
Co-authored-by: Adrien Gentil <agentil@redhat.com>
Co-authored-by: Dan Manor <danmanor11@gmail.com>
paul-maidment pushed a commit to paul-maidment/assisted-installer-agent that referenced this pull request Jan 24, 2024
Look at chassis.asset_tag to check if the host (VM or BM) runs on Oracle
Cloud Infrastructure (OCI).
If we find out that the host runs on OCI, we override the manufacturer.
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-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants