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-15271: Get cmdline and set IBM in vendor #624

Conversation

AmadeusPodvratnik
Copy link
Contributor

With the support of zVM in Assisted Installer, the necessary kernel arguments to boot a zVM nodes need to be considered. During the first boot of a zVM node a parm file will be provided to activate the necessary devices or specify a static IP w/o nmstate. This parm file looks like:

rd.neednet=1 console=ttysclp0 coreos.live.rootfs_url=http://172.23.236.156:8080/assisted-installer/rootfs.img ip=10.14.6.3::10.14.6.1:255.255.255.0:master-0.boea3e06.lnxero1.boe:encbdd0:none nameserver=10.14.6.1 ip=[fd00::3]::[fd00::1]:64::encbdd0:none nameserver=[fd00::1] zfcp.allow_lun_scan=0 rd.znet=qeth,0.0.bdd0,0.0.bdd1,0.0.bdd2,layer2=1 rd.dasd=0.0.5235 rd.dasd=0.0.5236 random.trust_cpu=on rd.luks.options=discard ignition.firstboot ignition.platform.id=metal console=tty1 console=ttyS1,115200n8

Nevertheless the cmdline will be taken independently of the architecture. For s390x gwh is returning for getProduct():
product family=unknown name=unknown vendor=unknown sku=unknown version=unknown
and need to be set to the correct values. To do that you need to parse:
cat /proc/cpuinfo |grep vendor
vendor_id : IBM/S390
sudo cat /proc/sysinfo |grep 'VM.*Control Program'
VM00 Control Program: z/VM 7.2.0
For KVM following values are returned:
cat /proc/sysinfo |grep 'VM.*Control Program'
VM00 Control Program: KVM/Linux

List all the issues related to this PR

[x ] New Feature
Enhancement
Bug fix
Tests
Documentation
CI/CD

How was this code tested?

assisted-test-infra environment
dev-scripts environment

[x ] Reviewer's test appreciated
Waiting for CI to do a full test run
[x ] Manual (Elaborate on how it was tested)

  • Using boot_test.go
    No tests needed

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 8, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 8, 2023

@AmadeusPodvratnik: This pull request references MGMT-15271 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.15.0" version, but no target version was set.

In response to this:

With the support of zVM in Assisted Installer, the necessary kernel arguments to boot a zVM nodes need to be considered. During the first boot of a zVM node a parm file will be provided to activate the necessary devices or specify a static IP w/o nmstate. This parm file looks like:

rd.neednet=1 console=ttysclp0 coreos.live.rootfs_url=http://172.23.236.156:8080/assisted-installer/rootfs.img ip=10.14.6.3::10.14.6.1:255.255.255.0:master-0.boea3e06.lnxero1.boe:encbdd0:none nameserver=10.14.6.1 ip=[fd00::3]::[fd00::1]:64::encbdd0:none nameserver=[fd00::1] zfcp.allow_lun_scan=0 rd.znet=qeth,0.0.bdd0,0.0.bdd1,0.0.bdd2,layer2=1 rd.dasd=0.0.5235 rd.dasd=0.0.5236 random.trust_cpu=on rd.luks.options=discard ignition.firstboot ignition.platform.id=metal console=tty1 console=ttyS1,115200n8

Nevertheless the cmdline will be taken independently of the architecture. For s390x gwh is returning for getProduct():
product family=unknown name=unknown vendor=unknown sku=unknown version=unknown
and need to be set to the correct values. To do that you need to parse:
cat /proc/cpuinfo |grep vendor
vendor_id : IBM/S390
sudo cat /proc/sysinfo |grep 'VM.*Control Program'
VM00 Control Program: z/VM 7.2.0
For KVM following values are returned:
cat /proc/sysinfo |grep 'VM.*Control Program'
VM00 Control Program: KVM/Linux

List all the issues related to this PR

[x ] New Feature
Enhancement
Bug fix
Tests
Documentation
CI/CD

How was this code tested?

assisted-test-infra environment
dev-scripts environment

[x ] Reviewer's test appreciated
Waiting for CI to do a full test run
[x ] Manual (Elaborate on how it was tested)

  • Using boot_test.go
    No tests needed

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 8, 2023
Copy link

openshift-ci bot commented Nov 8, 2023

Hi @AmadeusPodvratnik. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@AmadeusPodvratnik AmadeusPodvratnik force-pushed the MGMT-15271-get-cmdline-&-set-correct-vendor branch from 07f162b to 9832c42 Compare November 8, 2023 11:37
@AmadeusPodvratnik AmadeusPodvratnik marked this pull request as ready for review November 8, 2023 11:39
@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 Nov 8, 2023
src/inventory/system_vendor_test.go Outdated Show resolved Hide resolved
src/inventory/system_vendor.go Outdated Show resolved Hide resolved
@AmadeusPodvratnik AmadeusPodvratnik force-pushed the MGMT-15271-get-cmdline-&-set-correct-vendor branch from 9832c42 to aad8232 Compare November 8, 2023 14:12
@rccrdpccl
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 8, 2023
Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #624 (52b4543) into master (7213119) will increase coverage by 0.12%.
Report is 3 commits behind head on master.
The diff coverage is 68.96%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #624      +/-   ##
==========================================
+ Coverage   60.40%   60.52%   +0.12%     
==========================================
  Files          74       74              
  Lines        3624     3653      +29     
==========================================
+ Hits         2189     2211      +22     
- Misses       1282     1287       +5     
- Partials      153      155       +2     
Files Coverage Δ
src/inventory/boot.go 100.00% <100.00%> (ø)
src/inventory/system_vendor.go 83.63% <60.86%> (-16.37%) ⬇️

... and 1 file with indirect coverage changes

@AmadeusPodvratnik AmadeusPodvratnik force-pushed the MGMT-15271-get-cmdline-&-set-correct-vendor branch 2 times, most recently from 1f2471c to cb04f07 Compare November 8, 2023 15:08
src/inventory/system_vendor.go Outdated Show resolved Hide resolved
src/inventory/system_vendor.go Outdated Show resolved Hide resolved
src/inventory/system_vendor.go Outdated Show resolved Hide resolved
src/inventory/system_vendor.go Outdated Show resolved Hide resolved
@AmadeusPodvratnik AmadeusPodvratnik force-pushed the MGMT-15271-get-cmdline-&-set-correct-vendor branch 3 times, most recently from 00f3cbd to 2e8afd7 Compare November 8, 2023 16:05
@omertuc
Copy link
Contributor

omertuc commented Nov 9, 2023

/test e2e-agent-compact-ipv4

@omertuc omertuc mentioned this pull request Nov 9, 2023
@AmadeusPodvratnik AmadeusPodvratnik force-pushed the MGMT-15271-get-cmdline-&-set-correct-vendor branch 2 times, most recently from fb08bb8 to 75b7aa6 Compare November 9, 2023 11:06
@AmadeusPodvratnik
Copy link
Contributor Author

@avishayt -m1 added to the grep command.

(include vendor update)

Signed-off-by: Amadeus Podvratnik <apodvrat@redhat.com>
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2023
Copy link

openshift-ci bot commented Nov 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AmadeusPodvratnik, 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 Nov 9, 2023
Copy link

openshift-ci bot commented Nov 9, 2023

@AmadeusPodvratnik: 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-ci openshift-ci bot merged commit 51397c0 into openshift:master Nov 9, 2023
10 checks passed
@AmadeusPodvratnik AmadeusPodvratnik deleted the MGMT-15271-get-cmdline-&-set-correct-vendor branch November 10, 2023 12:32
paul-maidment pushed a commit to paul-maidment/assisted-installer-agent that referenced this pull request Jan 24, 2024
(include vendor update)

Signed-off-by: Amadeus Podvratnik <apodvrat@redhat.com>
Co-authored-by: Amadeus Podvratnik <apodvrat@redhat.com>
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants