Jira (FACT-3100) Facter 4.2.6 disks fact could not get serial bacause of using absolute path for lsblk

14 views
Skip to first unread message

Valentyna (Jira)

unread,
Dec 14, 2021, 4:01:02 AM12/14/21
to puppe...@googlegroups.com
Valentyna created an issue
 
Facter / Bug FACT-3100
Facter 4.2.6 disks fact could not get serial bacause of using absolute path for lsblk
Issue Type: Bug Bug
Affects Versions: FACT 4.2.6
Assignee: Unassigned
Components: Facter 4
Created: 2021/12/14 1:00 AM
Labels: github platform_7
Priority: Medium Medium
Reporter: Valentyna

Fact disks does not show serial of disks because of using absolute path for lsblk, on my updated ubuntu 20.04 from 18.04. On my updated OS lsblk is available in path /bin/lsblk, on my another PC with installed ubuntu 20.04 from scratch lsblk is on /usr/bin/lsblk.

I think should use  instead of full path result = Facter::Core::Execution.execute("/usr/bin/lsblk -dn -o serial /dev/#

{disk}", {on_fail: "", time_limit: 1}).strip, use result = Facter::Core::Execution.execute("lsblk -dn -o serial /dev/#{disk}

",

{on_fail: "", time_limit: 1}

).strip

Which solves the problem.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Valentyna (Jira)

unread,
Dec 14, 2021, 4:02:01 AM12/14/21
to puppe...@googlegroups.com
Valentyna updated an issue
Change By: Valentyna
Fact disks does not show serial of disks because of using absolute path for lsblk, on my updated ubuntu 20.04 from 18.04. On my updated OS lsblk is available in path /bin/lsblk, on my another PC with installed ubuntu 20.04 from scratch lsblk is on /usr/bin/lsblk.

I think should use  instead of full path result = Facter::Core::Execution.execute("/usr/bin/lsblk -dn -o serial /dev/#
\ {disk}", \ {on_fail: "", time_limit: 1}).strip,
use result = Facter::Core::Execution.execute("lsblk -dn -o serial /dev/# \ {disk}", \ {on_fail: "", time_limit: 1}).strip


Which solves the problem.
Add Comment Add Comment
 

Ciprian Badescu (Jira)

unread,
Jan 10, 2022, 10:31:01 AM1/10/22
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Jan 10, 2022, 10:31:03 AM1/10/22
to puppe...@googlegroups.com

Christopher Thorn (Jira)

unread,
Mar 11, 2022, 6:37:02 PM3/11/22
to puppe...@googlegroups.com

Christopher Thorn (Jira)

unread,
Mar 11, 2022, 6:55:01 PM3/11/22
to puppe...@googlegroups.com

Christopher Thorn (Jira)

unread,
Mar 11, 2022, 7:03:02 PM3/11/22
to puppe...@googlegroups.com
Christopher Thorn updated an issue
Change By: Christopher Thorn
Release Notes Summary: Updated facter to use full path for lsblk, so `fact disks` can now show serial of disks.

Parker Leach (Jira)

unread,
Mar 21, 2022, 11:59:02 AM3/21/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages