Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1130431[details]
/boot/grub/menu.lst picture.
Description of problem:
1. In RHEL6.7 OS, menu.lst is a soft link point to the grub.conf. The "waagent --serialconsole" deletes the menu.lst and writes a new one, which breaks the soft link, so that the menu.lst cannot be used while booting.
2. All the lines include "kernel" string are added "console=ttyS0 earlyprintk=ttyS0", including real kernel lines and some introduction lines.
Version-Release number of selected component (if applicable):
WALinuxAgent-2.0.16-1.el6
How reproducible:
Always
Steps to Reproduce:
1. waagent -serialconsole
2. Check the /boot/grub/menu.lst files that if the string "console=ttyS0 earlyprintk=ttyS0" is added to menu.lst file kernel line. Other lines are not changed.
Use "ls -l" to check the menu.lst file that if it is a soft link point to the grub.conf file.
3. Reboot OS, enter the grub and input "a", check the kernel parameters.
Actual results:
The string "console=ttyS0 earlyprintk=ttyS0" is added to menu.lst but not in grub.conf file. And the soft link of menu.lst has been broken.
Expected results:
1. The menu.lst is a soft link point to the grub.conf. The "console=ttyS0 earlyprintk=ttyS0" is added to the menu.lst file.
2. Only kernel lines are added "console=ttyS0 earlyprintk=ttyS0" string. Other lines (such as introduction lines) are not changed.
Additional info:
waagent:
1.
grubKernelBootOptionsFile = '/boot/grub/menu.lst'
def ReplaceFileContentsAtomic(filepath, contents):
...
os.write(handle, contents)
2.
self.grubKernelBootOptionsLine = 'kernel'
def AppendToLinuxKernelCmdline(option):
if not FindInLinuxKernelCmdline(option):
src=r'^(.*?'+MyDistro.grubKernelBootOptionsLine+r')(.*?)("?)$'
rep=r'\1\2 '+ option + r'\3'
try:
ReplaceStringInFile(MyDistro.grubKernelBootOptionsFile,src,rep)
Created attachment 1130431 [details] /boot/grub/menu.lst picture. Description of problem: 1. In RHEL6.7 OS, menu.lst is a soft link point to the grub.conf. The "waagent --serialconsole" deletes the menu.lst and writes a new one, which breaks the soft link, so that the menu.lst cannot be used while booting. 2. All the lines include "kernel" string are added "console=ttyS0 earlyprintk=ttyS0", including real kernel lines and some introduction lines. Version-Release number of selected component (if applicable): WALinuxAgent-2.0.16-1.el6 How reproducible: Always Steps to Reproduce: 1. waagent -serialconsole 2. Check the /boot/grub/menu.lst files that if the string "console=ttyS0 earlyprintk=ttyS0" is added to menu.lst file kernel line. Other lines are not changed. Use "ls -l" to check the menu.lst file that if it is a soft link point to the grub.conf file. 3. Reboot OS, enter the grub and input "a", check the kernel parameters. Actual results: The string "console=ttyS0 earlyprintk=ttyS0" is added to menu.lst but not in grub.conf file. And the soft link of menu.lst has been broken. Expected results: 1. The menu.lst is a soft link point to the grub.conf. The "console=ttyS0 earlyprintk=ttyS0" is added to the menu.lst file. 2. Only kernel lines are added "console=ttyS0 earlyprintk=ttyS0" string. Other lines (such as introduction lines) are not changed. Additional info: waagent: 1. grubKernelBootOptionsFile = '/boot/grub/menu.lst' def ReplaceFileContentsAtomic(filepath, contents): ... os.write(handle, contents) 2. self.grubKernelBootOptionsLine = 'kernel' def AppendToLinuxKernelCmdline(option): if not FindInLinuxKernelCmdline(option): src=r'^(.*?'+MyDistro.grubKernelBootOptionsLine+r')(.*?)("?)$' rep=r'\1\2 '+ option + r'\3' try: ReplaceStringInFile(MyDistro.grubKernelBootOptionsFile,src,rep)