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

Error with 4.1.1.3/4.1.1.4 #84

Closed
lperrin-obs opened this issue Mar 30, 2021 · 2 comments
Closed

Error with 4.1.1.3/4.1.1.4 #84

lperrin-obs opened this issue Mar 30, 2021 · 2 comments

Comments

@lperrin-obs
Copy link

When the items 4.1.1.3 and 4.1.1.4 are run one after the other, I got a /etc/default/grub file like this on a fresh deployment of CentOS 8

GRUB_DEVICE=LABEL=cloudimg-rootfs
GRUB_DISABLE_LINUX_UUID=true
GRUB_TIMEOUT=5
GRUB_TERMINAL="serial console"
GRUB_GFXPAYLOAD_LINUX=auto
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200 no_timer_check nofb nomodeset gfxpayload=text"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200 no_timer_check nofb nomodeset gfxpayload=text audit_backlog_limit=8192"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200 no_timer_check nofb nomodeset gfxpayload=text
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200 no_timer_check nofb nomodeset gfxpayload=text audit_backlog_limit=8192 audit=1"

There is several lines of GRUB_CMDLINE_LINUX_DEFAULT and the second to last line has no ending ", which results in a error when the grub file is generated

RUNNING HANDLER [RHEL8-CIS : generate new grub config] ************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["grub2-mkconfig", "-o", "/boot/grub2/grub.cfg"], "delta": "0:00:00.369642", "end": "2021-03-30 12:33:11.910391", "msg": "non-zero return code", "rc": 2, "start": "2021-03-30 12:33:11.540749", "stderr": "/etc/default/grub: line 10: unexpected EOF while looking for matching `\"'", "stderr_lines": ["/etc/default/grub: line 10: unexpected EOF while looking for matching `\"'"], "stdout": "", "stdout_lines": []}
...ignoring

@georgenalen
Copy link
Contributor

Iperrin-obs,
Can you give a bit more detail on the base system and what branch you are using? Using a generic RHEL8 and CENTOS8 system I'm not seeing the same results. Below is what I am ending up with in the /etc/default/grub file. The line GRUB_CMDLINE_LINUX is the one the role has modified.

GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="no_timer_check crashkernel=auto resume=/dev/mapper/cl_centos8-swap rd.lvm.lv=cl_centos8/root rd.lvm.lv=cl_centos8/swap biosdevname=0 net.ifnames=0 rhgb quiet audit=1 audit_backlog_limit=8192"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
~

@lperrin-obs
Copy link
Author

I'm using the devel branch.
First test I have done was with a CentOS 8 image built with disk-image-builder.
I tested the playbook with an official CentOS 8 qcow2 image and didn't reproduce the error, so it may be related to a missing library. I will check.

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

2 participants