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

ROCKS7: grub2-client.xml references command unavailable in install environment #34

Open
tcooper opened this issue Dec 7, 2017 · 5 comments

Comments

@tcooper
Copy link
Contributor

tcooper commented Dec 7, 2017

grub2-client.xml node file expects access to command /opt/rocks/sbin/modify-grub2 to modify bootflags of installing node.

/opt/rocks/sbin/modify-grub2 is provided by rocks-admin RPM from Rocks core roll.

rocks-admin RPM is not added to updates.img by build-updates-img.py in Rocks base roll and therefore is not available during node install.

@ppapadopoulos
Copy link
Contributor

ppapadopoulos commented Dec 7, 2017 via email

@tcooper
Copy link
Contributor Author

tcooper commented Dec 7, 2017

You are correct (of course) about not needing rocks-admin in the updates.img file. But I think it needs to be added as a <package> somewhere.... perhaps base.xml? We'll solve with an extend- node file if/where needed for now.

@tcooper
Copy link
Contributor Author

tcooper commented Dec 14, 2017

@ppapadopoulos... here is supporting example.

Configuration needed for KVM on compute nodes...

[root@vct03 nodes]# rocks add appliance attr compute attr=kvm value=true
[root@vct03 nodes]# rocks add appliance attr compute attr=kvm_autostart value=false
[root@vct03 nodes]# rocks add appliance attr compute attr=kvm_cpu_pinning value=pin_all

[root@vct03 nodes]# rocks list appliance attr compute | grep kvm
compute:  kvm             true
compute:  kvm_autostart   false
compute:  kvm_cpu_pinning pin_all

Additional configuration for KVM to support SR-IOV...

[root@vct03 ~]# rocks report host bootflags vm-vct03-03
[root@vct03 ~]# rocks set host bootflags vm-vct03-03 flags="intel_idle.max_cstate=0 processor.max_cstate=0 idle=poll intel_iommu=on"
[root@vct03 ~]# rocks report host bootflags vm-vct03-03
intel_idle.max_cstate=0 processor.max_cstate=0 idle=poll intel_iommu=on

Without rocks-admin package in installing environment...

The following script will not work...

[anaconda root@vm-vct03-03 ~]# grep iommu /run/install/ks.cfg -B4 -A8
%post --log=/mnt/sysimage/var/log/rocks-install.log
cat > /tmp/tmpt2_5gN << 'ROCKS-KS-POST'
#!/bin/bash

addargs="intel_idle.max_cstate=0 processor.max_cstate=0 idle=poll intel_iommu=on"

/opt/rocks/sbin/modify-grub2 --file=/etc/sysconfig/grub --keyword=GRUB_CMDLINE_LINUX --mode=append $addargs
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg

ROCKS-KS-POST
/bin/chmod +x /tmp/tmpt2_5gN
/tmp/tmpt2_5gN
/bin/rm /tmp/tmpt2_5gN

And bootflags are not configured...

[root@vm-vct03-03 ~]# cat /etc/sysconfig/grub; echo "----"; cat /proc/cmdline
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto selinux=0 ipv6.disable=1 rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
----
BOOT_IMAGE=/boot/vmlinuz-3.10.0-693.11.1.el7.x86_64 root=UUID=e0bfd14b-daae-4741-9b33-ca9f3da87cff ro crashkernel=auto selinux=0 ipv6.disable=1 rhgb quiet

WITH the rocks-admin package installed on the node...

[root@vct03 ~]# cp /export/rocks/install/site-profiles/7.0/nodes/extend-compute.xml /export/rocks/install/rocks-dist/x86_64/build/nodes/
cp: overwrite ‘/export/rocks/install/rocks-dist/x86_64/build/nodes/extend-compute.xml’? y

[root@vct03 ~]# grep rocks-admin /export/rocks/install/rocks-dist/x86_64/build/nodes/extend-compute.xml
<package>rocks-admin</package>

Reinstall of node WILL have bootflags updated...

[root@vm-vct03-03 ~]# cat /etc/sysconfig/grub ; echo "--"; cat /proc/cmdline
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto selinux=0 ipv6.disable=1 rhgb quiet intel_idle.max_cstate=0 processor.max_cstate=0 idle=poll intel_iommu=on"
GRUB_DISABLE_RECOVERY="true"
--
BOOT_IMAGE=/boot/vmlinuz-3.10.0-693.11.1.el7.x86_64 root=UUID=bb7c495e-73fc-4a93-af73-bdf7a11410ae ro crashkernel=auto selinux=0 ipv6.disable=1 rhgb quiet intel_idle.max_cstate=0 processor.max_cstate=0 idle=poll intel_iommu=on

@gisers
Copy link

gisers commented Oct 11, 2018

@tcooper Hey,Problems arise during the installation of rocks7:unexpected error:'NoneType' object has no attribute 'updates'.
how did you solve the problem? Can you please

@tcooper
Copy link
Contributor Author

tcooper commented Oct 15, 2018

@gisers Your problem is not related to this issue. You likely find more help with this problem on the Rocks mailing list archives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants