Jira (FACT-1848) cmdline fact does not propperly resolve multiple parameters

2 views
Skip to first unread message

Doug Forster (JIRA)

unread,
Apr 26, 2018, 11:04:03 AM4/26/18
to puppe...@googlegroups.com
Doug Forster created an issue
 
Facter / Bug FACT-1848
cmdline fact does not propperly resolve multiple parameters
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2018/04/26 8:03 AM
Priority: Normal Normal
Reporter: Doug Forster

Currently facter doesn't properly parse cmdline fact.

Given this command line:

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-693.11.1.el7.x86_64 root=/dev/mapper/vg_root-lv_root ro nofb splash=quiet crashkernel=auto rd.lvm.lv=vg_root/lv_root rd.lvm.lv=vg_root/lv_swap rhgb quiet LANG=en_US.UTF-8

This fact is generated:

$ facter cmdline
{{{}}
{{ BOOT_IMAGE => "/vmlinuz-3.10.0-693.11.1.el7.x86_64",}}
{{ root => "/dev/mapper/vg_root-lv_root",}}
{{ ro => ,}}
{{ nofb => ,}}
{{ splash => "quiet",}}
{{ crashkernel => "auto",}}
{{ rd.lvm.lv => "vg_root/lv_swap",}}
{{ rhgb => ,}}
{{ quiet => ,}}
{{ LANG => "en_US.UTF-8"}}
}

There are multiple rd.lvm.lv prameters but only the last is accounted for. It should be more like this:

$ facter cmdline
{{{}}
{{ BOOT_IMAGE => "/vmlinuz-3.10.0-693.11.1.el7.x86_64",}}
{{ root => "/dev/mapper/vg_root-lv_root",}}
{{ ro => ,}}
{{ nofb => ,}}
{{ splash => "quiet",}}
{{ crashkernel => "auto",}}
{{ rd.lvm.lv => ["vg_root/{{lv_root}}", {{"vg_root/lv_swap"}}],}}
{{ rhgb => ,}}
{{ quiet => ,}}
{{ LANG => "en_US.UTF-8"}}
}

 

 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Doug Forster (JIRA)

unread,
Apr 26, 2018, 11:08:03 AM4/26/18
to puppe...@googlegroups.com
Doug Forster updated an issue
Change By: Doug Forster
Currently facter doesn't properly parse cmdline fact.

Given this command line:
{code:java}
# cat /proc/cmdline

BOOT_IMAGE=/vmlinuz-3.10.0-693.11.1.el7.x86_64 root=/dev/mapper/vg_root-lv_root ro nofb splash=quiet crashkernel=auto rd.lvm.lv=vg_root/lv_root rd.lvm.lv=vg_root/lv_swap rhgb quiet LANG=en_US.UTF-8 
{code}
This fact is generated:
{code:java}

# facter -p cmdline

{
  BOOT_IMAGE => "/vmlinuz-3.10.0-693.11.1.el7.x86_64",
  root => "/dev/mapper/vg_root-lv_root",
  ro => ,
  nofb => ,
  splash => "quiet",
  crashkernel => "auto",
  rd.lvm.lv => "vg_root/lv_swap",
  rhgb => ,
  quiet => ,
  LANG => "en_US.UTF-8"
}

{code}
{{}}

There are multiple rd.lvm.lv prameters but only the last is accounted for. It should be more like this:
{code:java}
# facter -p cmdline

{
  BOOT_IMAGE => "/vmlinuz-3.10.0-693.11.1.el7.x86_64",
  root => "/dev/mapper/vg_root-lv_root",
  ro => ,
  nofb => ,
  splash => "quiet",
  crashkernel => "auto",
  rd.lvm.lv => ["vg_root/lv_root", "vg_root/lv_swap"],

  rhgb => ,
  quiet => ,
  LANG => "en_US.UTF-8"
}
 {code}
 

Doug Forster (JIRA)

unread,
Apr 26, 2018, 11:08:03 AM4/26/18
to puppe...@googlegroups.com
Doug Forster updated an issue
Currently facter doesn't properly parse cmdline fact.

Given this command line:


{
{$ code:java}
#
cat /proc/cmdline }}
{{ BOOT_IMAGE=/vmlinuz-3.10.0-693.11.1.el7.x86_64 root=/dev/mapper/vg_root-lv_root ro nofb splash=quiet crashkernel=auto rd.lvm.lv=vg_root/lv_root rd.lvm.lv=vg_root/lv_swap rhgb quiet LANG=en_US.UTF-8  
{code
} }

This fact is generated:

{ {$ code:java}
#
facter -p cmdline }}
{
{{}}
{{   BOOT_IMAGE => "/vmlinuz-3.10.0-693.11.1.el7.x86_64", }}
{{   root => "/dev/mapper/vg_root-lv_root", }}
{{   ro => , }}
{{   nofb => , }}
{{   splash => "quiet", }}
{{   crashkernel => "auto", }}
{{   rd.lvm.lv => "vg_root/lv_swap", }}
{{   rhgb => , }}
{{   quiet => , }}
{{   LANG => "en_US.UTF-8"
}

{code
}
{{}}
}

There are multiple rd.lvm.lv prameters but only the last is accounted for. It should be more like this:

{ {$ code:java}
#
facter -p cmdline }}
{
{{}}
{{ BOOT_IMAGE => "/vmlinuz-3.10.0-693.11.1.el7.x86_64", }}
{{ root => "/dev/mapper/vg_root-lv_root", }}
{{ ro => , }}
{{ nofb => , }}
{{ splash => "quiet", }}
{{ crashkernel => "auto", }}
{{ rd.lvm.lv => ["vg_root/ {{ lv_root }} ", {{ "vg_root/lv_swap" }} ], }}
{{ rhgb => , }}
{{ quiet => , }}
{{ LANG => "en_US.UTF-8"
} }
  { { code } }}

 

 

Scott McClellan (JIRA)

unread,
May 1, 2018, 5:16:03 PM5/1/18
to puppe...@googlegroups.com

Scott McClellan (JIRA)

unread,
May 1, 2018, 5:16:04 PM5/1/18
to puppe...@googlegroups.com
Scott McClellan commented on Bug FACT-1848
 
Re: cmdline fact does not propperly resolve multiple parameters

We will need to create a list of which kernel parameters should be treated this way.

Branan Riley (JIRA)

unread,
May 21, 2018, 4:03:02 PM5/21/18
to puppe...@googlegroups.com

Branan Riley (JIRA)

unread,
May 21, 2018, 4:03:03 PM5/21/18
to puppe...@googlegroups.com

Tim Meusel (Jira)

unread,
Feb 25, 2021, 9:39:01 AM2/25/21
to puppe...@googlegroups.com
Tim Meusel commented on Bug FACT-1848
 
Re: cmdline fact does not propperly resolve multiple parameters

Hi!
I know the issue is quite old, sorry to bother you. I'm interested in a fact that parses /proc/cmdline. May I ask where this fact is coming from? As far as I know it's not a core fact on facter 3 nor facter 4.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages